blob: d341453443fc4ccdbfba23e9ab572c9a22fa3750 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200816with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000817enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829enable_ipv6
830with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000832with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100840with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100841with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300894runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895includedir='${prefix}/include'
896oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 ac_prev=
915 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
935 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200992 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
1001 esac
1002 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 no_create=yes ;;
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
William Grzybowski23e65b22018-09-07 09:06:15 -03001147 -runstatedir | --runstatedir | --runstatedi | --runstated \
1148 | --runstate | --runstat | --runsta | --runst | --runs \
1149 | --run | --ru | --r)
1150 ac_prev=runstatedir ;;
1151 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1152 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1153 | --run=* | --ru=* | --r=*)
1154 runstatedir=$ac_optarg ;;
1155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1157 ac_prev=sbindir ;;
1158 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1159 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
1162 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1163 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1164 | --sharedst | --shareds | --shared | --share | --shar \
1165 | --sha | --sh)
1166 ac_prev=sharedstatedir ;;
1167 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1168 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1169 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1170 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 -site | --site | --sit)
1174 ac_prev=site ;;
1175 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1179 ac_prev=srcdir ;;
1180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1184 | --syscon | --sysco | --sysc | --sys | --sy)
1185 ac_prev=sysconfdir ;;
1186 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1187 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1196 verbose=yes ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 -version | --version | --versio | --versi | --vers | -V)
1199 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 --x)
1234 # Obsolete; use --with-x.
1235 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238 | --x-incl | --x-inc | --x-in | --x-i)
1239 ac_prev=x_includes ;;
1240 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246 ac_prev=x_libraries ;;
1247 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1252Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 *=*)
1256 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_envvar in #(
1259 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 export $ac_envvar ;;
1264
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001270 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ;;
1272
1273 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274done
1275
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279fi
1280
Matthias Kloseb9621712010-04-24 17:59:49 +00001281if test -n "$ac_unrecognized_opts"; then
1282 case $enable_option_checking in
1283 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286 esac
1287fi
1288
1289# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291 datadir sysconfdir sharedstatedir localstatedir includedir \
1292 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001293 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 # Remove trailing slashes.
1297 case $ac_val in
1298 */ )
1299 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300 eval $ac_var=\$ac_val;;
1301 esac
1302 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 [\\/$]* | ?:[\\/]* ) continue;;
1305 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001308done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# There might be people who depend on the old broken behavior: `$host'
1311# used to hold the argument of --host etc.
1312# FIXME: To remove some day.
1313build=$build_alias
1314host=$host_alias
1315target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# FIXME: To remove some day.
1318if test "x$host_alias" != x; then
1319 if test "x$build_alias" = x; then
1320 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001321 elif test "x$build_alias" != "x$host_alias"; then
1322 cross_compiling=yes
1323 fi
1324fi
1325
1326ac_tool_prefix=
1327test -n "$host_alias" && ac_tool_prefix=$host_alias-
1328
1329test "$silent" = yes && exec 6>/dev/null
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_pwd=`pwd` && test -n "$ac_pwd" &&
1333ac_ls_di=`ls -di .` &&
1334ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340# Find the source files, if location was not specified.
1341if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 ac_confdir=`$as_dirname -- "$as_myself" ||
1345$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346 X"$as_myself" : 'X\(//\)[^/]' \| \
1347 X"$as_myself" : 'X\(//\)$' \| \
1348 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)[^/].*/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\).*/{
1363 s//\1/
1364 q
1365 }
1366 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369 srcdir=..
1370 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374if test ! -r "$srcdir/$ac_unique_file"; then
1375 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381 pwd)`
1382# When building in place, set srcdir=.
1383if test "$ac_abs_confdir" = "$ac_pwd"; then
1384 srcdir=.
1385fi
1386# Remove unnecessary trailing slashes from srcdir.
1387# Double slashes in file names in object file debugging info
1388# mess up M-x gdb in Emacs.
1389case $srcdir in
1390*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1391esac
1392for ac_var in $ac_precious_vars; do
1393 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_env_${ac_var}_value=\$${ac_var}
1395 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399#
1400# Report the --help message.
1401#
1402if test "$ac_init_help" = "long"; then
1403 # Omit some internal or obsolete options to make the list less imposing.
1404 # This message is too long to be a string in the A/UX 3.1 sh.
1405 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001406\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Usage: $0 [OPTION]... [VAR=VALUE]...
1409
1410To assign environment variables (e.g., CC, CFLAGS...), specify them as
1411VAR=VALUE. See below for descriptions of some of the useful variables.
1412
1413Defaults for the options are specified in brackets.
1414
1415Configuration:
1416 -h, --help display this help and exit
1417 --help=short display options specific to this package
1418 --help=recursive display the short help of all the included packages
1419 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001420 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --cache-file=FILE cache test results in FILE [disabled]
1422 -C, --config-cache alias for \`--cache-file=config.cache'
1423 -n, --no-create do not create output files
1424 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426Installation directories:
1427 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432By default, \`make install' will install all the files in
1433\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1434an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1435for instance \`--prefix=\$HOME'.
1436
1437For better control, use the options below.
1438
1439Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 --bindir=DIR user executables [EPREFIX/bin]
1441 --sbindir=DIR system admin executables [EPREFIX/sbin]
1442 --libexecdir=DIR program executables [EPREFIX/libexec]
1443 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1444 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1445 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001446 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001467 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001473 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001482 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-framework[=INSTALLDIR]
1484 Build (MacOSX|Darwin) framework
1485 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001486 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001487 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1488 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001501 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1502 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001503 --with-framework-name=FRAMEWORK
1504 specify an alternate name of the framework built
1505 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-cxx-main=<compiler>
1507 compile main() and link python executable with C++
1508 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-suffix=.exe set executable suffix
1510 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001511 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001512 --with-lto Enable Link Time Optimization in any build. Disabled
1513 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001514 --with-hash-algorithm=[fnv|siphash24]
1515 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001516 --with-address-sanitizer
1517 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001519 --with-system-expat build pyexpat module using an installed expat
1520 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001521 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001522 --with-system-libmpdec build _decimal module using an installed libmpdec
1523 library
Ned Deilyd819b932013-09-06 01:07:05 -07001524 --with-tcltk-includes='-I...'
1525 override search for Tcl and Tk include files
1526 --with-tcltk-libs='-L...'
1527 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001528 --with-dbmliborder=db1:db2:...
1529 order to check db backends for dbm. Valid value is a
1530 colon separated string with the backend names
1531 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-doc-strings disable/enable documentation strings
1533 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001534 --with(out)-c-locale-coercion
1535 disable/enable C locale coercion to a UTF-8 based
1536 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001538 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001546 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001547 --with-ssl-default-suites=[python|openssl|STRING]
1548 Override default cipher suites string, python: use
1549 Python's preferred selection (default), openssl:
1550 leave OpenSSL's defaults untouched, STRING: use a
1551 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001635python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily5489bda2018-01-31 17:44:09 -05002344It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Christian Heimesff5be6e2018-01-20 13:19:21 +01002694
2695
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002696if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002697 # If we're building out-of-tree, we need to make sure the following
2698 # resources get picked up before their $srcdir counterparts.
2699 # Objects/ -> typeslots.inc
2700 # Include/ -> Python-ast.h, graminit.h
2701 # Python/ -> importlib.h
2702 # (A side effect of this is that these resources will automatically be
2703 # regenerated when building out-of-tree, regardless of whether or not
2704 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2705 # off.)
2706 BASECPPFLAGS="-IObjects -IInclude -IPython"
2707else
2708 BASECPPFLAGS=""
2709fi
2710
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711
2712
2713
2714
Victor Stinner9ed34a82017-05-02 22:35:58 +02002715if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717# Extract the first word of "git", so it can be a program name with args.
2718set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2720$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722 $as_echo_n "(cached) " >&6
2723else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724 if test -n "$HAS_GIT"; then
2725 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726else
2727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730 IFS=$as_save_IFS
2731 test -z "$as_dir" && as_dir=.
2732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2736 break 2
2737 fi
2738done
2739 done
2740IFS=$as_save_IFS
2741
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743fi
2744fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745HAS_GIT=$ac_cv_prog_HAS_GIT
2746if test -n "$HAS_GIT"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2748$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749else
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2751$as_echo "no" >&6; }
2752fi
2753
2754
2755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759then
Xiang Zhang4c855572018-08-20 22:36:19 +08002760 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2761 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2762 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764 GITVERSION=""
2765 GITTAG=""
2766 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
2768
2769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
2772
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002773ac_aux_dir=
2774for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2775 if test -f "$ac_dir/install-sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install-sh -c"
2778 break
2779 elif test -f "$ac_dir/install.sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install.sh -c"
2782 break
2783 elif test -f "$ac_dir/shtool"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/shtool install -c"
2786 break
2787 fi
2788done
2789if test -z "$ac_aux_dir"; then
2790 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2791fi
2792
2793# These three variables are undocumented and unsupported,
2794# and are intended to be withdrawn in a future Autoconf release.
2795# They can cause serious problems if a builder's source tree is in a directory
2796# whose full name contains unusual characters.
2797ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2798ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2799ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2800
2801
2802# Make sure we can run config.sub.
2803$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2804 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2807$as_echo_n "checking build system type... " >&6; }
2808if ${ac_cv_build+:} false; then :
2809 $as_echo_n "(cached) " >&6
2810else
2811 ac_build_alias=$build_alias
2812test "x$ac_build_alias" = x &&
2813 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2814test "x$ac_build_alias" = x &&
2815 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2816ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2817 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2818
2819fi
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2821$as_echo "$ac_cv_build" >&6; }
2822case $ac_cv_build in
2823*-*-*) ;;
2824*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2825esac
2826build=$ac_cv_build
2827ac_save_IFS=$IFS; IFS='-'
2828set x $ac_cv_build
2829shift
2830build_cpu=$1
2831build_vendor=$2
2832shift; shift
2833# Remember, the first character of IFS is used to create $*,
2834# except with old shells:
2835build_os=$*
2836IFS=$ac_save_IFS
2837case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2838
2839
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2841$as_echo_n "checking host system type... " >&6; }
2842if ${ac_cv_host+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844else
2845 if test "x$host_alias" = x; then
2846 ac_cv_host=$ac_cv_build
2847else
2848 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2850fi
2851
2852fi
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2854$as_echo "$ac_cv_host" >&6; }
2855case $ac_cv_host in
2856*-*-*) ;;
2857*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2858esac
2859host=$ac_cv_host
2860ac_save_IFS=$IFS; IFS='-'
2861set x $ac_cv_host
2862shift
2863host_cpu=$1
2864host_vendor=$2
2865shift; shift
2866# Remember, the first character of IFS is used to create $*,
2867# except with old shells:
2868host_os=$*
2869IFS=$ac_save_IFS
2870case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2871
2872
2873
doko@python.orga10e4a92013-01-25 18:45:12 +01002874
2875
Ned Deilyfcbc2462014-08-22 13:32:49 -07002876# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2877rm -f pybuilddir.txt
2878
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002879for ac_prog in python$PACKAGE_VERSION python3 python
2880do
2881 # Extract the first word of "$ac_prog", so it can be a program name with args.
2882set dummy $ac_prog; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886 $as_echo_n "(cached) " >&6
2887else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002888 if test -n "$PYTHON_FOR_REGEN"; then
2889 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002890else
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900 break 2
2901 fi
2902done
2903 done
2904IFS=$as_save_IFS
2905
2906fi
2907fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2909if test -n "$PYTHON_FOR_REGEN"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2911$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002912else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
2915fi
2916
2917
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922
2923
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002924if test "$cross_compiling" = yes; then
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2926$as_echo_n "checking for python interpreter for cross build... " >&6; }
2927 if test -z "$PYTHON_FOR_BUILD"; then
2928 for interp in python$PACKAGE_VERSION python3 python; do
2929 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002930 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 +02002931 break
2932 fi
2933 interp=
2934 done
2935 if test x$interp = x; then
2936 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2937 fi
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2939$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002940 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 +02002941 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002942elif test "$cross_compiling" = maybe; then
2943 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944else
2945 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Benjamin Petersond23f8222009-04-05 19:13:16 +00002950if test "$prefix" != "/"; then
2951 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
2956
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002957# We don't use PACKAGE_ variables, and they cause conflicts
2958# with other autoconf-based packages that include Python.h
2959grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2960rm confdefs.h
2961mv confdefs.h.new confdefs.h
2962
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002963
Ned Deily5489bda2018-01-31 17:44:09 -05002964VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002965
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002966# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002967
2968SOVERSION=1.0
2969
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970# The later defininition of _XOPEN_SOURCE disables certain features
2971# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2972
Matthias Kloseb9621712010-04-24 17:59:49 +00002973$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974
2975
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2977# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2978# them.
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002981
2982
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002988
2989
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995
2996
2997
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002998define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003000# Arguments passed to configure.
3001
3002CONFIG_ARGS="$ac_configure_args"
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3005$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003007if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003009 case $enableval in
3010 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003011 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # information
3013 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003014 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003016 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3017 if test ! -d "${enableval}"
3018 then
3019 enableval=/
3020 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 ;;
3023 esac
3024 case $enableval in
3025 no)
3026 UNIVERSALSDK=
3027 enable_universalsdk=
3028 ;;
3029 *)
3030 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 if test ! -d "${UNIVERSALSDK}"
3032 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003033 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039else
3040
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046if test -n "${UNIVERSALSDK}"
3047then
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3049$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050else
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deily87adb6e2013-10-18 21:09:56 -07003057ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059# For backward compatibility reasons we prefer to select '32-bit' if available,
3060# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062if test "`uname -s`" = "Darwin"
3063then
3064 if test -n "${UNIVERSALSDK}"
3065 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 then
3068 UNIVERSAL_ARCHS="intel"
3069 fi
3070 fi
3071fi
3072
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003073
Matthias Kloseb9621712010-04-24 17:59:49 +00003074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3075$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003078if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 UNIVERSAL_ARCHS="$withval"
3081
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082fi
3083
Ned Deily87adb6e2013-10-18 21:09:56 -07003084if test -n "${UNIVERSALSDK}"
3085then
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3087$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3088else
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
3091fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093
3094# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003095if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096 withval=$with_framework_name;
3097 PYTHONFRAMEWORK=${withval}
3098 PYTHONFRAMEWORKDIR=${withval}.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3100
3101else
3102
3103 PYTHONFRAMEWORK=Python
3104 PYTHONFRAMEWORKDIR=Python.framework
3105 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3106
3107fi
3108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003112 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003113 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003114 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003115 esac
3116 case $enableval in
3117 no)
3118 PYTHONFRAMEWORK=
3119 PYTHONFRAMEWORKDIR=no-framework
3120 PYTHONFRAMEWORKPREFIX=
3121 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122 FRAMEWORKINSTALLFIRST=
3123 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 FRAMEWORKALTINSTALLFIRST=
3125 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003126 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 if test "x${prefix}" = "xNONE"; then
3128 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3129 else
3130 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3131 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003133 ;;
3134 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003136 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003138 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003139 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3140 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003141 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 if test "x${prefix}" = "xNONE" ; then
3145 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150
3151 case "${enableval}" in
3152 /System*)
3153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3154 if test "${prefix}" = "NONE" ; then
3155 # See below
3156 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3157 fi
3158 ;;
3159
3160 /Library*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163
3164 */Library/Frameworks)
3165 MDIR="`dirname "${enableval}"`"
3166 MDIR="`dirname "${MDIR}"`"
3167 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3168
3169 if test "${prefix}" = "NONE"; then
3170 # User hasn't specified the
3171 # --prefix option, but wants to install
3172 # the framework in a non-default location,
3173 # ensure that the compatibility links get
3174 # installed relative to that prefix as well
3175 # instead of in /usr/local.
3176 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3177 fi
3178 ;;
3179
3180 *)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 ;;
3183 esac
3184
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3194
3195 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3196
Jack Jansene578a632001-08-15 01:27:14 +00003197 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Guido van Rossum563e7081996-09-10 18:20:48 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003202 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORKPREFIX=
3204 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST=
3206 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 FRAMEWORKALTINSTALLFIRST=
3208 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 if test "x${prefix}" = "xNONE" ; then
3211 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3212 else
3213 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3214 fi
Jack Jansene578a632001-08-15 01:27:14 +00003215 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218fi
3219
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
3221
Michael W. Hudson54241132001-12-07 15:38:26 +00003222
3223
3224
3225
Jack Jansene578a632001-08-15 01:27:14 +00003226
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003227
3228
3229
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003230
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
Ned Deilyb8f944f2013-11-21 22:42:25 -08003232
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233
3234cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003235#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003236_ACEOF
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003240## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003241## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003242##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243# Set name for machine-dependent library files
3244
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3246$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247if test -z "$MACHDEP"
3248then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 # avoid using uname for cross builds
3250 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003251 # ac_sys_system and ac_sys_release are used for setting
3252 # a lot of different things including 'define_xopen_source'
3253 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003255 *-*-linux-android*)
3256 ac_sys_system=Linux-android
3257 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003258 *-*-linux*)
3259 ac_sys_system=Linux
3260 ;;
3261 *-*-cygwin*)
3262 ac_sys_system=Cygwin
3263 ;;
3264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3268 esac
3269 ac_sys_release=
3270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003272 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003273 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 fi
3279 ac_md_system=`echo $ac_sys_system |
3280 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3281 ac_md_release=`echo $ac_sys_release |
3282 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3283 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003284
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003286 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003287 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003288 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003289 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291fi
Guido van Rossum91922671997-10-09 20:24:13 +00003292
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003293
3294if test "$cross_compiling" = yes; then
3295 case "$host" in
3296 *-*-linux*)
3297 case "$host_cpu" in
3298 arm*)
3299 _host_cpu=arm
3300 ;;
3301 *)
3302 _host_cpu=$host_cpu
3303 esac
3304 ;;
3305 *-*-cygwin*)
3306 _host_cpu=
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3314fi
3315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3317# disable features if it is defined, without any means to access these
3318# features as extensions. For these systems, we skip the definition of
3319# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3320# some feature, make sure there is no alternative way to access this
3321# feature. Also, when using wildcards, make sure you have verified the
3322# need for not defining _XOPEN_SOURCE on all systems matching the
3323# wildcard, and that the wildcard does not include future systems
3324# (which may remove their limitations).
3325case $ac_sys_system/$ac_sys_release in
3326 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3327 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003328 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003329 # In addition, Stefan Krah confirms that issue #1244610 exists through
3330 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332 define_xopen_source=no
3333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338
3339 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003340 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346
3347 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003348 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3349 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3350 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003351 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 +00003352 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003353 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3354 # request to enable features supported by the standard as a request
3355 # to disable features not supported by the standard. The best way
3356 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3357 # entirely and define __EXTENSIONS__ instead.
3358 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003359 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3361 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003362 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003363 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 define_xopen_source=no;;
3365 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3434# it may influence the way we can build extensions, so distutils
3435# needs to check it
3436
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003439EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003442
3443# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3444# for debug/optimization stuff. BASECFLAGS is for flags that are required
3445# just to get things to compile and link. Users are free to override OPT
3446# when running configure or make. The build should not break if they do.
3447# BASECFLAGS should generally not be messed with, however.
3448
Guido van Rossum8b131c51995-03-09 14:10:13 +00003449# If the user switches compilers, we can't believe the cache
3450if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3451then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003452 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003453(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003454fi
3455
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003456# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3457# when the compiler supports them, but we don't always want -O2, and
3458# we set -g later.
3459if test -z "$CFLAGS"; then
3460 CFLAGS=
3461fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003462
3463if test "$ac_sys_system" = "Darwin"
3464then
3465 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003466 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003467 # information
3468 if test -z "${CC}"
3469 then
3470 found_gcc=
3471 found_clang=
3472 as_save_IFS=$IFS; IFS=:
3473 for as_dir in $PATH
3474 do
3475 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003476 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003477 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003478 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479 fi
3480 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003481 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003482 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 fi
3485 fi
3486 done
3487 IFS=$as_save_IFS
3488
3489 if test -n "$found_gcc" -a -n "$found_clang"
3490 then
3491 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3492 then
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3494$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3495 CC="$found_clang"
3496 CXX="$found_clang++"
3497 fi
3498
3499
3500 elif test -z "$found_gcc" -a -n "$found_clang"
3501 then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3503$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3504 CC="$found_clang"
3505 CXX="$found_clang++"
3506
3507 elif test -z "$found_gcc" -a -z "$found_clang"
3508 then
3509 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3510 if test -n "${found_clang}"
3511 then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3513$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3514 CC="${found_clang}"
3515 CXX="`/usr/bin/xcrun -find clang++`"
3516
3517 # else: use default behaviour
3518 fi
3519 fi
3520 fi
3521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
3527if test -n "$ac_tool_prefix"; then
3528 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3529set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3531$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003532if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003533 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003534else
3535 if test -n "$CC"; then
3536 ac_cv_prog_CC="$CC" # Let the user override the test.
3537else
Martin v. Löwis11437992002-04-12 09:54:03 +00003538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3539for as_dir in $PATH
3540do
3541 IFS=$as_save_IFS
3542 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $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 +00003547 break 2
3548 fi
3549done
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Jack Jansendd19cf82001-12-06 22:36:17 +00003553fi
3554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003555CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003556if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3558$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003559else
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3561$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562fi
3563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566if test -z "$ac_cv_prog_CC"; then
3567 ac_ct_CC=$CC
3568 # Extract the first word of "gcc", so it can be a program name with args.
3569set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003574else
3575 if test -n "$ac_ct_CC"; then
3576 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3577else
3578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
3593fi
3594fi
3595ac_ct_CC=$ac_cv_prog_ac_ct_CC
3596if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3598$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604 if test "x$ac_ct_CC" = x; then
3605 CC=""
3606 else
3607 case $cross_compiling:$ac_tool_warned in
3608yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611ac_tool_warned=yes ;;
3612esac
3613 CC=$ac_ct_CC
3614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
3616 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003617fi
3618
Jack Jansendd19cf82001-12-06 22:36:17 +00003619if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 if test -n "$ac_tool_prefix"; then
3621 # 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 +00003622set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3624$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003625if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
3628 if test -n "$CC"; then
3629 ac_cv_prog_CC="$CC" # Let the user override the test.
3630else
Martin v. Löwis11437992002-04-12 09:54:03 +00003631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $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 +00003640 break 2
3641 fi
3642done
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003645
3646fi
3647fi
3648CC=$ac_cv_prog_CC
3649if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3651$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655fi
3656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660if test -z "$CC"; then
3661 # Extract the first word of "cc", so it can be a program name with args.
3662set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003671 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3680 ac_prog_rejected=yes
3681 continue
3682 fi
3683 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $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 +00003685 break 2
3686 fi
3687done
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003690
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691if test $ac_prog_rejected = yes; then
3692 # We found a bogon in the path, so make sure we never use it.
3693 set dummy $ac_cv_prog_CC
3694 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696 # We chose a different compiler from the bogus one.
3697 # However, it has the same basename, so the bogon will be chosen
3698 # first if we set CC to just the basename; use the full file name.
3699 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003700 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701 fi
3702fi
3703fi
3704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3708$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003709else
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3711$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 do
3720 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3721set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 test -n "$CC" && break
3758 done
3759fi
3760if test -z "$CC"; then
3761 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003763do
3764 # Extract the first word of "$ac_prog", so it can be a program name with args.
3765set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003768if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
3771 if test -n "$ac_ct_CC"; then
3772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3773else
3774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777 IFS=$as_save_IFS
3778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $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 +00003783 break 2
3784 fi
3785done
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790fi
3791ac_ct_CC=$ac_cv_prog_ac_ct_CC
3792if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3794$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 test -n "$ac_ct_CC" && break
3802done
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 if test "x$ac_ct_CC" = x; then
3805 CC=""
3806 else
3807 case $cross_compiling:$ac_tool_warned in
3808yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811ac_tool_warned=yes ;;
3812esac
3813 CC=$ac_ct_CC
3814 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
3816
3817fi
3818
3819
Matthias Kloseb9621712010-04-24 17:59:49 +00003820test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003822as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003823See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
3825# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3827set X $ac_compile
3828ac_compiler=$2
3829for ac_option in --version -v -V -qversion; do
3830 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831case "(($ac_try" in
3832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3833 *) ac_try_echo=$ac_try;;
3834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3836$as_echo "$ac_try_echo"; } >&5
3837 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 if test -s conftest.err; then
3840 sed '10a\
3841... rest of stderr output deleted ...
3842 10q' conftest.err >conftest.er1
3843 cat conftest.er1 >&5
3844 fi
3845 rm -f conftest.er1 conftest.err
3846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847 test $ac_status = 0; }
3848done
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
Matthias Kloseb9621712010-04-24 17:59:49 +00003850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003851/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853int
3854main ()
3855{
3856
3857 ;
3858 return 0;
3859}
3860_ACEOF
3861ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003862ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003863# Try to create an executable without -o first, disregard a.out.
3864# It will help us diagnose broken compilers, and finding out an intuition
3865# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3867$as_echo_n "checking whether the C compiler works... " >&6; }
3868ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3869
3870# The possible output files:
3871ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_rmfiles=
3874for ac_file in $ac_files
3875do
3876 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3879 esac
3880done
3881rm -f $ac_rmfiles
3882
Matthias Kloseb9621712010-04-24 17:59:49 +00003883if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884case "(($ac_try" in
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3887esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3895# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3896# in a Makefile. We should not override ac_cv_exeext if it was cached,
3897# so that the user can short-circuit this test for compilers unknown to
3898# Autoconf.
3899for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003900do
3901 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003904 ;;
3905 [ab].out )
3906 # We found the default executable, but exeext='' is most
3907 # certainly right.
3908 break;;
3909 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 then :; else
3912 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913 fi
3914 # We set ac_cv_exeext here because the later test for it is not
3915 # safe: cross compilers may not add the suffix if given an `-o'
3916 # argument, so we may need to know it at that point already.
3917 # Even if this section looks crufty: it has the advantage of
3918 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003919 break;;
3920 * )
3921 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 esac
3923done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924test "$ac_cv_exeext" = no && ac_cv_exeext=
3925
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 ac_file=''
3928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003929if test -z "$ac_file"; then :
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931$as_echo "no" >&6; }
3932$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003933sed 's/^/| /' conftest.$ac_ext >&5
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003937as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003938See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003939else
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3944$as_echo_n "checking for C compiler default output file name... " >&6; }
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3946$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003947ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948
Matthias Kloseb9621712010-04-24 17:59:49 +00003949rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003950ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3952$as_echo_n "checking for suffix of executables... " >&6; }
3953if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3966# work properly (i.e., refer to `conftest.exe'), while it won't with
3967# `rm'.
3968for ac_file in conftest.exe conftest conftest.*; do
3969 test -f "$ac_file" || continue
3970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 break;;
3974 * ) break;;
3975 esac
3976done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977else
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003980as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003981See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f conftest conftest$ac_cv_exeext
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986
3987rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003988EXEEXT=$ac_cv_exeext
3989ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991/* end confdefs.h. */
3992#include <stdio.h>
3993int
3994main ()
3995{
3996FILE *f = fopen ("conftest.out", "w");
3997 return ferror (f) || fclose (f) != 0;
3998
3999 ;
4000 return 0;
4001}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004003ac_clean_files="$ac_clean_files conftest.out"
4004# Check that the compiler produces executables we can run. If not, either
4005# the compiler is broken, or we cross compile.
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007$as_echo_n "checking whether we are cross compiling... " >&6; }
4008if test "$cross_compiling" != yes; then
4009 { { ac_try="$ac_link"
4010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
4016 (eval "$ac_link") 2>&5
4017 ac_status=$?
4018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }
4020 if { ac_try='./conftest$ac_cv_exeext'
4021 { { case "(($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_try") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }; }; then
4031 cross_compiling=no
4032 else
4033 if test "$cross_compiling" = maybe; then
4034 cross_compiling=yes
4035 else
4036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004038as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004040See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 fi
4042 fi
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045$as_echo "$cross_compiling" >&6; }
4046
4047rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048ac_clean_files=$ac_clean_files_save
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004051if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 $as_echo_n "(cached) " >&6
4053else
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055/* end confdefs.h. */
4056
4057int
4058main ()
4059{
4060
4061 ;
4062 return 0;
4063}
4064_ACEOF
4065rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004066if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004074 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 for ac_file in conftest.o conftest.obj conftest.*; do
4078 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082 break;;
4083 esac
4084done
4085else
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004087sed 's/^/| /' conftest.$ac_ext >&5
4088
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004091as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004093fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004098OBJEXT=$ac_cv_objext
4099ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4101$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Martin v. Löwis11437992002-04-12 09:54:03 +00004108int
4109main ()
4110{
4111#ifndef __GNUC__
4112 choke me
4113#endif
4114
4115 ;
4116 return 0;
4117}
4118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 ac_compiler_gnu=yes
4121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004125ac_cv_c_compiler_gnu=$ac_compiler_gnu
4126
4127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4129$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4130if test $ac_compiler_gnu = yes; then
4131 GCC=yes
4132else
4133 GCC=
4134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004135ac_test_CFLAGS=${CFLAGS+set}
4136ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4138$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004141else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142 ac_save_c_werror_flag=$ac_c_werror_flag
4143 ac_c_werror_flag=yes
4144 ac_cv_prog_cc_g=no
4145 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149int
4150main ()
4151{
4152
4153 ;
4154 return 0;
4155}
4156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004158 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 CFLAGS=""
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162/* end confdefs.h. */
4163
4164int
4165main ()
4166{
4167
4168 ;
4169 return 0;
4170}
4171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004172if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174else
4175 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178/* end confdefs.h. */
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004188if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196 ac_c_werror_flag=$ac_save_c_werror_flag
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4199$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004202elif test $ac_cv_prog_cc_g = yes; then
4203 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 CFLAGS="-g -O2"
4205 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207 fi
4208else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209 if test "$GCC" = yes; then
4210 CFLAGS="-O2"
4211 else
4212 CFLAGS=
4213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4216$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004221ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004223/* end confdefs.h. */
4224#include <stdarg.h>
4225#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004226struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004227/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4228struct buf { int x; };
4229FILE * (*rcsopen) (struct buf *, struct stat *, int);
4230static char *e (p, i)
4231 char **p;
4232 int i;
4233{
4234 return p[i];
4235}
4236static char *f (char * (*g) (char **, int), char **p, ...)
4237{
4238 char *s;
4239 va_list v;
4240 va_start (v,p);
4241 s = g (p, va_arg (v,int));
4242 va_end (v);
4243 return s;
4244}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004245
4246/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4247 function prototypes and stuff, but not '\xHH' hex character constants.
4248 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4251 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4256 inside strings and character constants. */
4257#define FOO(x) 'x'
4258int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4259
Skip Montanaro6dead952003-09-25 14:50:04 +00004260int test (int i, double x);
4261struct s1 {int (*f) (int a);};
4262struct s2 {int (*f) (double a);};
4263int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4264int argc;
4265char **argv;
4266int
4267main ()
4268{
4269return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4270 ;
4271 return 0;
4272}
4273_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4275 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004276do
4277 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281rm -f core conftest.err conftest.$ac_objext
4282 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004283done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285CC=$ac_save_CC
4286
4287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288# AC_CACHE_VAL
4289case "x$ac_cv_prog_cc_c89" in
4290 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4292$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4295$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004296 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4299$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305ac_ext=c
4306ac_cpp='$CPP $CPPFLAGS'
4307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004311ac_ext=c
4312ac_cpp='$CPP $CPPFLAGS'
4313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4315ac_compiler_gnu=$ac_cv_c_compiler_gnu
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4317$as_echo_n "checking how to run the C preprocessor... " >&6; }
4318# On Suns, sometimes $CPP names a directory.
4319if test -n "$CPP" && test -d "$CPP"; then
4320 CPP=
4321fi
4322if test -z "$CPP"; then
4323 if ${ac_cv_prog_CPP+:} false; then :
4324 $as_echo_n "(cached) " >&6
4325else
4326 # Double quotes because CPP needs to be expanded
4327 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4328 do
4329 ac_preproc_ok=false
4330for ac_c_preproc_warn_flag in '' yes
4331do
4332 # Use a header file that comes with gcc, so configuring glibc
4333 # with a fresh cross-compiler works.
4334 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4335 # <limits.h> exists even on freestanding compilers.
4336 # On the NeXT, cc -E runs the code through the compiler's parser,
4337 # not just through cpp. "Syntax error" is here to catch this case.
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339/* end confdefs.h. */
4340#ifdef __STDC__
4341# include <limits.h>
4342#else
4343# include <assert.h>
4344#endif
4345 Syntax error
4346_ACEOF
4347if ac_fn_c_try_cpp "$LINENO"; then :
4348
4349else
4350 # Broken: fails on valid input.
4351continue
4352fi
4353rm -f conftest.err conftest.i conftest.$ac_ext
4354
4355 # OK, works on sane cases. Now check whether nonexistent headers
4356 # can be detected and how.
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358/* end confdefs.h. */
4359#include <ac_nonexistent.h>
4360_ACEOF
4361if ac_fn_c_try_cpp "$LINENO"; then :
4362 # Broken: success on invalid input.
4363continue
4364else
4365 # Passes both tests.
4366ac_preproc_ok=:
4367break
4368fi
4369rm -f conftest.err conftest.i conftest.$ac_ext
4370
4371done
4372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4373rm -f conftest.i conftest.err conftest.$ac_ext
4374if $ac_preproc_ok; then :
4375 break
4376fi
4377
4378 done
4379 ac_cv_prog_CPP=$CPP
4380
4381fi
4382 CPP=$ac_cv_prog_CPP
4383else
4384 ac_cv_prog_CPP=$CPP
4385fi
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4387$as_echo "$CPP" >&6; }
4388ac_preproc_ok=false
4389for ac_c_preproc_warn_flag in '' yes
4390do
4391 # Use a header file that comes with gcc, so configuring glibc
4392 # with a fresh cross-compiler works.
4393 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4394 # <limits.h> exists even on freestanding compilers.
4395 # On the NeXT, cc -E runs the code through the compiler's parser,
4396 # not just through cpp. "Syntax error" is here to catch this case.
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398/* end confdefs.h. */
4399#ifdef __STDC__
4400# include <limits.h>
4401#else
4402# include <assert.h>
4403#endif
4404 Syntax error
4405_ACEOF
4406if ac_fn_c_try_cpp "$LINENO"; then :
4407
4408else
4409 # Broken: fails on valid input.
4410continue
4411fi
4412rm -f conftest.err conftest.i conftest.$ac_ext
4413
4414 # OK, works on sane cases. Now check whether nonexistent headers
4415 # can be detected and how.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#include <ac_nonexistent.h>
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421 # Broken: success on invalid input.
4422continue
4423else
4424 # Passes both tests.
4425ac_preproc_ok=:
4426break
4427fi
4428rm -f conftest.err conftest.i conftest.$ac_ext
4429
4430done
4431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4432rm -f conftest.i conftest.err conftest.$ac_ext
4433if $ac_preproc_ok; then :
4434
4435else
4436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4438as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4439See \`config.log' for more details" "$LINENO" 5; }
4440fi
4441
4442ac_ext=c
4443ac_cpp='$CPP $CPPFLAGS'
4444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446ac_compiler_gnu=$ac_cv_c_compiler_gnu
4447
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4449$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4450if ${ac_cv_path_GREP+:} false; then :
4451 $as_echo_n "(cached) " >&6
4452else
4453 if test -z "$GREP"; then
4454 ac_path_GREP_found=false
4455 # Loop through the user's path and test for each of PROGNAME-LIST
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_prog in grep ggrep; do
4462 for ac_exec_ext in '' $ac_executable_extensions; do
4463 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4464 as_fn_executable_p "$ac_path_GREP" || continue
4465# Check for GNU ac_path_GREP and select it if it is found.
4466 # Check for GNU $ac_path_GREP
4467case `"$ac_path_GREP" --version 2>&1` in
4468*GNU*)
4469 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4470*)
4471 ac_count=0
4472 $as_echo_n 0123456789 >"conftest.in"
4473 while :
4474 do
4475 cat "conftest.in" "conftest.in" >"conftest.tmp"
4476 mv "conftest.tmp" "conftest.in"
4477 cp "conftest.in" "conftest.nl"
4478 $as_echo 'GREP' >> "conftest.nl"
4479 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4481 as_fn_arith $ac_count + 1 && ac_count=$as_val
4482 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4483 # Best one so far, save it but keep looking for a better one
4484 ac_cv_path_GREP="$ac_path_GREP"
4485 ac_path_GREP_max=$ac_count
4486 fi
4487 # 10*(2^10) chars as input seems more than enough
4488 test $ac_count -gt 10 && break
4489 done
4490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4491esac
4492
4493 $ac_path_GREP_found && break 3
4494 done
4495 done
4496 done
4497IFS=$as_save_IFS
4498 if test -z "$ac_cv_path_GREP"; then
4499 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4500 fi
4501else
4502 ac_cv_path_GREP=$GREP
4503fi
4504
4505fi
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4507$as_echo "$ac_cv_path_GREP" >&6; }
4508 GREP="$ac_cv_path_GREP"
4509
4510
Łukasz Langaa785c872016-09-09 17:37:37 -07004511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4512$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4513if ${ac_cv_path_SED+:} false; then :
4514 $as_echo_n "(cached) " >&6
4515else
4516 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4517 for ac_i in 1 2 3 4 5 6 7; do
4518 ac_script="$ac_script$as_nl$ac_script"
4519 done
4520 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4521 { ac_script=; unset ac_script;}
4522 if test -z "$SED"; then
4523 ac_path_SED_found=false
4524 # Loop through the user's path and test for each of PROGNAME-LIST
4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4526for as_dir in $PATH
4527do
4528 IFS=$as_save_IFS
4529 test -z "$as_dir" && as_dir=.
4530 for ac_prog in sed gsed; do
4531 for ac_exec_ext in '' $ac_executable_extensions; do
4532 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4533 as_fn_executable_p "$ac_path_SED" || continue
4534# Check for GNU ac_path_SED and select it if it is found.
4535 # Check for GNU $ac_path_SED
4536case `"$ac_path_SED" --version 2>&1` in
4537*GNU*)
4538 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4539*)
4540 ac_count=0
4541 $as_echo_n 0123456789 >"conftest.in"
4542 while :
4543 do
4544 cat "conftest.in" "conftest.in" >"conftest.tmp"
4545 mv "conftest.tmp" "conftest.in"
4546 cp "conftest.in" "conftest.nl"
4547 $as_echo '' >> "conftest.nl"
4548 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4549 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4550 as_fn_arith $ac_count + 1 && ac_count=$as_val
4551 if test $ac_count -gt ${ac_path_SED_max-0}; then
4552 # Best one so far, save it but keep looking for a better one
4553 ac_cv_path_SED="$ac_path_SED"
4554 ac_path_SED_max=$ac_count
4555 fi
4556 # 10*(2^10) chars as input seems more than enough
4557 test $ac_count -gt 10 && break
4558 done
4559 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4560esac
4561
4562 $ac_path_SED_found && break 3
4563 done
4564 done
4565 done
4566IFS=$as_save_IFS
4567 if test -z "$ac_cv_path_SED"; then
4568 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4569 fi
4570else
4571 ac_cv_path_SED=$SED
4572fi
4573
4574fi
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4576$as_echo "$ac_cv_path_SED" >&6; }
4577 SED="$ac_cv_path_SED"
4578 rm -f conftest.sed
4579
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004580
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581
4582
Matthias Kloseb9621712010-04-24 17:59:49 +00004583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4584$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004586# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004588 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
4590 case $withval in
4591 no) with_cxx_main=no
4592 MAINCC='$(CC)';;
4593 yes) with_cxx_main=yes
4594 MAINCC='$(CXX)';;
4595 *) with_cxx_main=yes
4596 MAINCC=$withval
4597 if test -z "$CXX"
4598 then
4599 CXX=$withval
4600 fi;;
4601 esac
4602else
4603
4604 with_cxx_main=no
4605 MAINCC='$(CC)'
4606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004607fi
4608
Matthias Kloseb9621712010-04-24 17:59:49 +00004609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4610$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611
4612preset_cxx="$CXX"
4613if test -z "$CXX"
4614then
4615 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004616 gcc) if test -n "$ac_tool_prefix"; then
4617 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4618set dummy ${ac_tool_prefix}g++; ac_word=$2
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620$as_echo_n "checking for $ac_word... " >&6; }
4621if ${ac_cv_path_CXX+:} false; then :
4622 $as_echo_n "(cached) " >&6
4623else
4624 case $CXX in
4625 [\\/]* | ?:[\\/]*)
4626 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4627 ;;
4628 *)
4629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in notfound
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
4634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004636 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638 break 2
4639 fi
4640done
4641 done
4642IFS=$as_save_IFS
4643
4644 ;;
4645esac
4646fi
4647CXX=$ac_cv_path_CXX
4648if test -n "$CXX"; then
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4650$as_echo "$CXX" >&6; }
4651else
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653$as_echo "no" >&6; }
4654fi
4655
4656
4657fi
4658if test -z "$ac_cv_path_CXX"; then
4659 ac_pt_CXX=$CXX
4660 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664if ${ac_cv_path_ac_pt_CXX+:} false; then :
4665 $as_echo_n "(cached) " >&6
4666else
4667 case $ac_pt_CXX in
4668 [\\/]* | ?:[\\/]*)
4669 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4670 ;;
4671 *)
4672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in notfound
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
4683done
4684 done
4685IFS=$as_save_IFS
4686
4687 ;;
4688esac
4689fi
4690ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4691if test -n "$ac_pt_CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4693$as_echo "$ac_pt_CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699 if test "x$ac_pt_CXX" = x; then
4700 CXX="g++"
4701 else
4702 case $cross_compiling:$ac_tool_warned in
4703yes:)
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4706ac_tool_warned=yes ;;
4707esac
4708 CXX=$ac_pt_CXX
4709 fi
4710else
4711 CXX="$ac_cv_path_CXX"
4712fi
4713 ;;
4714 cc) if test -n "$ac_tool_prefix"; then
4715 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4716set dummy ${ac_tool_prefix}c++; ac_word=$2
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004719if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721else
4722 case $CXX in
4723 [\\/]* | ?:[\\/]*)
4724 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4725 ;;
4726 *)
4727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728for as_dir in notfound
4729do
4730 IFS=$as_save_IFS
4731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 break 2
4737 fi
4738done
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004740IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 ;;
4743esac
4744fi
4745CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004746if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4748$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004749else
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754
4755fi
4756if test -z "$ac_cv_path_CXX"; then
4757 ac_pt_CXX=$CXX
4758 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004762if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 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 +00004768 ;;
4769 *)
4770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in notfound
4772do
4773 IFS=$as_save_IFS
4774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 break 2
4780 fi
4781done
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ;;
4786esac
4787fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4789if test -n "$ac_pt_CXX"; then
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4791$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797 if test "x$ac_pt_CXX" = x; then
4798 CXX="c++"
4799 else
4800 case $cross_compiling:$ac_tool_warned in
4801yes:)
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4804ac_tool_warned=yes ;;
4805esac
4806 CXX=$ac_pt_CXX
4807 fi
4808else
4809 CXX="$ac_cv_path_CXX"
4810fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 clang|*/clang) if test -n "$ac_tool_prefix"; then
4813 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4814set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CXX+:} false; then :
4818 $as_echo_n "(cached) " >&6
4819else
4820 case $CXX in
4821 [\\/]* | ?:[\\/]*)
4822 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4823 ;;
4824 *)
4825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in notfound
4827do
4828 IFS=$as_save_IFS
4829 test -z "$as_dir" && as_dir=.
4830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834 break 2
4835 fi
4836done
4837 done
4838IFS=$as_save_IFS
4839
Ned Deilycbfb9a52012-06-23 16:02:19 -07004840 ;;
4841esac
4842fi
4843CXX=$ac_cv_path_CXX
4844if test -n "$CXX"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4846$as_echo "$CXX" >&6; }
4847else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852
4853fi
4854if test -z "$ac_cv_path_CXX"; then
4855 ac_pt_CXX=$CXX
4856 # Extract the first word of "clang++", so it can be a program name with args.
4857set dummy clang++; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_ac_pt_CXX+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 case $ac_pt_CXX in
4864 [\\/]* | ?:[\\/]*)
4865 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4866 ;;
4867 *)
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in notfound
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4887if test -n "$ac_pt_CXX"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4889$as_echo "$ac_pt_CXX" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895 if test "x$ac_pt_CXX" = x; then
4896 CXX="clang++"
4897 else
4898 case $cross_compiling:$ac_tool_warned in
4899yes:)
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4902ac_tool_warned=yes ;;
4903esac
4904 CXX=$ac_pt_CXX
4905 fi
4906else
4907 CXX="$ac_cv_path_CXX"
4908fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004909 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004910 icc|*/icc) if test -n "$ac_tool_prefix"; then
4911 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4912set dummy ${ac_tool_prefix}icpc; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_CXX+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 case $CXX in
4919 [\\/]* | ?:[\\/]*)
4920 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4921 ;;
4922 *)
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in notfound
4925do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934done
4935 done
4936IFS=$as_save_IFS
4937
4938 ;;
4939esac
4940fi
4941CXX=$ac_cv_path_CXX
4942if test -n "$CXX"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4944$as_echo "$CXX" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951fi
4952if test -z "$ac_cv_path_CXX"; then
4953 ac_pt_CXX=$CXX
4954 # Extract the first word of "icpc", so it can be a program name with args.
4955set dummy icpc; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_ac_pt_CXX+:} false; then :
4959 $as_echo_n "(cached) " >&6
4960else
4961 case $ac_pt_CXX in
4962 [\\/]* | ?:[\\/]*)
4963 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4964 ;;
4965 *)
4966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in notfound
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978 done
4979IFS=$as_save_IFS
4980
4981 ;;
4982esac
4983fi
4984ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4985if test -n "$ac_pt_CXX"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4987$as_echo "$ac_pt_CXX" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993 if test "x$ac_pt_CXX" = x; then
4994 CXX="icpc"
4995 else
4996 case $cross_compiling:$ac_tool_warned in
4997yes:)
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4999$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5000ac_tool_warned=yes ;;
5001esac
5002 CXX=$ac_pt_CXX
5003 fi
5004else
5005 CXX="$ac_cv_path_CXX"
5006fi
5007 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005008 esac
5009 if test "$CXX" = "notfound"
5010 then
5011 CXX=""
5012 fi
5013fi
5014if test -z "$CXX"
5015then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005016 if test -n "$ac_tool_prefix"; then
5017 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5018 do
5019 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005023if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025else
5026 if test -n "$CXX"; then
5027 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5028else
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005036 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005038 break 2
5039 fi
5040done
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005043
5044fi
5045fi
5046CXX=$ac_cv_prog_CXX
5047if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5049$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050else
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053fi
5054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005056 test -n "$CXX" && break
5057 done
5058fi
5059if test -z "$CXX"; then
5060 ac_ct_CXX=$CXX
5061 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5062do
5063 # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5068 $as_echo_n "(cached) " >&6
5069else
5070 if test -n "$ac_ct_CXX"; then
5071 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
5078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 ac_cv_prog_ac_ct_CXX="$ac_prog"
5081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082 break 2
5083 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 done
5086IFS=$as_save_IFS
5087
5088fi
5089fi
5090ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5091if test -n "$ac_ct_CXX"; then
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5093$as_echo "$ac_ct_CXX" >&6; }
5094else
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100 test -n "$ac_ct_CXX" && break
5101done
5102
5103 if test "x$ac_ct_CXX" = x; then
5104 CXX="notfound"
5105 else
5106 case $cross_compiling:$ac_tool_warned in
5107yes:)
5108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5110ac_tool_warned=yes ;;
5111esac
5112 CXX=$ac_ct_CXX
5113 fi
5114fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115
5116 if test "$CXX" = "notfound"
5117 then
5118 CXX=""
5119 fi
5120fi
5121if test "$preset_cxx" != "$CXX"
5122then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005123 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125 By default, distutils will build C++ extension modules with \"$CXX\".
5126 If this is not intended, then set CXX on the configure command line.
5127 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005128$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129
5130 By default, distutils will build C++ extension modules with \"$CXX\".
5131 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133fi
5134
5135
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005136MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5137
5138
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5140$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5141cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005142#undef bfin
5143#undef cris
5144#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005145#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef hppa
5147#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005150#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005151#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005153#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005154 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005155#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156# if defined(__x86_64__) && defined(__LP64__)
5157 x86_64-linux-gnu
5158# elif defined(__x86_64__) && defined(__ILP32__)
5159 x86_64-linux-gnux32
5160# elif defined(__i386__)
5161 i386-linux-gnu
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-gnu
5165# else
5166 aarch64-linux-gnu
5167# endif
5168# elif defined(__aarch64__) && defined(__AARCH64EB__)
5169# if defined(__ILP32__)
5170 aarch64_be_ilp32-linux-gnu
5171# else
5172 aarch64_be-linux-gnu
5173# endif
5174# elif defined(__alpha__)
5175 alpha-linux-gnu
5176# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5177# if defined(__ARMEL__)
5178 arm-linux-gnueabihf
5179# else
5180 armeb-linux-gnueabihf
5181# endif
5182# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5183# if defined(__ARMEL__)
5184 arm-linux-gnueabi
5185# else
5186 armeb-linux-gnueabi
5187# endif
5188# elif defined(__hppa__)
5189 hppa-linux-gnu
5190# elif defined(__ia64__)
5191 ia64-linux-gnu
5192# elif defined(__m68k__) && !defined(__mcoldfire__)
5193 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005194# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5195# if _MIPS_SIM == _ABIO32
5196 mipsisa32r6el-linux-gnu
5197# elif _MIPS_SIM == _ABIN32
5198 mipsisa64r6el-linux-gnuabin32
5199# elif _MIPS_SIM == _ABI64
5200 mipsisa64r6el-linux-gnuabi64
5201# else
5202# error unknown platform triplet
5203# endif
5204# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5205# if _MIPS_SIM == _ABIO32
5206 mipsisa32r6-linux-gnu
5207# elif _MIPS_SIM == _ABIN32
5208 mipsisa64r6-linux-gnuabin32
5209# elif _MIPS_SIM == _ABI64
5210 mipsisa64r6-linux-gnuabi64
5211# else
5212# error unknown platform triplet
5213# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214# elif defined(__mips_hard_float) && defined(_MIPSEL)
5215# if _MIPS_SIM == _ABIO32
5216 mipsel-linux-gnu
5217# elif _MIPS_SIM == _ABIN32
5218 mips64el-linux-gnuabin32
5219# elif _MIPS_SIM == _ABI64
5220 mips64el-linux-gnuabi64
5221# else
5222# error unknown platform triplet
5223# endif
5224# elif defined(__mips_hard_float)
5225# if _MIPS_SIM == _ABIO32
5226 mips-linux-gnu
5227# elif _MIPS_SIM == _ABIN32
5228 mips64-linux-gnuabin32
5229# elif _MIPS_SIM == _ABI64
5230 mips64-linux-gnuabi64
5231# else
5232# error unknown platform triplet
5233# endif
5234# elif defined(__or1k__)
5235 or1k-linux-gnu
5236# elif defined(__powerpc__) && defined(__SPE__)
5237 powerpc-linux-gnuspe
5238# elif defined(__powerpc64__)
5239# if defined(__LITTLE_ENDIAN__)
5240 powerpc64le-linux-gnu
5241# else
5242 powerpc64-linux-gnu
5243# endif
5244# elif defined(__powerpc__)
5245 powerpc-linux-gnu
5246# elif defined(__s390x__)
5247 s390x-linux-gnu
5248# elif defined(__s390__)
5249 s390-linux-gnu
5250# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5251 sh4-linux-gnu
5252# elif defined(__sparc__) && defined(__arch64__)
5253 sparc64-linux-gnu
5254# elif defined(__sparc__)
5255 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005256# elif defined(__riscv)
5257# if __riscv_xlen == 32
5258 riscv32-linux-gnu
5259# elif __riscv_xlen == 64
5260 riscv64-linux-gnu
5261# else
5262# error unknown platform triplet
5263# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005264# else
5265# error unknown platform triplet
5266# endif
5267#elif defined(__FreeBSD_kernel__)
5268# if defined(__LP64__)
5269 x86_64-kfreebsd-gnu
5270# elif defined(__i386__)
5271 i386-kfreebsd-gnu
5272# else
5273# error unknown platform triplet
5274# endif
5275#elif defined(__gnu_hurd__)
5276 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005277#elif defined(__APPLE__)
5278 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279#else
5280# error unknown platform triplet
5281#endif
5282
5283EOF
5284
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005285if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005286 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5288$as_echo "$PLATFORM_TRIPLET" >&6; }
5289else
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5291$as_echo "none" >&6; }
5292fi
5293rm -f conftest.c conftest.out
5294
5295if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5296 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5297 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5298 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005299elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5300 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005301fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302
doko@ubuntu.com55532312016-06-14 08:55:19 +02005303if test x$MULTIARCH != x; then
5304 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5305fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005306
5307
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5309$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5310save_LDFLAGS="$LDFLAGS"
5311LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314/* end confdefs.h. */
5315
5316int
5317main ()
5318{
5319
5320 ;
5321 return 0;
5322}
5323_ACEOF
5324if ac_fn_c_try_link "$LINENO"; then :
5325 NO_AS_NEEDED="-Wl,--no-as-needed"
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327$as_echo "yes" >&6; }
5328else
5329 NO_AS_NEEDED=""
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333rm -f core conftest.err conftest.$ac_objext \
5334 conftest$ac_exeext conftest.$ac_ext
5335LDFLAGS="$save_LDFLAGS"
5336
5337
5338
5339# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005340
Matthias Kloseb9621712010-04-24 17:59:49 +00005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5342$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005343if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005344 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005345else
5346 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5347 then ac_cv_path_EGREP="$GREP -E"
5348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005350 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 # Loop through the user's path and test for each of PROGNAME-LIST
5352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 for ac_prog in egrep; do
5358 for ac_exec_ext in '' $ac_executable_extensions; do
5359 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005360 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005361# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 # Check for GNU $ac_path_EGREP
5363case `"$ac_path_EGREP" --version 2>&1` in
5364*GNU*)
5365 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5366*)
5367 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 while :
5370 do
5371 cat "conftest.in" "conftest.in" >"conftest.tmp"
5372 mv "conftest.tmp" "conftest.in"
5373 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5376 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5379 # Best one so far, save it but keep looking for a better one
5380 ac_cv_path_EGREP="$ac_path_EGREP"
5381 ac_path_EGREP_max=$ac_count
5382 fi
5383 # 10*(2^10) chars as input seems more than enough
5384 test $ac_count -gt 10 && break
5385 done
5386 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5387esac
5388
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $ac_path_EGREP_found && break 3
5390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005395 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 +00005396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 ac_cv_path_EGREP=$EGREP
5399fi
5400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 fi
5402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5404$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005406
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5409$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005410if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 $as_echo_n "(cached) " >&6
5412else
5413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005414/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005415#include <stdlib.h>
5416#include <stdarg.h>
5417#include <string.h>
5418#include <float.h>
5419
5420int
5421main ()
5422{
5423
5424 ;
5425 return 0;
5426}
5427_ACEOF
5428if ac_fn_c_try_compile "$LINENO"; then :
5429 ac_cv_header_stdc=yes
5430else
5431 ac_cv_header_stdc=no
5432fi
5433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5434
5435if test $ac_cv_header_stdc = yes; then
5436 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438/* end confdefs.h. */
5439#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005445else
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005448rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450fi
5451
5452if test $ac_cv_header_stdc = yes; then
5453 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456#include <stdlib.h>
5457
5458_ACEOF
5459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5460 $EGREP "free" >/dev/null 2>&1; then :
5461
5462else
5463 ac_cv_header_stdc=no
5464fi
5465rm -f conftest*
5466
5467fi
5468
5469if test $ac_cv_header_stdc = yes; then
5470 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5471 if test "$cross_compiling" = yes; then :
5472 :
5473else
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <ctype.h>
5477#include <stdlib.h>
5478#if ((' ' & 0x0FF) == 0x020)
5479# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5480# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5481#else
5482# define ISLOWER(c) \
5483 (('a' <= (c) && (c) <= 'i') \
5484 || ('j' <= (c) && (c) <= 'r') \
5485 || ('s' <= (c) && (c) <= 'z'))
5486# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5487#endif
5488
5489#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5490int
5491main ()
5492{
5493 int i;
5494 for (i = 0; i < 256; i++)
5495 if (XOR (islower (i), ISLOWER (i))
5496 || toupper (i) != TOUPPER (i))
5497 return 2;
5498 return 0;
5499}
5500_ACEOF
5501if ac_fn_c_try_run "$LINENO"; then :
5502
5503else
5504 ac_cv_header_stdc=no
5505fi
5506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5507 conftest.$ac_objext conftest.beam conftest.$ac_ext
5508fi
5509
5510fi
5511fi
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5513$as_echo "$ac_cv_header_stdc" >&6; }
5514if test $ac_cv_header_stdc = yes; then
5515
5516$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5517
5518fi
5519
5520# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5521for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5522 inttypes.h stdint.h unistd.h
5523do :
5524 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5525ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5526"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005527if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 cat >>confdefs.h <<_ACEOF
5529#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5530_ACEOF
5531
5532fi
5533
5534done
5535
5536
5537
5538 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 +02005539if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 MINIX=yes
5541else
5542 MINIX=
5543fi
5544
5545
5546 if test "$MINIX" = yes; then
5547
5548$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5549
5550
5551$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5552
5553
5554$as_echo "#define _MINIX 1" >>confdefs.h
5555
5556 fi
5557
5558
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5560$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005561if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 $as_echo_n "(cached) " >&6
5563else
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565/* end confdefs.h. */
5566
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005567# define __EXTENSIONS__ 1
5568 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005569int
5570main ()
5571{
5572
5573 ;
5574 return 0;
5575}
5576_ACEOF
5577if ac_fn_c_try_compile "$LINENO"; then :
5578 ac_cv_safe_to_define___extensions__=yes
5579else
5580 ac_cv_safe_to_define___extensions__=no
5581fi
5582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583fi
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5585$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5586 test $ac_cv_safe_to_define___extensions__ = yes &&
5587 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5588
5589 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5590
5591 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5592
5593 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5594
5595 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5596
5597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
Xavier de Gaye95750b12016-07-09 11:05:42 +02005599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5600$as_echo_n "checking for the Android API level... " >&6; }
5601cat >> conftest.c <<EOF
5602#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005603android_api = __ANDROID_API__
5604arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005605#else
5606#error not Android
5607#endif
5608EOF
5609
5610if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005611 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5612 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5614$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005615 if test -z "$ANDROID_API_LEVEL"; then
5616 echo 'Fatal: you must define __ANDROID_API__'
5617 exit 1
5618 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619
5620cat >>confdefs.h <<_ACEOF
5621#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5622_ACEOF
5623
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5626$as_echo_n "checking for the Android arm ABI... " >&6; }
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5628$as_echo "$_arm_arch" >&6; }
5629 if test "$_arm_arch" = 7; then
5630 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5631 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5632 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633else
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5635$as_echo "not Android" >&6; }
5636fi
5637rm -f conftest.c conftest.out
5638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639# Check for unsupported systems
5640case $ac_sys_system/$ac_sys_release in
5641atheos*|Linux*/1*)
5642 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5643 echo See README for details.
5644 exit 1;;
5645esac
5646
5647
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5649$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
5651# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005652if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 withval=$with_suffix;
5654 case $withval in
5655 no) EXEEXT=;;
5656 yes) EXEEXT=.exe;;
5657 *) EXEEXT=$withval;;
5658 esac
5659fi
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5662$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Test whether we're running on a non-case-sensitive system, in which
5665# case we give a warning if no ext is given
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5668$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669if test ! -d CaseSensitiveTestDir; then
5670mkdir CaseSensitiveTestDir
5671fi
5672
5673if test -d casesensitivetestdir
5674then
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5676$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 BUILDEXEEXT=.exe
5678else
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 BUILDEXEEXT=$EXEEXT
5682fi
5683rmdir CaseSensitiveTestDir
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685case $ac_sys_system in
5686hp*|HP*)
5687 case $CC in
5688 cc|*/cc) CC="$CC -Ae";;
5689 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690esac
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5694$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test -z "$LIBRARY"
5696then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005697 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5700$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# LDLIBRARY is the name of the library to link against (as opposed to the
5703# name of the library into which to insert object files). BLDLIBRARY is also
5704# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5705# is blank as the main program is not linked directly against LDLIBRARY.
5706# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5707# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5708# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5709# DLLLIBRARY is the shared (i.e., DLL) library.
5710#
5711# RUNSHARED is used to run shared python without installed libraries
5712#
5713# INSTSONAME is the name of the shared library that will be use to install
5714# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005715#
5716# LDVERSION is the shared library version number, normally the Python version
5717# with the ABI build flags appended.
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
5720
5721
5722
5723
5724
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726LDLIBRARY="$LIBRARY"
5727BLDLIBRARY='$(LDLIBRARY)'
5728INSTSONAME='$(LDLIBRARY)'
5729DLLLIBRARY=''
5730LDLIBRARYDIR=''
5731RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005732LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# LINKCC is the command that links the python executable -- default is $(CC).
5735# If CXX is set, and if it is needed to link a main function that was
5736# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5737# python might then depend on the C++ runtime
5738# This is altered for AIX in order to build the export list before
5739# linking.
5740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5742$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743if test -z "$LINKCC"
5744then
5745 LINKCC='$(PURIFY) $(MAINCC)'
5746 case $ac_sys_system in
5747 AIX*)
5748 exp_extra="\"\""
5749 if test $ac_sys_release -ge 5 -o \
5750 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5751 exp_extra="."
5752 fi
5753 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 QNX*)
5755 # qcc must be used because the other compilers do not
5756 # support -N.
5757 LINKCC=qcc;;
5758 esac
5759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5761$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5764# make sure we default having it set to "no": this is used by
5765# distutils.unixccompiler to know if it should add --enable-new-dtags
5766# to linker command lines, and failing to detect GNU ld simply results
5767# in the same bahaviour as before.
5768
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5770$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771ac_prog=ld
5772if test "$GCC" = yes; then
5773 ac_prog=`$CC -print-prog-name=ld`
5774fi
5775case `"$ac_prog" -V 2>&1 < /dev/null` in
5776 *GNU*)
5777 GNULD=yes;;
5778 *)
5779 GNULD=no;;
5780esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5782$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5785$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 enableval=$enable_shared;
5789fi
5790
5791
5792if test -z "$enable_shared"
5793then
5794 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005795 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 enable_shared="yes";;
5797 *)
5798 enable_shared="no";;
5799 esac
5800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5802$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5805$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005808 enableval=$enable_profiling;
5809fi
5810
5811if test "x$enable_profiling" = xyes; then
5812 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005813 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815/* end confdefs.h. */
5816int main() { return 0; }
5817_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005818if ac_fn_c_try_link "$LINENO"; then :
5819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005823rm -f core conftest.err conftest.$ac_objext \
5824 conftest$ac_exeext conftest.$ac_ext
5825 CC="$ac_save_cc"
5826else
5827 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5830$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832if test "x$enable_profiling" = xyes; then
5833 BASECFLAGS="-pg $BASECFLAGS"
5834 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5838$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
5840# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5841# library that we build, but we do not want to link against it (we
5842# will find it with a -framework option). For this reason there is an
5843# extra variable BLDLIBRARY against which Python and the extension
5844# modules are linked, BLDLIBRARY. This is normally the same as
5845# LDLIBRARY, but empty for MacOSX framework builds.
5846if test "$enable_framework"
5847then
5848 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005849 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 BLDLIBRARY=''
5851else
5852 BLDLIBRARY='$(LDLIBRARY)'
5853fi
5854
5855# Other platforms follow
5856if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005857 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861 case $ac_sys_system in
5862 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005863 LDLIBRARY='libpython$(LDVERSION).dll.a'
5864 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ;;
5866 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005867 LDLIBRARY='libpython$(LDVERSION).so'
5868 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005869 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005871 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005872 then
5873 PY3LIBRARY=libpython3.so
5874 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005876 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).so'
5878 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005879 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005881 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005882 then
5883 PY3LIBRARY=libpython3.so
5884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 hp*|HP*)
5887 case `uname -m` in
5888 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
5891 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).dylib'
5900 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005901 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005903 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005906 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 esac
5909else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005910 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 case $ac_sys_system in
5912 CYGWIN*)
5913 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 esac
5917fi
5918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005919if test "$cross_compiling" = yes; then
5920 RUNSHARED=
5921fi
5922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5924$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005927if test -n "$ac_tool_prefix"; then
5928 for ac_prog in ar aal
5929 do
5930 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005934if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 if test -n "$AR"; then
5938 ac_cv_prog_AR="$AR" # Let the user override the test.
5939else
5940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943 IFS=$as_save_IFS
5944 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 break 2
5950 fi
5951done
Matthias Kloseb9621712010-04-24 17:59:49 +00005952 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953IFS=$as_save_IFS
5954
5955fi
5956fi
5957AR=$ac_cv_prog_AR
5958if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5960$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961else
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964fi
5965
5966
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005967 test -n "$AR" && break
5968 done
5969fi
5970if test -z "$AR"; then
5971 ac_ct_AR=$AR
5972 for ac_prog in ar aal
5973do
5974 # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_prog_ac_ct_AR+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980else
5981 if test -n "$ac_ct_AR"; then
5982 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
5989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005991 ac_cv_prog_ac_ct_AR="$ac_prog"
5992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993 break 2
5994 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005996 done
5997IFS=$as_save_IFS
5998
5999fi
6000fi
6001ac_ct_AR=$ac_cv_prog_ac_ct_AR
6002if test -n "$ac_ct_AR"; then
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6004$as_echo "$ac_ct_AR" >&6; }
6005else
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011 test -n "$ac_ct_AR" && break
6012done
6013
6014 if test "x$ac_ct_AR" = x; then
6015 AR="ar"
6016 else
6017 case $cross_compiling:$ac_tool_warned in
6018yes:)
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6021ac_tool_warned=yes ;;
6022esac
6023 AR=$ac_ct_AR
6024 fi
6025fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026
6027
6028# tweak ARFLAGS only if the user didn't set it on the command line
6029
6030if test -z "$ARFLAGS"
6031then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006032 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033fi
6034
doko@ubuntu.com58844492012-06-30 18:25:32 +02006035if test -n "$ac_tool_prefix"; then
6036 for ac_prog in readelf
6037 do
6038 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_prog_READELF+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044else
6045 if test -n "$READELF"; then
6046 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6047else
6048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
6053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006055 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057 break 2
6058 fi
6059done
6060 done
6061IFS=$as_save_IFS
6062
6063fi
6064fi
6065READELF=$ac_cv_prog_READELF
6066if test -n "$READELF"; then
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6068$as_echo "$READELF" >&6; }
6069else
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075 test -n "$READELF" && break
6076 done
6077fi
6078if test -z "$READELF"; then
6079 ac_ct_READELF=$READELF
6080 for ac_prog in readelf
6081do
6082 # Extract the first word of "$ac_prog", so it can be a program name with args.
6083set dummy $ac_prog; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6087 $as_echo_n "(cached) " >&6
6088else
6089 if test -n "$ac_ct_READELF"; then
6090 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6091else
6092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6093for as_dir in $PATH
6094do
6095 IFS=$as_save_IFS
6096 test -z "$as_dir" && as_dir=.
6097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006099 ac_cv_prog_ac_ct_READELF="$ac_prog"
6100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6101 break 2
6102 fi
6103done
6104 done
6105IFS=$as_save_IFS
6106
6107fi
6108fi
6109ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6110if test -n "$ac_ct_READELF"; then
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6112$as_echo "$ac_ct_READELF" >&6; }
6113else
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6115$as_echo "no" >&6; }
6116fi
6117
6118
6119 test -n "$ac_ct_READELF" && break
6120done
6121
6122 if test "x$ac_ct_READELF" = x; then
6123 READELF=":"
6124 else
6125 case $cross_compiling:$ac_tool_warned in
6126yes:)
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6129ac_tool_warned=yes ;;
6130esac
6131 READELF=$ac_ct_READELF
6132 fi
6133fi
6134
6135if test "$cross_compiling" = yes; then
6136 case "$READELF" in
6137 readelf|:)
6138 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6139 ;;
6140 esac
6141fi
6142
6143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006146hp*|HP*)
6147 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 if test -z "$INSTALL"
6149 then
6150 INSTALL="${srcdir}/install-sh -c"
6151 fi
6152esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153# Find a good install program. We prefer a C program (faster),
6154# so one script is as good as another. But avoid the broken or
6155# incompatible versions:
6156# SysV /etc/install, /usr/sbin/install
6157# SunOS /usr/etc/install
6158# IRIX /sbin/install
6159# AIX /bin/install
6160# AmigaOS /C/install, which installs bootblocks on floppy discs
6161# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6162# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6163# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6164# OS/2's system install, which has a completely different semantic
6165# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006166# Reject install programs that cannot install multiple files.
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6168$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006170if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172else
6173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 # Account for people who put trailing slashes in PATH elements.
6179case $as_dir/ in #((
6180 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 /usr/ucb/* ) ;;
6184 *)
6185 # OSF1 and SCO ODT 3.0 have their own names for install.
6186 # Don't use installbsd from OSF since it installs stuff as root
6187 # by default.
6188 for ac_prog in ginstall scoinst install; do
6189 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006190 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 if test $ac_prog = install &&
6192 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6193 # AIX install. It has an incompatible calling convention.
6194 :
6195 elif test $ac_prog = install &&
6196 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6197 # program-specific install script used by HP pwplus--don't use.
6198 :
6199 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 rm -rf conftest.one conftest.two conftest.dir
6201 echo one > conftest.one
6202 echo two > conftest.two
6203 mkdir conftest.dir
6204 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6205 test -s conftest.one && test -s conftest.two &&
6206 test -s conftest.dir/conftest.one &&
6207 test -s conftest.dir/conftest.two
6208 then
6209 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6210 break 3
6211 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 fi
6213 fi
6214 done
6215 done
6216 ;;
6217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006218
6219 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220IFS=$as_save_IFS
6221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223
6224fi
6225 if test "${ac_cv_path_install+set}" = set; then
6226 INSTALL=$ac_cv_path_install
6227 else
6228 # As a last resort, use the slow shell script. Don't cache a
6229 # value for INSTALL within a source directory, because that will
6230 # break other packages using the cache if that directory is
6231 # removed, or if the value is a relative name.
6232 INSTALL=$ac_install_sh
6233 fi
6234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6236$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
6238# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6239# It thinks the first close brace ends the variable substitution.
6240test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6241
6242test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6243
6244test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6245
Matthias Klose93a0ef12012-03-15 18:08:34 +01006246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6247$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6248if test -z "$MKDIR_P"; then
6249 if ${ac_cv_path_mkdir+:} false; then :
6250 $as_echo_n "(cached) " >&6
6251else
6252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6254do
6255 IFS=$as_save_IFS
6256 test -z "$as_dir" && as_dir=.
6257 for ac_prog in mkdir gmkdir; do
6258 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006259 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006260 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6261 'mkdir (GNU coreutils) '* | \
6262 'mkdir (coreutils) '* | \
6263 'mkdir (fileutils) '4.1*)
6264 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6265 break 3;;
6266 esac
6267 done
6268 done
6269 done
6270IFS=$as_save_IFS
6271
6272fi
6273
6274 test -d ./--version && rmdir ./--version
6275 if test "${ac_cv_path_mkdir+set}" = set; then
6276 MKDIR_P="$ac_cv_path_mkdir -p"
6277 else
6278 # As a last resort, use the slow shell script. Don't cache a
6279 # value for MKDIR_P within a source directory, because that will
6280 # break other packages using the cache if that directory is
6281 # removed, or if the value is a relative name.
6282 MKDIR_P="$ac_install_sh -d"
6283 fi
6284fi
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6286$as_echo "$MKDIR_P" >&6; }
6287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
6289# Not every filesystem supports hard links
6290
6291if test -z "$LN" ; then
6292 case $ac_sys_system in
6293 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294 *) LN=ln;;
6295 esac
6296fi
6297
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006298# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006299
6300ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6304$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
6306# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006307if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 withval=$with_pydebug;
6309if test "$withval" != no
6310then
6311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6315$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006317 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006318else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320fi
6321else
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324fi
6325
6326
T. Woutersddbfa2c2017-05-23 01:30:49 +02006327# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6328# the ABI. This allows enabling assertions without changing the ABI.
6329assertions='false'
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6331$as_echo_n "checking for --with-assertions... " >&6; }
6332
6333# Check whether --with-assertions was given.
6334if test "${with_assertions+set}" = set; then :
6335 withval=$with_assertions;
6336if test "$withval" != no
6337then
6338 assertions='true'
6339fi
6340fi
6341
6342if test "$assertions" = 'true'; then
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6344$as_echo "yes" >&6; }
6345elif test "$Py_DEBUG" = 'true'; then
6346 assertions='true'
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6348$as_echo "implied by --with-pydebug" >&6; }
6349else
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6351$as_echo "no" >&6; }
6352fi
6353
Brett Cannon63d98bc2016-09-06 17:12:40 -07006354# Enable optimization flags
6355
6356
6357Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6359$as_echo_n "checking for --enable-optimizations... " >&6; }
6360# Check whether --enable-optimizations was given.
6361if test "${enable_optimizations+set}" = set; then :
6362 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006363if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006364then
6365 Py_OPT='true'
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6367$as_echo "yes" >&6; };
6368else
6369 Py_OPT='false'
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; };
6372fi
6373else
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006379 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6380 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006381 # 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 +00006382 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006383 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006384 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006385 DEF_MAKE_RULE="build_all"
6386else
6387 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006388 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389 DEF_MAKE_RULE="all"
6390fi
6391
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006392# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6394$as_echo_n "checking for --with-lto... " >&6; }
6395
6396# Check whether --with-lto was given.
6397if test "${with_lto+set}" = set; then :
6398 withval=$with_lto;
6399if test "$withval" != no
6400then
6401 Py_LTO='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
6404else
6405 Py_LTO='false'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; };
6408fi
6409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414if test "$Py_LTO" = 'true' ; then
6415 case $CC in
6416 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006417 case $ac_sys_system in
6418 Darwin*)
6419 # Any changes made here should be reflected in the GCC+Darwin case below
6420 LTOFLAGS="-flto -Wl,-export_dynamic"
6421 ;;
6422 *)
6423 LTOFLAGS="-flto"
6424 ;;
6425 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006426 ;;
6427 *gcc*)
6428 case $ac_sys_system in
6429 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006430 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006431 ;;
6432 *)
6433 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6434 ;;
6435 esac
6436 ;;
6437 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006438
6439 if test "$ac_cv_prog_cc_g" = "yes"
6440 then
6441 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6442 # to get debug symbols.
6443 LTOFLAGS="$LTOFLAGS -g"
6444 fi
6445
octaviansoldea4c814012017-09-08 12:14:33 -07006446 CFLAGS="$CFLAGS $LTOFLAGS"
6447 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448fi
6449
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006451
6452
6453
6454
6455
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456# Make this work on systems where llvm tools are not installed with their
6457# normal names in the default $PATH (ie: Ubuntu). They exist under the
6458# non-suffixed name in their versioned llvm directory.
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
Zachary Ware5af85642015-12-21 12:09:17 -06006474
Gregory P. Smith799520c2016-09-07 16:10:00 -07006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6476$as_echo_n "checking target system type... " >&6; }
6477if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478 $as_echo_n "(cached) " >&6
6479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 if test "x$target_alias" = x; then
6481 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6485fi
6486
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6489$as_echo "$ac_cv_target" >&6; }
6490case $ac_cv_target in
6491*-*-*) ;;
6492*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6493esac
6494target=$ac_cv_target
6495ac_save_IFS=$IFS; IFS='-'
6496set x $ac_cv_target
6497shift
6498target_cpu=$1
6499target_vendor=$2
6500shift; shift
6501# Remember, the first character of IFS is used to create $*,
6502# except with old shells:
6503target_os=$*
6504IFS=$ac_save_IFS
6505case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6506
6507
6508# The aliases save the names the user supplied, while $host etc.
6509# will get canonicalized.
6510test -n "$target_alias" &&
6511 test "$program_prefix$program_suffix$program_transform_name" = \
6512 NONENONEs,x,x, &&
6513 program_prefix=${target_alias}-
6514# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6515set dummy $target_alias-llvm-profdata; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 case $LLVM_PROFDATA in
6522 [\\/]* | ?:[\\/]*)
6523 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6524 ;;
6525 *)
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006533 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535 break 2
6536 fi
6537done
6538 done
6539IFS=$as_save_IFS
6540
Gregory P. Smith799520c2016-09-07 16:10:00 -07006541 ;;
6542esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6545if test -n "$LLVM_PROFDATA"; then
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6547$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6555 if test "$build" = "$target"; then
6556 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6557 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6558set dummy llvm-profdata; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $ac_pt_LLVM_PROFDATA in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
6571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6576 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
6584 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6585 ;;
6586esac
6587fi
6588ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6589if test -n "$ac_pt_LLVM_PROFDATA"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6591$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6598 else
6599 LLVM_PROFDATA="''"
6600 fi
6601else
6602 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6603fi
6604
6605
6606if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6607then
6608 LLVM_PROF_FOUND="found"
6609else
6610 LLVM_PROF_FOUND="not-found"
6611fi
6612if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6613then
6614 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6615 if test -n "${found_llvm_profdata}"
6616 then
6617 # llvm-profdata isn't directly in $PATH in some cases.
6618 # https://apple.stackexchange.com/questions/197053/
6619 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6620 LLVM_PROF_FOUND=found
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6622$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6623 fi
6624fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625LLVM_PROF_ERR=no
6626case $CC in
6627 *clang*)
6628 # Any changes made here should be reflected in the GCC+Darwin case below
6629 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6630 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006631 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6633 if test $LLVM_PROF_FOUND = not-found
6634 then
6635 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006636 if test "${REQUIRE_PGO}" = "yes"
6637 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006638 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 -07006639 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 fi
6641 ;;
6642 *gcc*)
6643 case $ac_sys_system in
6644 Darwin*)
6645 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 then
6651 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "${REQUIRE_PGO}" = "yes"
6653 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006654 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 -07006655 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656 fi
6657 ;;
6658 *)
6659 PGO_PROF_GEN_FLAG="-fprofile-generate"
6660 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6661 LLVM_PROF_MERGER="true"
6662 LLVM_PROF_FILE=""
6663 ;;
6664 esac
6665 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006666 *icc*)
6667 PGO_PROF_GEN_FLAG="-prof-gen"
6668 PGO_PROF_USE_FLAG="-prof-use"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672esac
6673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6675# merged with this chunk of code?
6676
6677# Optimizer/debugger flags
6678# ------------------------
6679# (The following bit of code is complicated enough - please keep things
6680# indented properly. Just pretend you're editing Python code. ;-)
6681
6682# There are two parallel sets of case statements below, one that checks to
6683# see if OPT was set and one that does BASECFLAGS setting based upon
6684# compiler and platform. BASECFLAGS tweaks need to be made even if the
6685# user set OPT.
6686
6687# tweak OPT based on compiler and platform, only if the user didn't set
6688# it on the command line
6689
Victor Stinner9ed34a82017-05-02 22:35:58 +02006690
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006691if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692then
6693 case $GCC in
6694 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6696 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6697 WRAP="-fwrapv"
6698 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006699
Stefan Krahaf04ff22011-12-08 22:20:31 +01006700 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006701 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006702 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006703 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006704 *)
6705 if $CC --version 2>&1 | grep -q clang
6706 then
6707 cc_is_clang=1
6708 else
6709 cc_is_clang=
6710 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006711 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006712
Victor Stinner35f3d242017-04-21 12:35:24 +02006713 if test -n "${cc_is_clang}"
6714 then
6715 # Clang also needs -fwrapv
6716 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006717 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6718 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006719 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 fi
6721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722 case $ac_cv_prog_cc_g in
6723 yes)
6724 if test "$Py_DEBUG" = 'true' ; then
6725 # Optimization messes up debuggers, so turn it off for
6726 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006727 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006728 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006729 else
Victor Stinner28205b22017-04-21 11:24:34 +02006730 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006731 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 else
Victor Stinner28205b22017-04-21 11:24:34 +02006733 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734 fi
6735 ;;
6736 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006737 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ;;
6739 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 case $ac_sys_system in
6742 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6743 ;;
6744 esac
6745 ;;
6746
6747 *)
6748 OPT="-O"
6749 ;;
6750 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
6752
6753
6754
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756# The -arch flags for universal builds on OSX
6757UNIVERSAL_ARCH_FLAGS=
6758
6759
6760# tweak BASECFLAGS based on compiler and platform
6761case $GCC in
6762yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006763 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006764
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6766$as_echo_n "checking for -Wextra... " >&6; }
6767 ac_save_cc="$CC"
6768 CC="$CC -Wextra -Werror"
6769 if ${ac_cv_extra_warnings+:} false; then :
6770 $as_echo_n "(cached) " >&6
6771else
6772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773/* end confdefs.h. */
6774
6775
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783
6784_ACEOF
6785if ac_fn_c_try_compile "$LINENO"; then :
6786
6787 ac_cv_extra_warnings=yes
6788
6789else
6790
6791 ac_cv_extra_warnings=no
6792
6793fi
6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6795fi
6796
6797 CC="$ac_save_cc"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6799$as_echo "$ac_cv_extra_warnings" >&6; }
6800
6801 if test $ac_cv_extra_warnings = yes
6802 then
6803 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6804 fi
6805
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 # Python doesn't violate C99 aliasing rules, but older versions of
6807 # GCC produce warnings for legal Python code. Enable
6808 # -fno-strict-aliasing on versions of GCC that support but produce
6809 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6811$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 ac_save_cc="$CC"
6813 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006814 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006815 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006820
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006822int
6823main ()
6824{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006825
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006826 ;
6827 return 0;
6828}
Matthias Kloseb159a552010-04-25 21:00:44 +00006829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006831if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
6833 CC="$ac_save_cc -fstrict-aliasing"
6834 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836/* end confdefs.h. */
6837
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006838 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006839int
6840main ()
6841{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006842double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843 ;
6844 return 0;
6845}
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
6850 ac_cv_no_strict_aliasing=no
6851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852else
Matthias Kloseb159a552010-04-25 21:00:44 +00006853
6854 ac_cv_no_strict_aliasing=yes
6855
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006858
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859else
Matthias Kloseb159a552010-04-25 21:00:44 +00006860
6861 ac_cv_no_strict_aliasing=no
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006865fi
6866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6870$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006871 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 then
6873 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6874 fi
6875
Zachary Ware5af85642015-12-21 12:09:17 -06006876 # ICC doesn't recognize the option, but only emits a warning
6877 ## XXX does it emit an unused result warning and can it be disabled?
6878 case "$CC" in
6879 *icc*)
6880 ac_cv_disable_unused_result_warning=no
6881 ;;
6882 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6884$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6885 ac_save_cc="$CC"
6886 CC="$CC -Wunused-result -Werror"
6887 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006888 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006889 $as_echo_n "(cached) " >&6
6890else
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h. */
6893
6894
6895int
6896main ()
6897{
6898
6899 ;
6900 return 0;
6901}
6902
6903_ACEOF
6904if ac_fn_c_try_compile "$LINENO"; then :
6905
6906 ac_cv_disable_unused_result_warning=yes
6907
6908else
6909
6910 ac_cv_disable_unused_result_warning=no
6911
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914fi
6915
6916 CFLAGS="$save_CFLAGS"
6917 CC="$ac_save_cc"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6919$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006920 ;;
6921 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006922
6923 if test $ac_cv_disable_unused_result_warning = yes
6924 then
6925 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006926 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6927 fi
6928
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6930$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wunused-parameter -Werror"
6933 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938
6939
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
6947
6948_ACEOF
6949if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 ac_cv_disable_unused_parameter_warning=yes
6952
6953else
6954
6955 ac_cv_disable_unused_parameter_warning=no
6956
6957fi
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959fi
6960
6961 CC="$ac_save_cc"
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6963$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6964
6965 if test $ac_cv_disable_unused_parameter_warning = yes
6966 then
6967 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6968 fi
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6971$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6972 ac_save_cc="$CC"
6973 CC="$CC -Wmissing-field-initializers -Werror"
6974 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6975 $as_echo_n "(cached) " >&6
6976else
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h. */
6979
6980
6981int
6982main ()
6983{
6984
6985 ;
6986 return 0;
6987}
6988
6989_ACEOF
6990if ac_fn_c_try_compile "$LINENO"; then :
6991
6992 ac_cv_disable_missing_field_initializers=yes
6993
6994else
6995
6996 ac_cv_disable_missing_field_initializers=no
6997
6998fi
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7000fi
7001
7002 CC="$ac_save_cc"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7004$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7005
7006 if test $ac_cv_disable_missing_field_initializers = yes
7007 then
7008 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007009 fi
7010
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7012$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7013 ac_save_cc="$CC"
7014 CC="$CC -Wsign-compare"
7015 save_CFLAGS="$CFLAGS"
7016 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_enable_sign_compare_warning=yes
7035
7036else
7037
7038 ac_cv_enable_sign_compare_warning=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CFLAGS="$save_CFLAGS"
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7047$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7048
7049 if test $ac_cv_enable_sign_compare_warning = yes
7050 then
7051 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7052 fi
7053
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7055$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7056 ac_save_cc="$CC"
7057 CC="$CC -Wunreachable-code"
7058 save_CFLAGS="$CFLAGS"
7059 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065
7066int
7067main ()
7068{
7069
7070 ;
7071 return 0;
7072}
7073
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076
7077 ac_cv_enable_unreachable_code_warning=yes
7078
7079else
7080
7081 ac_cv_enable_unreachable_code_warning=no
7082
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086
7087 CFLAGS="$save_CFLAGS"
7088 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007089
7090 # Don't enable unreachable code warning in debug mode, since it usually
7091 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007092 # Issue #24324: Unfortunately, the unreachable code warning does not work
7093 # correctly on gcc and has been silently removed from the compiler.
7094 # It is supported on clang but on OS X systems gcc may be an alias
7095 # for clang. Try to determine if the compiler is not really gcc and,
7096 # if so, only then enable the warning.
7097 if test $ac_cv_enable_unreachable_code_warning = yes && \
7098 test "$Py_DEBUG" != "true" && \
7099 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007100 then
7101 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007102 else
7103 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007104 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7106$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007107
INADA Naokie3364842018-06-05 20:40:53 +09007108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7109$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7110 ac_save_cc="$CC"
7111 CC="$CC -Werror -Wstrict-prototypes"
7112 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118
7119int
7120main ()
7121{
7122
7123 ;
7124 return 0;
7125}
7126
7127_ACEOF
7128if ac_fn_c_try_compile "$LINENO"; then :
7129
7130 ac_cv_enable_strict_prototypes_warning=yes
7131
7132else
7133
7134 ac_cv_enable_strict_prototypes_warning=no
7135
7136fi
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138fi
7139
7140 CC="$ac_save_cc"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7142$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7143
7144 if test $ac_cv_enable_strict_prototypes_warning = yes
7145 then
7146 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7147 fi
7148
Victor Stinner193ee0a2017-02-06 14:24:00 +01007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7150$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7151 ac_save_cc="$CC"
7152 CC="$CC -Werror=implicit-function-declaration"
7153 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_implicit_function_declaration_error=yes
7172
7173else
7174
7175 ac_cv_enable_implicit_function_declaration_error=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CC="$ac_save_cc"
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7183$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7184
7185 if test $ac_cv_enable_implicit_function_declaration_error = yes
7186 then
7187 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7188 fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7191 # support. Without this, treatment of subnormals doesn't follow
7192 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007193 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194 alpha*)
7195 BASECFLAGS="$BASECFLAGS -mieee"
7196 ;;
7197 esac
7198
7199 case $ac_sys_system in
7200 SCO_SV*)
7201 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7202 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007203
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 Darwin*)
7205 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7206 # used to be here, but non-Apple gcc doesn't accept them.
7207 if test "${CC}" = gcc
7208 then
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007210$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007211 case "${UNIVERSALSDK}" in
7212 */MacOSX10.4u.sdk)
7213 # Build using 10.4 SDK, force usage of gcc when the
7214 # compiler is gcc, otherwise the user will get very
7215 # confusing error messages when building on OSX 10.6
7216 CC=gcc-4.0
7217 CPP=cpp-4.0
7218 ;;
7219 esac
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007221$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223
Ned Deily87adb6e2013-10-18 21:09:56 -07007224 if test "${enable_universalsdk}"
7225 then
7226 case "$UNIVERSAL_ARCHS" in
7227 32-bit)
7228 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7229 LIPO_32BIT_FLAGS=""
7230 ARCH_RUN_32BIT=""
7231 ;;
7232 64-bit)
7233 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7234 LIPO_32BIT_FLAGS=""
7235 ARCH_RUN_32BIT="true"
7236 ;;
7237 all)
7238 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7239 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7240 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7241 ;;
7242 intel)
7243 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7244 LIPO_32BIT_FLAGS="-extract i386"
7245 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7246 ;;
7247 intel-32)
7248 UNIVERSAL_ARCH_FLAGS="-arch i386"
7249 LIPO_32BIT_FLAGS=""
7250 ARCH_RUN_32BIT=""
7251 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007252 intel-64)
7253 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7254 LIPO_32BIT_FLAGS=""
7255 ARCH_RUN_32BIT="true"
7256 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007257 3-way)
7258 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7259 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7260 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7261 ;;
7262 *)
7263 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7264 ;;
7265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 if test "${UNIVERSALSDK}" != "/"
7268 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007269 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7270 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007271 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007272 else
7273 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7274 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007275 fi
7276 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277
Ned Deily87adb6e2013-10-18 21:09:56 -07007278 # Calculate an appropriate deployment target for this build:
7279 # The deployment target value is used explicitly to enable certain
7280 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007281 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 # component of the string returned by distutils.get_platform().
7283 #
7284 # Use the value from:
7285 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7286 # 2. the operating system version of the build machine if >= 10.6
7287 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7288 # below to pick either 10.3, 10.4, or 10.5 as the target.
7289 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7292$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007293 cur_target_major=`sw_vers -productVersion | \
7294 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7295 cur_target_minor=`sw_vers -productVersion | \
7296 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7297 cur_target="${cur_target_major}.${cur_target_minor}"
7298 if test ${cur_target_major} -eq 10 && \
7299 test ${cur_target_minor} -ge 3 && \
7300 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 then
Ned Deily36820b62014-06-25 13:44:22 -07007302 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 cur_target=10.3
7304 if test ${enable_universalsdk}
7305 then
7306 case "$UNIVERSAL_ARCHS" in
7307 all|3-way|intel|64-bit)
7308 # These configurations were first supported in 10.5
7309 cur_target='10.5'
7310 ;;
7311 esac
7312 else
7313 if test `/usr/bin/arch` = "i386"
7314 then
7315 # 10.4 was the first release to support Intel archs
7316 cur_target="10.4"
7317 fi
7318 fi
7319 fi
7320 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007321
Ned Deily87adb6e2013-10-18 21:09:56 -07007322 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7323 # environment with a value that is the same as what we'll use
7324 # in the Makefile to ensure that we'll get the same compiler
7325 # environment during configure and build time.
7326 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7327 export MACOSX_DEPLOYMENT_TARGET
7328 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7330$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 # end of Darwin* tests
7333 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334 esac
7335 ;;
7336
7337*)
7338 case $ac_sys_system in
7339 OpenUNIX*|UnixWare*)
7340 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7341 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 SCO_SV*)
7343 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7344 ;;
7345 esac
7346 ;;
7347esac
7348
Zachary Ware5af85642015-12-21 12:09:17 -06007349# ICC needs -fp-model strict or floats behave badly
7350case "$CC" in
7351*icc*)
7352 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7353 ;;
7354esac
7355
T. Woutersddbfa2c2017-05-23 01:30:49 +02007356if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007357 :
7358else
7359 OPT="-DNDEBUG $OPT"
7360fi
7361
7362if test "$ac_arch_flags"
7363then
7364 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7365fi
7366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367# On some compilers, pthreads are available without further options
7368# (e.g. MacOS X). On some of these systems, the compiler will not
7369# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7370# So we have to see first whether pthreads are available without
7371# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7373$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378 ac_cv_pthread_is_default=no
7379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381/* end confdefs.h. */
7382
Stefan Krah7dba5942012-11-22 22:49:11 +01007383#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384#include <pthread.h>
7385
7386void* routine(void* p){return NULL;}
7387
7388int main(){
7389 pthread_t p;
7390 if(pthread_create(&p,NULL,routine,NULL)!=0)
7391 return 1;
7392 (void)pthread_detach(p);
7393 return 0;
7394}
7395
7396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007397if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
7399 ac_cv_pthread_is_default=yes
7400 ac_cv_kthread=no
7401 ac_cv_pthread=no
7402
7403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408fi
7409
7410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411fi
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7414$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415
7416
7417if test $ac_cv_pthread_is_default = yes
7418then
7419 ac_cv_kpthread=no
7420else
7421# -Kpthread, if available, provides the right #defines
7422# and linker options to make pthread_create available
7423# Some compilers won't report that they do not support -Kpthread,
7424# so we need to run a program to see whether it really made the
7425# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7427$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007428if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430else
7431 ac_save_cc="$CC"
7432CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 ac_cv_kpthread=no
7435else
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437/* end confdefs.h. */
7438
Stefan Krah7dba5942012-11-22 22:49:11 +01007439#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440#include <pthread.h>
7441
7442void* routine(void* p){return NULL;}
7443
7444int main(){
7445 pthread_t p;
7446 if(pthread_create(&p,NULL,routine,NULL)!=0)
7447 return 1;
7448 (void)pthread_detach(p);
7449 return 0;
7450}
7451
7452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007453if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 ac_cv_kpthread=yes
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460fi
7461
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462CC="$ac_save_cc"
7463fi
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7466$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
7468
7469if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7470then
7471# -Kthread, if available, provides the right #defines
7472# and linker options to make pthread_create available
7473# Some compilers won't report that they do not support -Kthread,
7474# so we need to run a program to see whether it really made the
7475# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7477$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
7481 ac_save_cc="$CC"
7482CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 ac_cv_kthread=no
7485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487/* end confdefs.h. */
7488
Stefan Krah7dba5942012-11-22 22:49:11 +01007489#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490#include <pthread.h>
7491
7492void* routine(void* p){return NULL;}
7493
7494int main(){
7495 pthread_t p;
7496 if(pthread_create(&p,NULL,routine,NULL)!=0)
7497 return 1;
7498 (void)pthread_detach(p);
7499 return 0;
7500}
7501
7502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_kthread=yes
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512CC="$ac_save_cc"
7513fi
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7516$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
7519if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7520then
7521# -pthread, if available, provides the right #defines
7522# and linker options to make pthread_create available
7523# Some compilers won't report that they do not support -pthread,
7524# so we need to run a program to see whether it really made the
7525# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7527$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007528if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
7531 ac_save_cc="$CC"
7532CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007533if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 ac_cv_pthread=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 ac_cv_pthread=yes
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562CC="$ac_save_cc"
7563fi
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7566$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
7569# If we have set a CC compiler flag for thread support then
7570# check if it works for CXX, too.
7571ac_cv_cxx_thread=no
7572if test ! -z "$CXX"
7573then
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7575$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576ac_save_cxx="$CXX"
7577
7578if test "$ac_cv_kpthread" = "yes"
7579then
7580 CXX="$CXX -Kpthread"
7581 ac_cv_cxx_thread=yes
7582elif test "$ac_cv_kthread" = "yes"
7583then
7584 CXX="$CXX -Kthread"
7585 ac_cv_cxx_thread=yes
7586elif test "$ac_cv_pthread" = "yes"
7587then
7588 CXX="$CXX -pthread"
7589 ac_cv_cxx_thread=yes
7590fi
7591
7592if test $ac_cv_cxx_thread = yes
7593then
7594 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7595 $CXX -c conftest.$ac_ext 2>&5
7596 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7597 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7598 then
7599 ac_cv_cxx_thread=yes
7600 else
7601 ac_cv_cxx_thread=no
7602 fi
7603 rm -fr conftest*
7604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7606$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
7608CXX="$ac_save_cxx"
7609
7610
7611# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7613$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007614if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618/* end confdefs.h. */
7619#include <stdlib.h>
7620#include <stdarg.h>
7621#include <string.h>
7622#include <float.h>
7623
7624int
7625main ()
7626{
7627
7628 ;
7629 return 0;
7630}
7631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007632if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633 ac_cv_header_stdc=yes
7634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7638
7639if test $ac_cv_header_stdc = yes; then
7640 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642/* end confdefs.h. */
7643#include <string.h>
7644
7645_ACEOF
7646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 $EGREP "memchr" >/dev/null 2>&1; then :
7648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649else
7650 ac_cv_header_stdc=no
7651fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007652rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653
7654fi
7655
7656if test $ac_cv_header_stdc = yes; then
7657 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659/* end confdefs.h. */
7660#include <stdlib.h>
7661
7662_ACEOF
7663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 $EGREP "free" >/dev/null 2>&1; then :
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666else
7667 ac_cv_header_stdc=no
7668fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007669rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670
7671fi
7672
7673if test $ac_cv_header_stdc = yes; then
7674 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 :
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680#include <ctype.h>
7681#include <stdlib.h>
7682#if ((' ' & 0x0FF) == 0x020)
7683# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7684# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7685#else
7686# define ISLOWER(c) \
7687 (('a' <= (c) && (c) <= 'i') \
7688 || ('j' <= (c) && (c) <= 'r') \
7689 || ('s' <= (c) && (c) <= 'z'))
7690# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7691#endif
7692
7693#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7694int
7695main ()
7696{
7697 int i;
7698 for (i = 0; i < 256; i++)
7699 if (XOR (islower (i), ISLOWER (i))
7700 || toupper (i) != TOUPPER (i))
7701 return 2;
7702 return 0;
7703}
7704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if ac_fn_c_try_run "$LINENO"; then :
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
7715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7717$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718if test $ac_cv_header_stdc = yes; then
7719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721
7722fi
7723
stratakise768c862018-01-23 16:11:24 +01007724for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007725fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007726ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007727sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007728unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007729poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007730sys/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 +01007731sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007732sys/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 +01007733sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007734sys/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 -07007735libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007736linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007737sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007738do :
7739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7740ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
7745
7746fi
7747
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748done
7749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007751for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7754$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760#include <sys/types.h>
7761#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
7766if ((DIR *) 0)
7767return 0;
7768 ;
7769 return 0;
7770}
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779eval ac_res=\$$as_ac_Header
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7781$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007782if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007784#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
7786
7787ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790done
7791# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7792if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7794$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007795if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797else
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805#ifdef __cplusplus
7806extern "C"
7807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007808char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007809int
7810main ()
7811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ;
7814 return 0;
7815}
7816_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817for ac_lib in '' dir; do
7818 if test -z "$ac_lib"; then
7819 ac_res="none required"
7820 else
7821 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007829 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832done
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835else
7836 ac_cv_search_opendir=no
7837fi
7838rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007839LIBS=$ac_func_search_save_LIBS
7840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7842$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
Michael W. Hudson54241132001-12-07 15:38:26 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7851$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007854else
7855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#ifdef __cplusplus
7863extern "C"
7864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874for ac_lib in '' x; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007886 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889done
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892else
7893 ac_cv_search_opendir=no
7894fi
7895rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_func_search_save_LIBS
7897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7899$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
7905
7906fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7909$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007910if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007914/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007915#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916int
7917main ()
7918{
7919return makedev(0, 0);
7920 ;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007925 ac_cv_header_sys_types_h_makedev=yes
7926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929rm -f core conftest.err conftest.$ac_objext \
7930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007931
7932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7934$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007935
7936if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007937ac_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 +02007938if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007941
7942fi
7943
7944
7945
7946 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 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 +02007948if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007949
Matthias Kloseb9621712010-04-24 17:59:49 +00007950$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007951
7952fi
7953
7954
7955 fi
7956fi
7957
Michael W. Hudson54241132001-12-07 15:38:26 +00007958
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007959# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7960# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7961SAVE_CFLAGS=$CFLAGS
7962CFLAGS="-std=c99 $CFLAGS"
7963for ac_header in bluetooth/bluetooth.h
7964do :
7965 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7966if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7967 cat >>confdefs.h <<_ACEOF
7968#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7969_ACEOF
7970
7971fi
7972
7973done
7974
7975CFLAGS=$SAVE_CFLAGS
7976
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007977# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7978for ac_header in net/if.h
7979do :
7980 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7981#ifdef STDC_HEADERS
7982# include <stdlib.h>
7983# include <stddef.h>
7984#else
7985# ifdef HAVE_STDLIB_H
7986# include <stdlib.h>
7987# endif
7988#endif
7989#ifdef HAVE_SYS_SOCKET_H
7990# include <sys/socket.h>
7991#endif
7992
7993"
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007995 cat >>confdefs.h <<_ACEOF
7996#define HAVE_NET_IF_H 1
7997_ACEOF
7998
7999fi
8000
8001done
8002
8003
Martin v. Löwis11017b12006-01-14 18:12:57 +00008004# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008005for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008006do :
8007 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 +00008008#ifdef HAVE_ASM_TYPES_H
8009#include <asm/types.h>
8010#endif
8011#ifdef HAVE_SYS_SOCKET_H
8012#include <sys/socket.h>
8013#endif
8014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015"
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008019_ACEOF
8020
8021fi
8022
8023done
8024
8025
caaveryeffc12f2017-09-06 18:18:10 -04008026for ac_header in linux/vm_sockets.h
8027do :
8028 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8029#ifdef HAVE_SYS_SOCKET_H
8030#include <sys/socket.h>
8031#endif
8032
8033"
8034if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8035 cat >>confdefs.h <<_ACEOF
8036#define HAVE_LINUX_VM_SOCKETS_H 1
8037_ACEOF
8038
8039fi
8040
8041done
8042
8043
Charles-François Natali47413c12011-10-06 19:47:44 +02008044# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008045for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008046do :
8047 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8048ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8049#ifdef HAVE_SYS_SOCKET_H
8050#include <sys/socket.h>
8051#endif
8052
8053"
8054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8055 cat >>confdefs.h <<_ACEOF
8056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8057_ACEOF
8058
8059fi
8060
8061done
8062
8063
Guido van Rossum627b2d71993-12-24 10:39:16 +00008064# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008065was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8067$as_echo_n "checking for clock_t in time.h... " >&6; }
8068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008069/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
8072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008075 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076else
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
8078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008080
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008081
Guido van Rossum627b2d71993-12-24 10:39:16 +00008082fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008083rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8086$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8089$as_echo_n "checking for makedev... " >&6; }
8090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008092
Jesus Cea740f53a2010-04-28 11:35:30 +00008093#if defined(MAJOR_IN_MKDEV)
8094#include <sys/mkdev.h>
8095#elif defined(MAJOR_IN_SYSMACROS)
8096#include <sys/sysmacros.h>
8097#else
8098#include <sys/types.h>
8099#endif
8100
Neal Norwitz11690112002-07-30 01:08:28 +00008101int
8102main ()
8103{
Jesus Cea740f53a2010-04-28 11:35:30 +00008104
8105 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008106 ;
8107 return 0;
8108}
Matthias Kloseb159a552010-04-25 21:00:44 +00008109
Neal Norwitz11690112002-07-30 01:08:28 +00008110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008111if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008112 ac_cv_has_makedev=yes
8113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116rm -f core conftest.err conftest.$ac_objext \
8117 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8119$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008120if test "$ac_cv_has_makedev" = "yes"; then
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008123
8124fi
8125
Christian Heimes985ecdc2013-11-20 11:46:18 +01008126# byte swapping
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8128$as_echo_n "checking for le64toh... " >&6; }
8129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8130/* end confdefs.h. */
8131
8132#ifdef HAVE_ENDIAN_H
8133#include <endian.h>
8134#elif defined(HAVE_SYS_ENDIAN_H)
8135#include <sys/endian.h>
8136#endif
8137
8138int
8139main ()
8140{
8141
8142 le64toh(1)
8143 ;
8144 return 0;
8145}
8146
8147_ACEOF
8148if ac_fn_c_try_link "$LINENO"; then :
8149 ac_cv_has_le64toh=yes
8150else
8151 ac_cv_has_le64toh=no
8152fi
8153rm -f core conftest.err conftest.$ac_objext \
8154 conftest$ac_exeext conftest.$ac_ext
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8156$as_echo "$ac_cv_has_le64toh" >&6; }
8157if test "$ac_cv_has_le64toh" = "yes"; then
8158
8159$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8160
8161fi
8162
Martin v. Löwis399a6892002-10-04 10:22:02 +00008163use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008164# Don't use largefile support for GNU/Hurd
8165case $ac_sys_system in GNU*)
8166 use_lfs=no
8167esac
8168
Martin v. Löwis399a6892002-10-04 10:22:02 +00008169if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008170# Two defines needed to enable largefile support on various platforms
8171# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008172case $ac_sys_system/$ac_sys_release in
8173AIX*)
8174
8175$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8176
8177 ;;
8178esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008181
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008184
Martin v. Löwis399a6892002-10-04 10:22:02 +00008185fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008186
Guido van Rossum84e7b241996-08-19 21:59:00 +00008187# Add some code to confdefs.h so that the test for off_t works on SCO
8188cat >> confdefs.h <<\EOF
8189#if defined(SCO_DS)
8190#undef _OFF_T
8191#endif
8192EOF
8193
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008195ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008196if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008198else
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
8200cat >>confdefs.h <<_ACEOF
8201#define mode_t int
8202_ACEOF
8203
8204fi
8205
Matthias Kloseb9621712010-04-24 17:59:49 +00008206ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008207if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008209else
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
8211cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
8214
8215fi
8216
Matthias Kloseb9621712010-04-24 17:59:49 +00008217ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222cat >>confdefs.h <<_ACEOF
8223#define pid_t int
8224_ACEOF
8225
8226fi
8227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008230#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008231_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236else
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008240_ACEOF
8241
8242fi
8243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8245$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008246if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008250/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008251#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
8253_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008256 ac_cv_type_uid_t=yes
8257else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008258 ac_cv_type_uid_t=no
8259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008260rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8264$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008265if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271
8272fi
8273
Mark Dickinson983bc162012-12-02 12:11:38 +00008274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008279
8280fi
8281
Stefan Krah1919b7e2012-03-21 18:25:23 +01008282ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8283if test "x$ac_cv_type___uint128_t" = xyes; then :
8284
8285$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8286
8287fi
8288
Jack Jansendd19cf82001-12-06 22:36:17 +00008289
Michael W. Hudson54241132001-12-07 15:38:26 +00008290# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008291# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292# The cast to long int works around a bug in the HP C Compiler
8293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8295# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8297$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 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 +00008302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 if test "$ac_cv_type_int" = yes; then
8305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008307as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008308See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 else
8310 ac_cv_sizeof_int=0
8311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8316$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317
8318
8319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323
8324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325# The cast to long int works around a bug in the HP C Compiler
8326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8330$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008331if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008333else
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 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 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 if test "$ac_cv_type_long" = yes; then
8338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008340as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008341See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342 else
8343 ac_cv_sizeof_long=0
8344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8349$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350
8351
8352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008354#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008355_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008356
8357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8363$as_echo_n "checking size of long long... " >&6; }
8364if ${ac_cv_sizeof_long_long+:} false; then :
8365 $as_echo_n "(cached) " >&6
8366else
8367 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8368
8369else
8370 if test "$ac_cv_type_long_long" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8373as_fn_error 77 "cannot compute sizeof (long long)
8374See \`config.log' for more details" "$LINENO" 5; }
8375 else
8376 ac_cv_sizeof_long_long=0
8377 fi
8378fi
8379
8380fi
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8382$as_echo "$ac_cv_sizeof_long_long" >&6; }
8383
8384
8385
8386cat >>confdefs.h <<_ACEOF
8387#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8388_ACEOF
8389
8390
8391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8396$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 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 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_void_p" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_void_p=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8415$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008420#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8429$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008430if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 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 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 if test "$ac_cv_type_short" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008439as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008440See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441 else
8442 ac_cv_sizeof_short=0
8443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8448$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
8450
8451
Martin v. Löwis11437992002-04-12 09:54:03 +00008452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455
8456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8462$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 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 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_float" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_float=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8481$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008486#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8495$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_double" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_double=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8514$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8528$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_fpos_t" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_fpos_t=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8547$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008552#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008554
Michael W. Hudson54241132001-12-07 15:38:26 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8561$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis18e16552006-02-15 17:27:45 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_size_t" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_size_t=0
8575 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis18e16552006-02-15 17:27:45 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8580$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis18e16552006-02-15 17:27:45 +00008584cat >>confdefs.h <<_ACEOF
8585#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8586_ACEOF
8587
8588
Christian Heimes400adb02008-02-01 08:12:03 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8594$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Christian Heimes400adb02008-02-01 08:12:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_pid_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008606 else
8607 ac_cv_sizeof_pid_t=0
8608 fi
8609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Christian Heimes400adb02008-02-01 08:12:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8613$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008614
8615
8616
8617cat >>confdefs.h <<_ACEOF
8618#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8619_ACEOF
8620
8621
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
8626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8627$as_echo_n "checking size of uintptr_t... " >&6; }
8628if ${ac_cv_sizeof_uintptr_t+:} false; then :
8629 $as_echo_n "(cached) " >&6
8630else
8631 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8632
8633else
8634 if test "$ac_cv_type_uintptr_t" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8637as_fn_error 77 "cannot compute sizeof (uintptr_t)
8638See \`config.log' for more details" "$LINENO" 5; }
8639 else
8640 ac_cv_sizeof_uintptr_t=0
8641 fi
8642fi
8643
8644fi
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8646$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8647
8648
8649
8650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8652_ACEOF
8653
8654
Michael W. Hudson54241132001-12-07 15:38:26 +00008655
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008656
Eitan Adler3055c942018-05-15 22:58:09 -07008657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8658$as_echo_n "checking for long double... " >&6; }
8659if ${ac_cv_type_long_double+:} false; then :
8660 $as_echo_n "(cached) " >&6
8661else
8662 if test "$GCC" = yes; then
8663 ac_cv_type_long_double=yes
8664 else
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666/* end confdefs.h. */
8667/* The Stardent Vistra knows sizeof (long double), but does
8668 not support it. */
8669 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008670int
8671main ()
8672{
Eitan Adler3055c942018-05-15 22:58:09 -07008673static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8674 sizeof (double) <= sizeof (long double))];
8675test_array [0] = 0;
8676return test_array [0];
8677
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008683 ac_cv_type_long_double=yes
8684else
8685 ac_cv_type_long_double=no
8686fi
8687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8688 fi
8689fi
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8691$as_echo "$ac_cv_type_long_double" >&6; }
8692 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008695
Eitan Adler3055c942018-05-15 22:58:09 -07008696 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008697
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8703$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 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 +00008708
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_long_double" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008715 else
8716 ac_cv_sizeof_long_double=0
8717 fi
8718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8722$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723
8724
8725
8726cat >>confdefs.h <<_ACEOF
8727#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8728_ACEOF
8729
8730
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8737$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Thomas Woutersb2137042007-02-01 18:02:27 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type__Bool" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof__Bool=0
8751 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Thomas Woutersb2137042007-02-01 18:02:27 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8756$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Thomas Woutersb2137042007-02-01 18:02:27 +00008760cat >>confdefs.h <<_ACEOF
8761#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8762_ACEOF
8763
8764
Thomas Woutersb2137042007-02-01 18:02:27 +00008765
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008766# The cast to long int works around a bug in the HP C Compiler
8767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8769# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8771$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008772if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776#ifdef HAVE_SYS_TYPES_H
8777#include <sys/types.h>
8778#endif
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if test "$ac_cv_type_off_t" = yes; then
8784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008786as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008787See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788 else
8789 ac_cv_sizeof_off_t=0
8790 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8795$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008797
8798
Martin v. Löwis11437992002-04-12 09:54:03 +00008799cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008800#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008801_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802
Michael W. Hudson54241132001-12-07 15:38:26 +00008803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8806$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008807if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008808 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8813$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008817fi
8818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819# The cast to long int works around a bug in the HP C Compiler
8820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8824$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008825if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829#ifdef HAVE_SYS_TYPES_H
8830#include <sys/types.h>
8831#endif
8832#ifdef HAVE_TIME_H
8833#include <time.h>
8834#endif
8835
Matthias Kloseb9621712010-04-24 17:59:49 +00008836"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 if test "$ac_cv_type_time_t" = yes; then
8840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008842as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008843See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844 else
8845 ac_cv_sizeof_time_t=0
8846 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8851$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853
8854
Martin v. Löwis11437992002-04-12 09:54:03 +00008855cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008857_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858
Michael W. Hudson54241132001-12-07 15:38:26 +00008859
8860
Trent Mick635f6fb2000-08-23 21:33:05 +00008861# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008862ac_save_cc="$CC"
8863if test "$ac_cv_kpthread" = "yes"
8864then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008865elif test "$ac_cv_kthread" = "yes"
8866then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867elif test "$ac_cv_pthread" = "yes"
8868then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008869fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8872$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008873have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
8877 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Guido van Rossum12580492000-09-24 16:47:19 +00008881pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ;
8883 return 0;
8884}
Matthias Kloseb159a552010-04-25 21:00:44 +00008885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008888 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8892$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008893if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8896# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8897# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8899$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904#ifdef HAVE_PTHREAD_H
8905#include <pthread.h>
8906#endif
8907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if test "$ac_cv_type_pthread_t" = yes; then
8912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008914as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008915See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916 else
8917 ac_cv_sizeof_pthread_t=0
8918 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920
Trent Mick635f6fb2000-08-23 21:33:05 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8923$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925
8926
Martin v. Löwis11437992002-04-12 09:54:03 +00008927cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008928#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008929_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Trent Mick635f6fb2000-08-23 21:33:05 +00008932fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008933
8934# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8935# This checking will be unnecessary after removing deprecated TLS API.
8936# The cast to long int works around a bug in the HP C Compiler
8937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8939# This bug is HP SR number 8606223364.
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8941$as_echo_n "checking size of pthread_key_t... " >&6; }
8942if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8943 $as_echo_n "(cached) " >&6
8944else
8945 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8946"; then :
8947
8948else
8949 if test "$ac_cv_type_pthread_key_t" = yes; then
8950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8952as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8953See \`config.log' for more details" "$LINENO" 5; }
8954 else
8955 ac_cv_sizeof_pthread_key_t=0
8956 fi
8957fi
8958
8959fi
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8961$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8962
8963
8964
8965cat >>confdefs.h <<_ACEOF
8966#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8967_ACEOF
8968
8969
8970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8971$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8972if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h. */
8975#include <pthread.h>
8976int
8977main ()
8978{
8979pthread_key_t k; k * 1;
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984if ac_fn_c_try_compile "$LINENO"; then :
8985 ac_pthread_key_t_is_arithmetic_type=yes
8986else
8987 ac_pthread_key_t_is_arithmetic_type=no
8988
8989fi
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8992$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8993 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8994
8995$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8996
8997 fi
8998else
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000$as_echo "no" >&6; }
9001fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009002CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009003
Michael W. Hudson54241132001-12-07 15:38:26 +00009004
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009005case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009006 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009007 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9008 ;;
9009 Darwin/*)
9010 OTHER_LIBTOOL_OPT=""
9011 ;;
9012esac
9013
9014
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009016case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009017 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009018 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9019 if test "${enable_universalsdk}"; then
9020 :
9021 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009022 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009023 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009024 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009025 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009026 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009027 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009028 if test ${gcc_version} '<' 4.0
9029 then
9030 LIBTOOL_CRUFT="-lcc_dynamic"
9031 else
9032 LIBTOOL_CRUFT=""
9033 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009035 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009039
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040 #include <unistd.h>
9041 int main(int argc, char*argv[])
9042 {
9043 if (sizeof(long) == 4) {
9044 return 0;
9045 } else {
9046 return 1;
9047 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009048 }
9049
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009051if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052 ac_osx_32bit=yes
9053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058fi
9059
9060
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009062 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 i386)
9064 MACOSX_DEFAULT_ARCH="i386"
9065 ;;
9066 ppc)
9067 MACOSX_DEFAULT_ARCH="ppc"
9068 ;;
9069 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009070 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071 ;;
9072 esac
9073 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009074 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 i386)
9076 MACOSX_DEFAULT_ARCH="x86_64"
9077 ;;
9078 ppc)
9079 MACOSX_DEFAULT_ARCH="ppc64"
9080 ;;
9081 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009082 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009083 ;;
9084 esac
9085
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009086 fi
9087
9088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009090 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009091esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9093$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009094if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009095then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009096 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009098 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9103$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009104 if test $enable_shared = "yes"
9105 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106 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 +00009107 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111fi
9112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9114$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009115case $ac_sys_system/$ac_sys_release in
9116 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9121$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009122 ;;
9123 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009126 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009127esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009128
Guido van Rossum0a516c91994-09-12 10:58:40 +00009129# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009130
Michael W. Hudson54241132001-12-07 15:38:26 +00009131
9132
9133
9134
Benjamin Peterson99f03762010-04-11 22:15:28 +00009135
Thomas Wouters477c8d52006-05-27 19:21:47 +00009136
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009137# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9138# -- usually .so, .sl on HP-UX, .dll on Cygwin
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9140$as_echo_n "checking the extension of shared libraries... " >&6; }
9141if test -z "$SHLIB_SUFFIX"; then
9142 case $ac_sys_system in
9143 hp*|HP*)
9144 case `uname -m` in
9145 ia64) SHLIB_SUFFIX=.so;;
9146 *) SHLIB_SUFFIX=.sl;;
9147 esac
9148 ;;
9149 CYGWIN*) SHLIB_SUFFIX=.dll;;
9150 *) SHLIB_SUFFIX=.so;;
9151 esac
9152fi
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9154$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009155
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009157# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009158# (Shared libraries in this instance are shared modules to be loaded into
9159# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9161$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009162if test -z "$LDSHARED"
9163then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009164 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009165 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009166 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009167 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009168 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 if test "$GCC" = "yes" ; then
9171 LDSHARED='$(CC) -shared'
9172 LDCXXSHARED='$(CXX) -shared'
9173 else
9174 LDSHARED='$(CC) -G'
9175 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009176 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009177 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009178 if test "$GCC" = "yes" ; then
9179 LDSHARED='$(CC) -shared'
9180 LDCXXSHARED='$(CXX) -shared'
9181 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009182 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009183 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009184 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009185 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009186 LDSHARED='$(CC) -bundle'
9187 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009188 if test "$enable_framework" ; then
9189 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009190 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9191 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009193 else
9194 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009195 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009197 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009198 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED='$(CC) -bundle'
9200 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009201 if test "$enable_framework" ; then
9202 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009203 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9204 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009206 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009207 # No framework, use the Python app as bundle-loader
9208 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009209 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009211 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009212 Darwin/*)
9213 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9214 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009215
Ned Deily36820b62014-06-25 13:44:22 -07009216 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9217 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9218 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9219 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9220 if test ${dep_target_major} -eq 10 && \
9221 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009222 then
Ned Deily36820b62014-06-25 13:44:22 -07009223 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009224 LDSHARED='$(CC) -bundle'
9225 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009226 if test "$enable_framework" ; then
9227 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009228 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9229 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009230 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009231 else
9232 # No framework, use the Python app as bundle-loader
9233 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9234 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009236 fi
Ned Deily36820b62014-06-25 13:44:22 -07009237 else
9238 # building for OS X 10.3 and later
9239 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9240 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9241 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009242 fi
9243 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 Linux*|GNU*|QNX*)
9245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009247 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009248 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009249 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009250 LDSHARED='$(CC) -shared'
9251 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009252 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009253 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009254 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009255 OpenBSD*)
9256 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9257 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009258 LDSHARED='$(CC) -shared $(CCSHARED)'
9259 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009260 else
9261 case `uname -r` in
9262 [01].* | 2.[0-7] | 2.[0-7].*)
9263 LDSHARED="ld -Bshareable ${LDFLAGS}"
9264 ;;
9265 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009266 LDSHARED='$(CC) -shared $(CCSHARED)'
9267 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009268 ;;
9269 esac
9270 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009271 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009272 LDSHARED='$(CC) -shared'
9273 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009274 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009275 if test "$GCC" = "yes" ; then
9276 LDSHARED='$(CC) -shared'
9277 LDCXXSHARED='$(CXX) -shared'
9278 else
9279 LDSHARED='$(CC) -G'
9280 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009281 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009282 SCO_SV*)
9283 LDSHARED='$(CC) -Wl,-G,-Bexport'
9284 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9285 CYGWIN*)
9286 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9287 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009288 *) LDSHARED="ld";;
9289 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9292$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009293LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009294BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9298$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299if test -z "$CCSHARED"
9300then
Guido van Rossum07397971997-04-29 21:49:50 +00009301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009302 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009303 then CCSHARED="-fPIC";
9304 elif test `uname -p` = sparc;
9305 then CCSHARED="-xcode=pic32";
9306 else CCSHARED="-Kpic";
9307 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009308 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009309 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009310 else CCSHARED="+z";
9311 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009312 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009313 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009314 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009315 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009316 if test "$GCC" = "yes"
9317 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009318 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009319 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009320 SCO_SV*)
9321 if test "$GCC" = "yes"
9322 then CCSHARED="-fPIC"
9323 else CCSHARED="-Kpic -belf"
9324 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9328$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9332$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333if test -z "$LINKFORSHARED"
9334then
Guido van Rossum07397971997-04-29 21:49:50 +00009335 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009336 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009337 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009338 LINKFORSHARED="-Wl,-E -Wl,+s";;
9339# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009340 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009341 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009342 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009344 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009345
9346 # Issue #18075: the default maximum stack size (8MBytes) is too
9347 # small for the default recursion limit. Increase the stack size
9348 # to ensure that tests don't crash
9349 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9350
Jack Jansene578a632001-08-15 01:27:14 +00009351 if test "$enable_framework"
9352 then
Jack Jansenda49e192005-01-07 13:08:22 +00009353 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009354 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009355 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009356 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009357 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009358 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009359 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009360 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9361 then
9362 LINKFORSHARED="-Wl,--export-dynamic"
9363 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009364 SunOS/5*) case $CC in
9365 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009366 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009367 then
9368 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009369 fi;;
9370 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009371 CYGWIN*)
9372 if test $enable_shared = "no"
9373 then
9374 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9375 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009376 QNX*)
9377 # -Wl,-E causes the symbols to be added to the dynamic
9378 # symbol table so that they can be found when a module
9379 # is loaded. -N 2048K causes the stack size to be set
9380 # to 2048 kilobytes so that the stack doesn't overflow
9381 # when running test_compile.py.
9382 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9386$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387
Michael W. Hudson54241132001-12-07 15:38:26 +00009388
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009389
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9391$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009392if test ! "$LIBRARY" = "$LDLIBRARY"
9393then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009394 case $ac_sys_system in
9395 CYGWIN*)
9396 # Cygwin needs CCSHARED when building extension DLLs
9397 # but not when building the interpreter DLL.
9398 CFLAGSFORSHARED='';;
9399 *)
9400 CFLAGSFORSHARED='$(CCSHARED)'
9401 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9404$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009405
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9407# library (with --enable-shared).
9408# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009409# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9410# if it is not required, since it creates a dependency of the shared library
9411# to LIBS. This, in turn, means that applications linking the shared libpython
9412# don't need to link LIBS explicitly. The default should be only changed
9413# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9416$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009417case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009419 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009420esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9422$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009423
9424
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9427$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009428if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009429 $as_echo_n "(cached) " >&6
9430else
9431 ac_check_lib_save_LIBS=$LIBS
9432LIBS="-lsendfile $LIBS"
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9434/* end confdefs.h. */
9435
9436/* Override any GCC internal prototype to avoid an error.
9437 Use char because int might match the return type of a GCC
9438 builtin and then its argument prototype would still apply. */
9439#ifdef __cplusplus
9440extern "C"
9441#endif
9442char sendfile ();
9443int
9444main ()
9445{
9446return sendfile ();
9447 ;
9448 return 0;
9449}
9450_ACEOF
9451if ac_fn_c_try_link "$LINENO"; then :
9452 ac_cv_lib_sendfile_sendfile=yes
9453else
9454 ac_cv_lib_sendfile_sendfile=no
9455fi
9456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext conftest.$ac_ext
9458LIBS=$ac_check_lib_save_LIBS
9459fi
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9461$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009463 cat >>confdefs.h <<_ACEOF
9464#define HAVE_LIBSENDFILE 1
9465_ACEOF
9466
9467 LIBS="-lsendfile $LIBS"
9468
9469fi
9470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9472$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484#ifdef __cplusplus
9485extern "C"
9486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ;
9493 return 0;
9494}
9495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009498else
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9506$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 cat >>confdefs.h <<_ACEOF
9509#define HAVE_LIBDL 1
9510_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009512 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009514fi
9515 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9517$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9551$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >>confdefs.h <<_ACEOF
9554#define HAVE_LIBDLD 1
9555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009557 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009559fi
9560 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009561
Michael Felt0d3ccb42017-12-30 22:39:20 +01009562# checks for uuid.h location
9563for ac_header in uuid/uuid.h uuid.h
9564do :
9565 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9566ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9567if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9568 cat >>confdefs.h <<_ACEOF
9569#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9570_ACEOF
9571
9572fi
9573
9574done
9575
9576
Berker Peksag9a10ff42017-11-08 23:09:16 +03009577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9578$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581#include <uuid/uuid.h>
9582int
9583main ()
9584{
9585
9586#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009587void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009588#endif
9589
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594if ac_fn_c_try_compile "$LINENO"; then :
9595
9596$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9597
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9599$as_echo "yes" >&6; }
9600else
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603
9604fi
9605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9606
Michael Felt0d3ccb42017-12-30 22:39:20 +01009607# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009608# FreeBSD and OpenBSD provides support as well
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9610$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9612/* end confdefs.h. */
9613#include <uuid.h>
9614int
9615main ()
9616{
9617
9618#ifndef uuid_create
9619void *x = uuid_create
9620#endif
9621
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626if ac_fn_c_try_compile "$LINENO"; then :
9627
9628$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9629
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9631$as_echo "yes" >&6; }
9632else
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635
9636fi
9637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9638
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009639# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9640# stream in big-endian byte-order
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9642$as_echo_n "checking for uuid_enc_be... " >&6; }
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9644/* end confdefs.h. */
9645#include <uuid.h>
9646int
9647main ()
9648{
9649
9650#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009651void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009652#endif
9653
9654 ;
9655 return 0;
9656}
9657_ACEOF
9658if ac_fn_c_try_compile "$LINENO"; then :
9659
9660$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9661
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9663$as_echo "yes" >&6; }
9664else
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9666$as_echo "no" >&6; }
9667
9668fi
9669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009671# 'Real Time' functions on Solaris
9672# posix4 on Solaris 2.6
9673# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009676if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009678else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009679 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009689char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698for ac_lib in '' pthread rt posix4; do
9699 if test -z "$ac_lib"; then
9700 ac_res="none required"
9701 else
9702 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009703 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009710 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713done
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716else
9717 ac_cv_search_sem_init=no
9718fi
9719rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009720LIBS=$ac_func_search_save_LIBS
9721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9723$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009725if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009727
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009728fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009729
Martin v. Löwis519adae2003-09-20 10:47:47 +00009730
Martin v. Löwis19d17342003-06-14 21:03:05 +00009731# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9733$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009736else
9737 ac_check_lib_save_LIBS=$LIBS
9738LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009745#ifdef __cplusplus
9746extern "C"
9747#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009748char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009749int
9750main ()
9751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009758 ac_cv_lib_intl_textdomain=yes
9759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009764LIBS=$ac_check_lib_save_LIBS
9765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9767$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009768if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009769
Matthias Kloseb9621712010-04-24 17:59:49 +00009770$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009771
Brett Cannonc6d936e2009-06-07 20:09:53 +00009772 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009773fi
9774
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009775
9776# checks for system dependent C++ extensions support
9777case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9779$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009782
Georg Brandl59e87bd2011-02-15 19:48:59 +00009783 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009784int
9785main ()
9786{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009787loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ;
9789 return 0;
9790}
Matthias Kloseb159a552010-04-25 21:00:44 +00009791
Martin v. Löwis11437992002-04-12 09:54:03 +00009792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009794
Matthias Kloseb159a552010-04-25 21:00:44 +00009795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Matthias Kloseb159a552010-04-25 21:00:44 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009799$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009800
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009801else
Matthias Kloseb159a552010-04-25 21:00:44 +00009802
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009804$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009805
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009809 *) ;;
9810esac
9811
Christian Heimes985ecdc2013-11-20 11:46:18 +01009812# check for systems that require aligned memory access
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9814$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009815if ${ac_cv_aligned_required+:} false; then :
9816 $as_echo_n "(cached) " >&6
9817else
9818 if test "$cross_compiling" = yes; then :
9819 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009820else
9821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9822/* end confdefs.h. */
9823
9824int main()
9825{
9826 char s[16];
9827 int i, *p1, *p2;
9828 for (i=0; i < 16; i++)
9829 s[i] = i;
9830 p1 = (int*)(s+1);
9831 p2 = (int*)(s+2);
9832 if (*p1 == *p2)
9833 return 1;
9834 return 0;
9835}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009836_ACEOF
9837if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009838 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009839else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009840 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009841fi
9842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9843 conftest.$ac_objext conftest.beam conftest.$ac_ext
9844fi
9845
9846
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009847fi
9848
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9850$as_echo "$ac_cv_aligned_required" >&6; }
9851if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009852
9853$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9854
9855fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009856
9857# str, bytes and memoryview hash algorithm
9858
9859
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9861$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9862
9863# Check whether --with-hash_algorithm was given.
9864if test "${with_hash_algorithm+set}" = set; then :
9865 withval=$with_hash_algorithm;
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9867$as_echo "$withval" >&6; }
9868case "$withval" in
9869 siphash24)
9870 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9871
9872 ;;
9873 fnv)
9874 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9875
9876 ;;
9877 *)
9878 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9879 ;;
9880esac
9881
9882else
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9884$as_echo "default" >&6; }
9885fi
9886
9887
Charles-François Natalid30b0222014-05-08 23:08:51 +01009888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9889$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9890
9891# Check whether --with-address_sanitizer was given.
9892if test "${with_address_sanitizer+set}" = set; then :
9893 withval=$with_address_sanitizer;
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9895$as_echo "$withval" >&6; }
9896BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9897LDFLAGS="-fsanitize=address $LDFLAGS"
9898
9899else
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902fi
9903
9904
Guido van Rossum70c7f481998-03-26 18:44:10 +00009905# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9907$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009908if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009910else
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009912LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916/* Override any GCC internal prototype to avoid an error.
9917 Use char because int might match the return type of a GCC
9918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919#ifdef __cplusplus
9920extern "C"
9921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009922char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009923int
9924main ()
9925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ;
9928 return 0;
9929}
9930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009931if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009936rm -f core conftest.err conftest.$ac_objext \
9937 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009938LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9941$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009942if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009943 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009944fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009945 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9947$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009948if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009950else
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009952LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009956/* Override any GCC internal prototype to avoid an error.
9957 Use char because int might match the return type of a GCC
9958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959#ifdef __cplusplus
9960extern "C"
9961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009962char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009963int
9964main ()
9965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009976rm -f core conftest.err conftest.$ac_objext \
9977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009978LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9981$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009982if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009983 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009984fi
9985 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9988$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9994$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009995LIBS="$withval $LIBS"
9996
9997else
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000fi
10001
Guido van Rossum7f43da71994-08-01 12:15:30 +000010002
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010003
10004
10005
10006
10007
10008
10009
10010if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10011 if test -n "$ac_tool_prefix"; then
10012 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10015$as_echo_n "checking for $ac_word... " >&6; }
10016if ${ac_cv_path_PKG_CONFIG+:} false; then :
10017 $as_echo_n "(cached) " >&6
10018else
10019 case $PKG_CONFIG in
10020 [\\/]* | ?:[\\/]*)
10021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10022 ;;
10023 *)
10024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10025for as_dir in $PATH
10026do
10027 IFS=$as_save_IFS
10028 test -z "$as_dir" && as_dir=.
10029 for ac_exec_ext in '' $ac_executable_extensions; do
10030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10033 break 2
10034 fi
10035done
10036 done
10037IFS=$as_save_IFS
10038
10039 ;;
10040esac
10041fi
10042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10043if test -n "$PKG_CONFIG"; then
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10045$as_echo "$PKG_CONFIG" >&6; }
10046else
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048$as_echo "no" >&6; }
10049fi
10050
10051
10052fi
10053if test -z "$ac_cv_path_PKG_CONFIG"; then
10054 ac_pt_PKG_CONFIG=$PKG_CONFIG
10055 # Extract the first word of "pkg-config", so it can be a program name with args.
10056set dummy pkg-config; ac_word=$2
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058$as_echo_n "checking for $ac_word... " >&6; }
10059if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10060 $as_echo_n "(cached) " >&6
10061else
10062 case $ac_pt_PKG_CONFIG in
10063 [\\/]* | ?:[\\/]*)
10064 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10065 ;;
10066 *)
10067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068for as_dir in $PATH
10069do
10070 IFS=$as_save_IFS
10071 test -z "$as_dir" && as_dir=.
10072 for ac_exec_ext in '' $ac_executable_extensions; do
10073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076 break 2
10077 fi
10078done
10079 done
10080IFS=$as_save_IFS
10081
10082 ;;
10083esac
10084fi
10085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10086if test -n "$ac_pt_PKG_CONFIG"; then
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10089else
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092fi
10093
10094 if test "x$ac_pt_PKG_CONFIG" = x; then
10095 PKG_CONFIG=""
10096 else
10097 case $cross_compiling:$ac_tool_warned in
10098yes:)
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10101ac_tool_warned=yes ;;
10102esac
10103 PKG_CONFIG=$ac_pt_PKG_CONFIG
10104 fi
10105else
10106 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10107fi
10108
10109fi
10110if test -n "$PKG_CONFIG"; then
10111 _pkg_min_version=0.9.0
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10113$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10114 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10116$as_echo "yes" >&6; }
10117 else
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120 PKG_CONFIG=""
10121 fi
10122fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010123
10124# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10126$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010127
10128# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010130 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010131else
10132 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010133fi
10134
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10137$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010138
10139# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10141$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010142
10143# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010145 withval=$with_system_ffi;
10146fi
10147
10148
Zachary Waref40d4dd2016-09-17 01:25:24 -050010149if test "$ac_sys_system" = "Darwin"
10150then
10151 case "$with_system_ffi" in
10152 "")
10153 with_system_ffi="no"
10154 ;;
10155 yes|no)
10156 ;;
10157 *)
10158 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10159 ;;
10160 esac
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10162$as_echo "$with_system_ffi" >&6; }
10163else
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10165$as_echo "yes" >&6; }
10166 if test "$with_system_ffi" != ""
10167 then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10169$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10170 fi
10171 with_system_ffi="yes"
10172fi
Zachary Ware935043d2016-09-09 17:01:21 -070010173
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010174if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010175 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10176else
10177 LIBFFI_INCLUDEDIR=""
10178fi
10179
10180
Stefan Krah60187b52012-03-23 19:06:27 +010010181# Check for use of the system libmpdec library
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10183$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10184
10185# Check whether --with-system_libmpdec was given.
10186if test "${with_system_libmpdec+set}" = set; then :
10187 withval=$with_system_libmpdec;
10188else
10189 with_system_libmpdec="no"
10190fi
10191
10192
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10194$as_echo "$with_system_libmpdec" >&6; }
10195
Benjamin Peterson076ed002010-10-31 17:11:02 +000010196# Check for support for loadable sqlite extensions
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10198$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10199# Check whether --enable-loadable-sqlite-extensions was given.
10200if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10201 enableval=$enable_loadable_sqlite_extensions;
10202else
10203 enable_loadable_sqlite_extensions="no"
10204fi
10205
10206
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10208$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10209
Ned Deilyd819b932013-09-06 01:07:05 -070010210# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10211
10212
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10214$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10215
10216# Check whether --with-tcltk-includes was given.
10217if test "${with_tcltk_includes+set}" = set; then :
10218 withval=$with_tcltk_includes;
10219else
10220 with_tcltk_includes="default"
10221fi
10222
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10224$as_echo "$with_tcltk_includes" >&6; }
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10226$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10227
10228# Check whether --with-tcltk-libs was given.
10229if test "${with_tcltk_libs+set}" = set; then :
10230 withval=$with_tcltk_libs;
10231else
10232 with_tcltk_libs="default"
10233fi
10234
10235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10236$as_echo "$with_tcltk_libs" >&6; }
10237if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10238then
10239 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10240 then
10241 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10242 fi
10243 TCLTK_INCLUDES=""
10244 TCLTK_LIBS=""
10245else
10246 TCLTK_INCLUDES="$with_tcltk_includes"
10247 TCLTK_LIBS="$with_tcltk_libs"
10248fi
10249
Matthias Klose55708cc2009-04-30 08:06:49 +000010250# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10252$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010253
10254# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010256 withval=$with_dbmliborder;
10257if test x$with_dbmliborder = xyes
10258then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010259as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010260else
10261 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10262 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10263 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010264 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010265 fi
10266 done
10267fi
10268fi
10269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10271$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
10275# Templates for things AC_DEFINEd more than once.
10276# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010277
10278
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010279if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010280then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010281 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010283
10284 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010285elif test "$ac_cv_kpthread" = "yes"
10286then
10287 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010288 if test "$ac_cv_cxx_thread" = "yes"; then
10289 CXX="$CXX -Kpthread"
10290 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010291 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010292elif test "$ac_cv_kthread" = "yes"
10293then
10294 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010295 if test "$ac_cv_cxx_thread" = "yes"; then
10296 CXX="$CXX -Kthread"
10297 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010298 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010299elif test "$ac_cv_pthread" = "yes"
10300then
10301 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010302 if test "$ac_cv_cxx_thread" = "yes"; then
10303 CXX="$CXX -pthread"
10304 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010306else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307 if test ! -z "$withval" -a -d "$withval"
10308 then LDFLAGS="$LDFLAGS -L$withval"
10309 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010310
10311 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010312 # define _POSIX_THREADS in unistd.h. Some apparently don't
10313 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10315$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010318
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010319#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010320#ifdef _POSIX_THREADS
10321yes
10322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
10324_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010327 unistd_defines_pthreads=yes
10328else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010329 unistd_defines_pthreads=no
10330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010331rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10334$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010335
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010337
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010338 # Just looking for pthread_create in libpthread is not enough:
10339 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10340 # So we really have to include pthread.h, and then link.
10341 _libs=$LIBS
10342 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10344$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010346/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010347
10348#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010349#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010350
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010351void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010352int
10353main ()
10354{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010355
10356pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10364$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010365 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010366
Guido van Rossum02a1c402000-02-25 19:26:31 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010369 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010372
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010373 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010374
Guido van Rossumad678af1998-10-02 14:42:15 +000010375else
Guido van Rossumad678af1998-10-02 14:42:15 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10378$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010383LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010409LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10412$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010413if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010415 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010417
Greg Steinadf63d62000-07-05 10:38:09 +000010418else
Greg Steinadf63d62000-07-05 10:38:09 +000010419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10421$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010424else
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010426LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430/* Override any GCC internal prototype to avoid an error.
10431 Use char because int might match the return type of a GCC
10432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433#ifdef __cplusplus
10434extern "C"
10435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010436char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437int
10438main ()
10439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010447else
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10455$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010456if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010459 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010460
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010461else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10464$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010465if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010467else
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010469LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473/* Override any GCC internal prototype to avoid an error.
10474 Use char because int might match the return type of a GCC
10475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010476#ifdef __cplusplus
10477extern "C"
10478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010479char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010480int
10481main ()
10482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010493rm -f core conftest.err conftest.$ac_objext \
10494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10498$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010500
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010501 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010502 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010503
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010504else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10507$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010508if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010510else
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010512LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516/* Override any GCC internal prototype to avoid an error.
10517 Use char because int might match the return type of a GCC
10518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010519#ifdef __cplusplus
10520extern "C"
10521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010522char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010536rm -f core conftest.err conftest.$ac_objext \
10537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010538LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10541$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010542if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010543
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010546
Guido van Rossumb93a8621998-05-07 13:27:32 +000010547else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010548
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010549 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10550
Guido van Rossum2d38f911996-06-26 19:47:01 +000010551fi
10552
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010554fi
10555
Guido van Rossum0be3e491997-05-22 20:33:33 +000010556fi
10557
Guido van Rossum49545951997-12-02 19:28:29 +000010558fi
10559
Guido van Rossumb93a8621998-05-07 13:27:32 +000010560fi
10561
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10567$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010568if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010572LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576/* Override any GCC internal prototype to avoid an error.
10577 Use char because int might match the return type of a GCC
10578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010579#ifdef __cplusplus
10580extern "C"
10581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010582char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010583int
10584main ()
10585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593else
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596rm -f core conftest.err conftest.$ac_objext \
10597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010598LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10601$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010602if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010603
Martin v. Löwis130fb172001-07-19 11:00:41 +000010604 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010605
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606fi
10607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611if test "$posix_threads" = "yes"; then
10612 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615
10616 fi
10617
10618 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10619 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010620 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010622
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623 ;;
10624 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626
10627 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010628 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010629$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010630
10631 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632 esac
10633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10635$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010636 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638else
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010640 ac_cv_pthread_system_supported=no
10641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010644
10645 #include <stdio.h>
10646 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647 void *foo(void *parm) {
10648 return NULL;
10649 }
10650 main() {
10651 pthread_attr_t attr;
10652 pthread_t id;
10653 if (pthread_attr_init(&attr)) exit(-1);
10654 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10655 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10656 exit(0);
10657 }
10658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010659if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010660 ac_cv_pthread_system_supported=yes
10661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
10670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10672$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673 if test "$ac_cv_pthread_system_supported" = "yes"; then
10674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676
10677 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 for ac_func in pthread_sigmask
10679do :
10680 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010681if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010685 case $ac_sys_system in
10686 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010689
10690 ;;
10691 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692fi
10693done
10694
pdoxe14679c2017-10-05 00:01:56 -070010695 for ac_func in pthread_getcpuclockid
10696do :
10697 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10698if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10699 cat >>confdefs.h <<_ACEOF
10700#define HAVE_PTHREAD_GETCPUCLOCKID 1
10701_ACEOF
10702
10703fi
10704done
10705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706fi
10707
10708
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10712$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719 ipv6=no
10720 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10722$as_echo "yes" >&6; }
10723 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724
10725 ipv6=yes
10726 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 /* AF_INET6 available check */
10733#include <sys/types.h>
10734#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010735int
10736main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010738int domain = AF_INET6;
10739 ;
10740 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741}
Martin v. Löwis11437992002-04-12 09:54:03 +000010742_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010743if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010748
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749else
Matthias Kloseb159a552010-04-25 21:00:44 +000010750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010754
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010758if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10760$as_echo_n "checking if RFC2553 API is available... " >&6; }
10761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010762/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
10764 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010765#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010766int
10767main ()
10768{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010769struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010770 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
Matthias Kloseb159a552010-04-25 21:00:44 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010776if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010777
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010779$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010780 ipv6=yes
10781
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782else
Matthias Kloseb159a552010-04-25 21:00:44 +000010783
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010785$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 ipv6=no
10787
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010790fi
10791
10792if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010794
10795fi
10796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797fi
10798
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799
10800ipv6type=unknown
10801ipv6lib=none
10802ipv6trylibc=no
10803
10804if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10806$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010807 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10808 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 case $i in
10810 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814#include <netinet/in.h>
10815#ifdef IPV6_INRIA_VERSION
10816yes
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010821 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010823rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824
10825 ;;
10826 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010828/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830#include <netinet/in.h>
10831#ifdef __KAME__
10832yes
10833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010834_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837 ipv6type=$i;
10838 ipv6lib=inet6
10839 ipv6libdir=/usr/local/v6/lib
10840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843
10844 ;;
10845 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849#include <features.h>
10850#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10851yes
10852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010853_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 ipv6type=$i;
10857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010859rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860
10861 ;;
10862 linux-inet6)
10863 if test -d /usr/inet6; then
10864 ipv6type=$i
10865 ipv6lib=inet6
10866 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010867 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 fi
10869 ;;
10870 solaris)
10871 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010872 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873 ipv6type=$i
10874 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 fi
10876 fi
10877 ;;
10878 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882#include <sys/param.h>
10883#ifdef _TOSHIBA_INET6
10884yes
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889 ipv6type=$i;
10890 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010891 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894
10895 ;;
10896 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900#include </usr/local/v6/include/sys/v6config.h>
10901#ifdef __V6D__
10902yes
10903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 ipv6type=$i;
10908 ipv6lib=v6;
10909 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010910 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913
10914 ;;
10915 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919#include <sys/param.h>
10920#ifdef _ZETA_MINAMI_INET6
10921yes
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6type=$i;
10927 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010928 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931
10932 ;;
10933 esac
10934 if test "$ipv6type" != "unknown"; then
10935 break
10936 fi
10937 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10939$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940fi
10941
10942if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10943 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10944 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10945 echo "using lib$ipv6lib"
10946 else
10947 if test $ipv6trylibc = "yes"; then
10948 echo "using libc"
10949 else
10950 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10951 echo "You need to fetch lib$ipv6lib.a from appropriate"
10952 echo 'ipv6 kit and compile beforehand.'
10953 exit 1
10954 fi
10955 fi
10956fi
10957
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10959$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10961/* end confdefs.h. */
10962 /* CAN_RAW_FD_FRAMES available check */
10963#include <linux/can/raw.h>
10964int
10965main ()
10966{
10967int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972if ac_fn_c_try_compile "$LINENO"; then :
10973
10974
10975$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10976
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10978$as_echo "yes" >&6; }
10979
10980else
10981
10982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
10984
10985fi
10986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10987
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10990$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010993if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994 withval=$with_doc_strings;
10995fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010996
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
10998if test -z "$with_doc_strings"
10999then with_doc_strings="yes"
11000fi
11001if test "$with_doc_strings" != "no"
11002then
11003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011005
11006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11008$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011009
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011010# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11012$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 withval=$with_pymalloc;
11017fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011018
Neil Schemenauera35c6882001-02-27 04:45:05 +000011019
Neil Schemenauer16c22972002-03-22 15:34:49 +000011020if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011021then
11022 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011023fi
11024if test "$with_pymalloc" != "no"
11025then
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011028
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011029 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11032$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011033
Nick Coghlan6ea41862017-06-11 13:16:15 +100011034# Check for --with-c-locale-coercion
11035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11036$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11037
11038# Check whether --with-c-locale-coercion was given.
11039if test "${with_c_locale_coercion+set}" = set; then :
11040 withval=$with_c_locale_coercion;
11041fi
11042
11043
11044if test -z "$with_c_locale_coercion"
11045then
11046 with_c_locale_coercion="yes"
11047fi
11048if test "$with_c_locale_coercion" != "no"
11049then
11050
11051$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11052
11053fi
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11055$as_echo "$with_c_locale_coercion" >&6; }
11056
Benjamin Peterson05159c42009-12-03 03:01:27 +000011057# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11059$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011060
11061# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063 withval=$with_valgrind;
11064else
11065 with_valgrind=no
11066fi
11067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11069$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011070if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 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 +020011072if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075
11076else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011077 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011078
11079fi
11080
11081
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011082 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011083fi
11084
Łukasz Langaa785c872016-09-09 17:37:37 -070011085# Check for DTrace support
11086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11087$as_echo_n "checking for --with-dtrace... " >&6; }
11088
11089# Check whether --with-dtrace was given.
11090if test "${with_dtrace+set}" = set; then :
11091 withval=$with_dtrace;
11092else
11093 with_dtrace=no
11094fi
11095
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11097$as_echo "$with_dtrace" >&6; }
11098
11099
11100
11101
11102
11103DTRACE=
11104DFLAGS=
11105DTRACE_HEADERS=
11106DTRACE_OBJS=
11107
11108if test "$with_dtrace" = "yes"
11109then
11110 # Extract the first word of "dtrace", so it can be a program name with args.
11111set dummy dtrace; ac_word=$2
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11113$as_echo_n "checking for $ac_word... " >&6; }
11114if ${ac_cv_path_DTRACE+:} false; then :
11115 $as_echo_n "(cached) " >&6
11116else
11117 case $DTRACE in
11118 [\\/]* | ?:[\\/]*)
11119 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11120 ;;
11121 *)
11122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11123for as_dir in $PATH
11124do
11125 IFS=$as_save_IFS
11126 test -z "$as_dir" && as_dir=.
11127 for ac_exec_ext in '' $ac_executable_extensions; do
11128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11129 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11131 break 2
11132 fi
11133done
11134 done
11135IFS=$as_save_IFS
11136
11137 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11138 ;;
11139esac
11140fi
11141DTRACE=$ac_cv_path_DTRACE
11142if test -n "$DTRACE"; then
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11144$as_echo "$DTRACE" >&6; }
11145else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147$as_echo "no" >&6; }
11148fi
11149
11150
11151 if test "$DTRACE" = "not found"; then
11152 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11153 fi
11154
11155$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11156
11157 DTRACE_HEADERS="Include/pydtrace_probes.h"
11158
11159 # On OS X, DTrace providers do not need to be explicitly compiled and
11160 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11161 # generation flag '-G'. We check for presence of this flag, rather than
11162 # hardcoding support by OS, in the interest of robustness.
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11164$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11165if ${ac_cv_dtrace_link+:} false; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168 ac_cv_dtrace_link=no
11169 echo 'BEGIN' > conftest.d
11170 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11171 ac_cv_dtrace_link=yes
11172
11173fi
11174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11175$as_echo "$ac_cv_dtrace_link" >&6; }
11176 if test "$ac_cv_dtrace_link" = "yes"; then
11177 DTRACE_OBJS="Python/pydtrace.o"
11178 fi
11179fi
11180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011181# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Guido van Rossum98935bf2001-09-05 19:13:16 +000011183DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184
Guido van Rossume97ee181999-12-20 21:27:22 +000011185# the dlopen() function means we might want to use dynload_shlib.o. some
11186# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011187for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011188do :
11189 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011190if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011193_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011194
Guido van Rossume97ee181999-12-20 21:27:22 +000011195fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011196done
Guido van Rossume97ee181999-12-20 21:27:22 +000011197
Michael W. Hudson54241132001-12-07 15:38:26 +000011198
Guido van Rossume97ee181999-12-20 21:27:22 +000011199# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11200# loading of modules.
11201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11203$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011204if test -z "$DYNLOADFILE"
11205then
11206 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011207 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11208 if test "$ac_cv_func_dlopen" = yes
11209 then DYNLOADFILE="dynload_shlib.o"
11210 else DYNLOADFILE="dynload_aix.o"
11211 fi
11212 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011213 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011214 *)
11215 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11216 # out any dynamic loading
11217 if test "$ac_cv_func_dlopen" = yes
11218 then DYNLOADFILE="dynload_shlib.o"
11219 else DYNLOADFILE="dynload_stub.o"
11220 fi
11221 ;;
11222 esac
11223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11225$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011226if test "$DYNLOADFILE" != "dynload_stub.o"
11227then
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011230
11231fi
11232
Neil Schemenauer4e425612001-06-19 15:44:15 +000011233# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11234
Michael W. Hudson54241132001-12-07 15:38:26 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11237$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011238if test -z "$MACHDEP_OBJS"
11239then
Jack Jansene578a632001-08-15 01:27:14 +000011240 MACHDEP_OBJS=$extra_machdep_objs
11241else
11242 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011243fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011244if test -z "$MACHDEP_OBJS"; then
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11246$as_echo "none" >&6; }
11247else
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11249$as_echo "$MACHDEP_OBJS" >&6; }
11250fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011251
Guido van Rossum627b2d71993-12-24 10:39:16 +000011252# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011253for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011254 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011255 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011256 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011257 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011258 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011259 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011260 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011261 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011262 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011263 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011264 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011265 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011266 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011267 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011268 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011269 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11270 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011271 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011272 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011273 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011274 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011275 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011276do :
11277 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11278ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011279if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011282_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011283
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011284fi
11285done
11286
Michael W. Hudson54241132001-12-07 15:38:26 +000011287
Benjamin Peterson40caa052018-09-12 15:52:40 -070011288# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11289# links. Some libc implementations have a stub lchmod implementation that always
11290# returns an error.
11291if test "$MACHDEP" != linux; then
11292 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11293if test "x$ac_cv_func_lchmod" = xyes; then :
11294
11295fi
11296
11297fi
11298
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011299ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11300 #include <dirent.h>
11301"
11302if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11303
11304$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11305
11306fi
11307
11308
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309# For some functions, having a definition is not sufficient, since
11310# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11312$as_echo_n "checking for chroot... " >&6; }
11313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316int
11317main ()
11318{
11319void *x=chroot
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11337$as_echo_n "checking for link... " >&6; }
11338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341int
11342main ()
11343{
11344void *x=link
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358
11359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11362$as_echo_n "checking for symlink... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011366int
11367main ()
11368{
11369void *x=symlink
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011383
11384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11387$as_echo_n "checking for fchdir... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390#include <unistd.h>
11391int
11392main ()
11393{
11394void *x=fchdir
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402
Matthias Kloseb159a552010-04-25 21:00:44 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408
11409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11412$as_echo_n "checking for fsync... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415#include <unistd.h>
11416int
11417main ()
11418{
11419void *x=fsync
11420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
Matthias Kloseb159a552010-04-25 21:00:44 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430else
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433
11434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11437$as_echo_n "checking for fdatasync... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011439/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440#include <unistd.h>
11441int
11442main ()
11443{
11444void *x=fdatasync
11445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011452
Matthias Kloseb159a552010-04-25 21:00:44 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011458
11459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11462$as_echo_n "checking for epoll... " >&6; }
11463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011464/* end confdefs.h. */
11465#include <sys/epoll.h>
11466int
11467main ()
11468{
11469void *x=epoll_create
11470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011477
Matthias Kloseb159a552010-04-25 21:00:44 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483
11484fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11487$as_echo_n "checking for epoll_create1... " >&6; }
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11489/* end confdefs.h. */
11490#include <sys/epoll.h>
11491int
11492main ()
11493{
11494void *x=epoll_create1
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499if ac_fn_c_try_compile "$LINENO"; then :
11500
11501$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11502
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11504$as_echo "yes" >&6; }
11505else
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
11508
11509fi
11510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11512$as_echo_n "checking for kqueue... " >&6; }
11513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011514/* end confdefs.h. */
11515
11516#include <sys/types.h>
11517#include <sys/event.h>
11518
11519int
11520main ()
11521{
11522int x=kqueue()
11523 ;
11524 return 0;
11525}
11526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011527if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011530
Matthias Kloseb159a552010-04-25 21:00:44 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011532$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011533else
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011536
11537fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11540$as_echo_n "checking for prlimit... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11542/* end confdefs.h. */
11543
11544#include <sys/time.h>
11545#include <sys/resource.h>
11546
11547int
11548main ()
11549{
11550void *x=prlimit
11551 ;
11552 return 0;
11553}
11554_ACEOF
11555if ac_fn_c_try_compile "$LINENO"; then :
11556
11557$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11558
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11560$as_echo "yes" >&6; }
11561else
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
11564
11565fi
11566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11567
Martin v. Löwisd5843682002-11-21 20:41:28 +000011568# On some systems (eg. FreeBSD 5), we would find a definition of the
11569# functions ctermid_r, setgroups in the library, but no prototype
11570# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11571# address to avoid compiler warnings and potential miscompilations
11572# because of the missing prototypes.
11573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11575$as_echo_n "checking for ctermid_r... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011578
Martin v. Löwisd5843682002-11-21 20:41:28 +000011579#include <stdio.h>
11580
Martin v. Löwisd5843682002-11-21 20:41:28 +000011581int
11582main ()
11583{
11584void* p = ctermid_r
11585 ;
11586 return 0;
11587}
11588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011592
Matthias Kloseb159a552010-04-25 21:00:44 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011598
11599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11601
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11603$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011604if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011605 $as_echo_n "(cached) " >&6
11606else
11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011609#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011610int
11611main ()
11612{
11613void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011615 ;
11616 return 0;
11617}
11618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011619if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620 ac_cv_flock_decl=yes
11621else
11622 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011623
11624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011626
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011627fi
11628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11629$as_echo "$ac_cv_flock_decl" >&6; }
11630if test "x${ac_cv_flock_decl}" = xyes; then
11631 for ac_func in flock
11632do :
11633 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011634if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011635 cat >>confdefs.h <<_ACEOF
11636#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011637_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011638
Antoine Pitroua3000072010-09-07 14:52:42 +000011639else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011641$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011642if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011643 $as_echo_n "(cached) " >&6
11644else
11645 ac_check_lib_save_LIBS=$LIBS
11646LIBS="-lbsd $LIBS"
11647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11648/* end confdefs.h. */
11649
11650/* Override any GCC internal prototype to avoid an error.
11651 Use char because int might match the return type of a GCC
11652 builtin and then its argument prototype would still apply. */
11653#ifdef __cplusplus
11654extern "C"
11655#endif
11656char flock ();
11657int
11658main ()
11659{
11660return flock ();
11661 ;
11662 return 0;
11663}
11664_ACEOF
11665if ac_fn_c_try_link "$LINENO"; then :
11666 ac_cv_lib_bsd_flock=yes
11667else
11668 ac_cv_lib_bsd_flock=no
11669fi
11670rm -f core conftest.err conftest.$ac_objext \
11671 conftest$ac_exeext conftest.$ac_ext
11672LIBS=$ac_check_lib_save_LIBS
11673fi
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11675$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011676if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011677 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011678
11679
11680$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11681
11682
11683fi
11684
11685
11686fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011687done
11688
Antoine Pitroua3000072010-09-07 14:52:42 +000011689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11692$as_echo_n "checking for getpagesize... " >&6; }
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011696#include <unistd.h>
11697
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011698int
11699main ()
11700{
11701void* p = getpagesize
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011709
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011715
11716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011718
Victor Stinner984890f2011-11-24 13:53:38 +010011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11720$as_echo_n "checking for broken unsetenv... " >&6; }
11721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11722/* end confdefs.h. */
11723
11724#include <stdlib.h>
11725
11726int
11727main ()
11728{
11729int res = unsetenv("DUMMY")
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734if ac_fn_c_try_compile "$LINENO"; then :
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
11737else
11738
11739$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11740
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11742$as_echo "yes" >&6; }
11743
11744fi
11745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11746
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011747for ac_prog in true
11748do
11749 # Extract the first word of "$ac_prog", so it can be a program name with args.
11750set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011753if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755else
11756 if test -n "$TRUE"; then
11757 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11758else
11759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11760for as_dir in $PATH
11761do
11762 IFS=$as_save_IFS
11763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011766 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $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 +000011768 break 2
11769 fi
11770done
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011773
11774fi
11775fi
11776TRUE=$ac_cv_prog_TRUE
11777if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11779$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780else
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11782$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011783fi
11784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011786 test -n "$TRUE" && break
11787done
11788test -n "$TRUE" || TRUE="/bin/true"
11789
11790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11792$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011793if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795else
11796 ac_check_lib_save_LIBS=$LIBS
11797LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011799/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801/* Override any GCC internal prototype to avoid an error.
11802 Use char because int might match the return type of a GCC
11803 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011804#ifdef __cplusplus
11805extern "C"
11806#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808int
11809main ()
11810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011811return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812 ;
11813 return 0;
11814}
11815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817 ac_cv_lib_c_inet_aton=yes
11818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011821rm -f core conftest.err conftest.$ac_objext \
11822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823LIBS=$ac_check_lib_save_LIBS
11824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11826$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011828 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11831$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834else
11835 ac_check_lib_save_LIBS=$LIBS
11836LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011838/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840/* Override any GCC internal prototype to avoid an error.
11841 Use char because int might match the return type of a GCC
11842 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843#ifdef __cplusplus
11844extern "C"
11845#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011846char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011847int
11848main ()
11849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011850return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011851 ;
11852 return 0;
11853}
11854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856 ac_cv_lib_resolv_inet_aton=yes
11857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011860rm -f core conftest.err conftest.$ac_objext \
11861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862LIBS=$ac_check_lib_save_LIBS
11863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11865$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011867 cat >>confdefs.h <<_ACEOF
11868#define HAVE_LIBRESOLV 1
11869_ACEOF
11870
11871 LIBS="-lresolv $LIBS"
11872
11873fi
11874
11875
11876fi
11877
11878
Christian Heimesd0764e22007-12-04 15:00:33 +000011879# On Tru64, chflags seems to be present, but calling it will
11880# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11882$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011883if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011887 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011890/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011891
Christian Heimesd0764e22007-12-04 15:00:33 +000011892#include <sys/stat.h>
11893#include <unistd.h>
11894int main(int argc, char*argv[])
11895{
11896 if(chflags(argv[0], 0) != 0)
11897 return 1;
11898 return 0;
11899}
Ned Deily3eb67d52011-06-28 00:00:28 -070011900
Christian Heimesd0764e22007-12-04 15:00:33 +000011901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011909fi
11910
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11914$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011915if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011917if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011918 ac_cv_have_chflags="yes"
11919else
11920 ac_cv_have_chflags="no"
11921fi
11922
11923fi
11924if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011927
11928fi
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11931$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011932if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011936 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011939/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011940
Christian Heimesd0764e22007-12-04 15:00:33 +000011941#include <sys/stat.h>
11942#include <unistd.h>
11943int main(int argc, char*argv[])
11944{
11945 if(lchflags(argv[0], 0) != 0)
11946 return 1;
11947 return 0;
11948}
Ned Deily3eb67d52011-06-28 00:00:28 -070011949
Christian Heimesd0764e22007-12-04 15:00:33 +000011950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011951if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011952 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011953else
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11957 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958fi
11959
11960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11963$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011964if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011966if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011967 ac_cv_have_lchflags="yes"
11968else
11969 ac_cv_have_lchflags="no"
11970fi
11971
11972fi
11973if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011976
11977fi
11978
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011979case $ac_sys_system/$ac_sys_release in
11980Darwin/*)
11981 _CUR_CFLAGS="${CFLAGS}"
11982 _CUR_LDFLAGS="${LDFLAGS}"
11983 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11984 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11985 ;;
11986esac
11987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11989$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011990if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011992else
11993 ac_check_lib_save_LIBS=$LIBS
11994LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011996/* end confdefs.h. */
11997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998/* Override any GCC internal prototype to avoid an error.
11999 Use char because int might match the return type of a GCC
12000 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012001#ifdef __cplusplus
12002extern "C"
12003#endif
12004char inflateCopy ();
12005int
12006main ()
12007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014 ac_cv_lib_z_inflateCopy=yes
12015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012018rm -f core conftest.err conftest.$ac_objext \
12019 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012020LIBS=$ac_check_lib_save_LIBS
12021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12023$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012027
12028fi
12029
12030
12031case $ac_sys_system/$ac_sys_release in
12032Darwin/*)
12033 CFLAGS="${_CUR_CFLAGS}"
12034 LDFLAGS="${_CUR_LDFLAGS}"
12035 ;;
12036esac
12037
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12039$as_echo_n "checking for hstrerror... " >&6; }
12040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012042
Martin v. Löwise9416172003-05-03 10:12:45 +000012043#include <netdb.h>
12044
Martin v. Löwise9416172003-05-03 10:12:45 +000012045int
12046main ()
12047{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012049 ;
12050 return 0;
12051}
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012056
Matthias Kloseb159a552010-04-25 21:00:44 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12061$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012062
12063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012064rm -f core conftest.err conftest.$ac_objext \
12065 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012066
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12068$as_echo_n "checking for inet_aton... " >&6; }
12069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012071
Martin v. Löwis86d66262006-02-17 08:40:11 +000012072#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012073#include <sys/socket.h>
12074#include <netinet/in.h>
12075#include <arpa/inet.h>
12076
Martin v. Löwise9416172003-05-03 10:12:45 +000012077int
12078main ()
12079{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012080void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012088
Matthias Kloseb159a552010-04-25 21:00:44 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012090$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12093$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012094
12095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012096rm -f core conftest.err conftest.$ac_objext \
12097 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12100$as_echo_n "checking for inet_pton... " >&6; }
12101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012102/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012103
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012104#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012105#include <sys/socket.h>
12106#include <netinet/in.h>
12107#include <arpa/inet.h>
12108
Martin v. Löwise9416172003-05-03 10:12:45 +000012109int
12110main ()
12111{
12112void* p = inet_pton
12113 ;
12114 return 0;
12115}
12116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012117if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012120
Matthias Kloseb159a552010-04-25 21:00:44 +000012121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012122$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012126
12127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012129
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012130# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12132$as_echo_n "checking for setgroups... " >&6; }
12133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012135
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012136#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012137#ifdef HAVE_GRP_H
12138#include <grp.h>
12139#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141int
12142main ()
12143{
12144void* p = setgroups
12145 ;
12146 return 0;
12147}
12148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012150
Matthias Kloseb9621712010-04-24 17:59:49 +000012151$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012152
Matthias Kloseb159a552010-04-25 21:00:44 +000012153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012154$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12157$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012158
12159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012161
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012162# check for openpty and forkpty
12163
12164for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012165do :
12166 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012167if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012170_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12174$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177else
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183/* Override any GCC internal prototype to avoid an error.
12184 Use char because int might match the return type of a GCC
12185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012186#ifdef __cplusplus
12187extern "C"
12188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012189char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012190int
12191main ()
12192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203rm -f core conftest.err conftest.$ac_objext \
12204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012205LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12208$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12214$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012215if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217else
12218 ac_check_lib_save_LIBS=$LIBS
12219LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221/* end confdefs.h. */
12222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223/* Override any GCC internal prototype to avoid an error.
12224 Use char because int might match the return type of a GCC
12225 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226#ifdef __cplusplus
12227extern "C"
12228#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012229char openpty ();
12230int
12231main ()
12232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234 ;
12235 return 0;
12236}
12237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239 ac_cv_lib_bsd_openpty=yes
12240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243rm -f core conftest.err conftest.$ac_objext \
12244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245LIBS=$ac_check_lib_save_LIBS
12246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12248$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012251 LIBS="$LIBS -lbsd"
12252fi
12253
12254
12255fi
12256
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257
12258fi
12259done
12260
12261for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012262do :
12263 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012264if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012267_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268
Fred Drake8cef4cf2000-06-28 16:40:38 +000012269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12271$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012272if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274else
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012276LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280/* Override any GCC internal prototype to avoid an error.
12281 Use char because int might match the return type of a GCC
12282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012283#ifdef __cplusplus
12284extern "C"
12285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012286char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012300rm -f core conftest.err conftest.$ac_objext \
12301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012302LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12305$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12311$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314else
12315 ac_check_lib_save_LIBS=$LIBS
12316LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012318/* end confdefs.h. */
12319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320/* Override any GCC internal prototype to avoid an error.
12321 Use char because int might match the return type of a GCC
12322 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012323#ifdef __cplusplus
12324extern "C"
12325#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012326char forkpty ();
12327int
12328main ()
12329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336 ac_cv_lib_bsd_forkpty=yes
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340rm -f core conftest.err conftest.$ac_objext \
12341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012342LIBS=$ac_check_lib_save_LIBS
12343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12345$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012346if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012348 LIBS="$LIBS -lbsd"
12349fi
12350
12351
12352fi
12353
Fred Drake8cef4cf2000-06-28 16:40:38 +000012354
12355fi
12356done
12357
Jack Jansendd19cf82001-12-06 22:36:17 +000012358
Michael W. Hudson54241132001-12-07 15:38:26 +000012359# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012360for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012361do :
12362 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12363ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012364if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012367_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012369fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012370done
12371
Michael W. Hudson54241132001-12-07 15:38:26 +000012372
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012373ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012374if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012375 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012376
Martin v. Löwis1142de32002-03-29 16:28:31 +000012377else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012379 *" dup2.$ac_objext "* ) ;;
12380 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012382esac
12383
Martin v. Löwis1142de32002-03-29 16:28:31 +000012384fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012385
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012386ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012387if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012388 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12389
12390else
12391 case " $LIBOBJS " in
12392 *" strdup.$ac_objext "* ) ;;
12393 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12394 ;;
12395esac
12396
12397fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012398
12399
12400for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012401do :
12402 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012403if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012408/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012410int
12411main ()
12412{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 ;
12415 return 0;
12416}
12417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012421
Guido van Rossum627b2d71993-12-24 10:39:16 +000012422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012424
Guido van Rossum627b2d71993-12-24 10:39:16 +000012425fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012426done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012427
Jack Jansen150753c2003-03-29 22:07:47 +000012428for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012429do :
12430 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012431if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012437#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012438int
12439main ()
12440{
12441setpgrp(0,0);
12442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012449
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012452
12453fi
12454done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012455
Thomas Wouters3a584202000-08-05 23:28:51 +000012456for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012457do :
12458 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012466int
12467main ()
12468{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 ;
12471 return 0;
12472}
12473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_compile "$LINENO"; then :
12475
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476else
Skip Montanaro6dead952003-09-25 14:50:04 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Guido van Rossum627b2d71993-12-24 10:39:16 +000012481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012483
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012485done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486
Michael W. Hudson54241132001-12-07 15:38:26 +000012487
Victor Stinnere0be4232011-10-25 13:06:09 +020012488for ac_func in clock_gettime
12489do :
12490 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12491if test "x$ac_cv_func_clock_gettime" = xyes; then :
12492 cat >>confdefs.h <<_ACEOF
12493#define HAVE_CLOCK_GETTIME 1
12494_ACEOF
12495
12496else
12497
12498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12499$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12500if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12501 $as_echo_n "(cached) " >&6
12502else
12503 ac_check_lib_save_LIBS=$LIBS
12504LIBS="-lrt $LIBS"
12505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12506/* end confdefs.h. */
12507
12508/* Override any GCC internal prototype to avoid an error.
12509 Use char because int might match the return type of a GCC
12510 builtin and then its argument prototype would still apply. */
12511#ifdef __cplusplus
12512extern "C"
12513#endif
12514char clock_gettime ();
12515int
12516main ()
12517{
12518return clock_gettime ();
12519 ;
12520 return 0;
12521}
12522_ACEOF
12523if ac_fn_c_try_link "$LINENO"; then :
12524 ac_cv_lib_rt_clock_gettime=yes
12525else
12526 ac_cv_lib_rt_clock_gettime=no
12527fi
12528rm -f core conftest.err conftest.$ac_objext \
12529 conftest$ac_exeext conftest.$ac_ext
12530LIBS=$ac_check_lib_save_LIBS
12531fi
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12533$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12534if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12535
Victor Stinner7efb8332014-08-29 15:41:08 +020012536 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012537 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12538
12539
12540$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12541
12542
12543fi
12544
12545
12546fi
12547done
12548
12549
12550for ac_func in clock_getres
12551do :
12552 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12553if test "x$ac_cv_func_clock_getres" = xyes; then :
12554 cat >>confdefs.h <<_ACEOF
12555#define HAVE_CLOCK_GETRES 1
12556_ACEOF
12557
12558else
12559
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12561$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12562if ${ac_cv_lib_rt_clock_getres+:} false; then :
12563 $as_echo_n "(cached) " >&6
12564else
12565 ac_check_lib_save_LIBS=$LIBS
12566LIBS="-lrt $LIBS"
12567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12568/* end confdefs.h. */
12569
12570/* Override any GCC internal prototype to avoid an error.
12571 Use char because int might match the return type of a GCC
12572 builtin and then its argument prototype would still apply. */
12573#ifdef __cplusplus
12574extern "C"
12575#endif
12576char clock_getres ();
12577int
12578main ()
12579{
12580return clock_getres ();
12581 ;
12582 return 0;
12583}
12584_ACEOF
12585if ac_fn_c_try_link "$LINENO"; then :
12586 ac_cv_lib_rt_clock_getres=yes
12587else
12588 ac_cv_lib_rt_clock_getres=no
12589fi
12590rm -f core conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
12592LIBS=$ac_check_lib_save_LIBS
12593fi
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12595$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12596if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12597
12598 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12599
12600
12601fi
12602
12603
12604fi
12605done
12606
12607
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012608for ac_func in clock_settime
12609do :
12610 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12611if test "x$ac_cv_func_clock_settime" = xyes; then :
12612 cat >>confdefs.h <<_ACEOF
12613#define HAVE_CLOCK_SETTIME 1
12614_ACEOF
12615
12616else
12617
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12619$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12620if ${ac_cv_lib_rt_clock_settime+:} false; then :
12621 $as_echo_n "(cached) " >&6
12622else
12623 ac_check_lib_save_LIBS=$LIBS
12624LIBS="-lrt $LIBS"
12625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12626/* end confdefs.h. */
12627
12628/* Override any GCC internal prototype to avoid an error.
12629 Use char because int might match the return type of a GCC
12630 builtin and then its argument prototype would still apply. */
12631#ifdef __cplusplus
12632extern "C"
12633#endif
12634char clock_settime ();
12635int
12636main ()
12637{
12638return clock_settime ();
12639 ;
12640 return 0;
12641}
12642_ACEOF
12643if ac_fn_c_try_link "$LINENO"; then :
12644 ac_cv_lib_rt_clock_settime=yes
12645else
12646 ac_cv_lib_rt_clock_settime=no
12647fi
12648rm -f core conftest.err conftest.$ac_objext \
12649 conftest$ac_exeext conftest.$ac_ext
12650LIBS=$ac_check_lib_save_LIBS
12651fi
12652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12653$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12654if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12655
12656 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12657
12658
12659fi
12660
12661
12662fi
12663done
12664
12665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12667$as_echo_n "checking for major... " >&6; }
12668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012670
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012671#if defined(MAJOR_IN_MKDEV)
12672#include <sys/mkdev.h>
12673#elif defined(MAJOR_IN_SYSMACROS)
12674#include <sys/sysmacros.h>
12675#else
12676#include <sys/types.h>
12677#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012679int
12680main ()
12681{
12682
12683 makedev(major(0),minor(0));
12684
12685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012690
12691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12695$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
12697else
Skip Montanaro6dead952003-09-25 14:50:04 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12700$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012701
12702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012703rm -f core conftest.err conftest.$ac_objext \
12704 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012705
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012706# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012707# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12709$as_echo_n "checking for getaddrinfo... " >&6; }
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012712
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012713#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012714#include <sys/socket.h>
12715#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012716#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718int
12719main ()
12720{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012721getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012722 ;
12723 return 0;
12724}
12725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012727 have_getaddrinfo=yes
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core conftest.err conftest.$ac_objext \
12732 conftest$ac_exeext conftest.$ac_ext
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12734$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012735if test $have_getaddrinfo = yes
12736then
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12738$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012739 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012743
12744if test "${enable_ipv6+set}" = set; then
12745 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12746else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012747 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012748fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752
Stefan Krah19c21392012-11-22 23:47:32 +010012753#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754#include <sys/types.h>
12755#include <netdb.h>
12756#include <string.h>
12757#include <sys/socket.h>
12758#include <netinet/in.h>
12759
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012760int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012761{
12762 int passive, gaierr, inet4 = 0, inet6 = 0;
12763 struct addrinfo hints, *ai, *aitop;
12764 char straddr[INET6_ADDRSTRLEN], strport[16];
12765
12766 for (passive = 0; passive <= 1; passive++) {
12767 memset(&hints, 0, sizeof(hints));
12768 hints.ai_family = AF_UNSPEC;
12769 hints.ai_flags = passive ? AI_PASSIVE : 0;
12770 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012771 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012772 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12773 (void)gai_strerror(gaierr);
12774 goto bad;
12775 }
12776 for (ai = aitop; ai; ai = ai->ai_next) {
12777 if (ai->ai_addr == NULL ||
12778 ai->ai_addrlen == 0 ||
12779 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12780 straddr, sizeof(straddr), strport, sizeof(strport),
12781 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12782 goto bad;
12783 }
12784 switch (ai->ai_family) {
12785 case AF_INET:
12786 if (strcmp(strport, "54321") != 0) {
12787 goto bad;
12788 }
12789 if (passive) {
12790 if (strcmp(straddr, "0.0.0.0") != 0) {
12791 goto bad;
12792 }
12793 } else {
12794 if (strcmp(straddr, "127.0.0.1") != 0) {
12795 goto bad;
12796 }
12797 }
12798 inet4++;
12799 break;
12800 case AF_INET6:
12801 if (strcmp(strport, "54321") != 0) {
12802 goto bad;
12803 }
12804 if (passive) {
12805 if (strcmp(straddr, "::") != 0) {
12806 goto bad;
12807 }
12808 } else {
12809 if (strcmp(straddr, "::1") != 0) {
12810 goto bad;
12811 }
12812 }
12813 inet6++;
12814 break;
12815 case AF_UNSPEC:
12816 goto bad;
12817 break;
12818 default:
12819 /* another family support? */
12820 break;
12821 }
12822 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012823 freeaddrinfo(aitop);
12824 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012825 }
12826
12827 if (!(inet4 == 0 || inet4 == 2))
12828 goto bad;
12829 if (!(inet6 == 0 || inet6 == 2))
12830 goto bad;
12831
12832 if (aitop)
12833 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012834 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835
12836 bad:
12837 if (aitop)
12838 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012839 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012840}
12841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012844 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012852fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12857$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12858
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012859if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012860then
12861 if test $ipv6 = yes
12862 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012863 echo 'Fatal: You must get working getaddrinfo() function.'
12864 echo ' or you can specify "--disable-ipv6"'.
12865 exit 1
12866 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012867else
Martin v. Löwis11437992002-04-12 09:54:03 +000012868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012870
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012871fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012872
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012873for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012874do :
12875 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012876if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012879_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012880
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881fi
12882done
12883
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12887$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012888if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012892/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893#include <sys/types.h>
12894#include <sys/time.h>
12895#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Martin v. Löwis11437992002-04-12 09:54:03 +000012897int
12898main ()
12899{
12900if ((struct tm *) 0)
12901return 0;
12902 ;
12903 return 0;
12904}
12905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012906if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12914$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012915if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918
12919fi
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12922$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012923if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928#include <sys/types.h>
12929#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Martin v. Löwis11437992002-04-12 09:54:03 +000012931int
12932main ()
12933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934struct tm tm;
12935 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ;
12938 return 0;
12939}
12940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012941if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942 ac_cv_struct_tm=time.h
12943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12949$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012950if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953
12954fi
12955
Matthias Kloseb9621712010-04-24 17:59:49 +000012956ac_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 +000012957#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959"
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
12962cat >>confdefs.h <<_ACEOF
12963#define HAVE_STRUCT_TM_TM_ZONE 1
12964_ACEOF
12965
12966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972
12973else
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12975"
Victor Stinnere0be4232011-10-25 13:06:09 +020012976if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980fi
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984_ACEOF
12985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12987$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012988if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012992/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994#if !HAVE_DECL_TZNAME
12995extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998int
12999main ()
13000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ;
13003 return 0;
13004}
13005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013006if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007 ac_cv_var_tzname=yes
13008else
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013011rm -f core conftest.err conftest.$ac_objext \
13012 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13015$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013016 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013019
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020 fi
13021fi
13022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023ac_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 +020013024if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026cat >>confdefs.h <<_ACEOF
13027#define HAVE_STRUCT_STAT_ST_RDEV 1
13028_ACEOF
13029
13030
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033ac_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 +020013034if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013035
Martin v. Löwis11437992002-04-12 09:54:03 +000013036cat >>confdefs.h <<_ACEOF
13037#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13038_ACEOF
13039
13040
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013041fi
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043ac_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 +020013044if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013045
13046cat >>confdefs.h <<_ACEOF
13047#define HAVE_STRUCT_STAT_ST_FLAGS 1
13048_ACEOF
13049
13050
13051fi
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053ac_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 +020013054if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013055
13056cat >>confdefs.h <<_ACEOF
13057#define HAVE_STRUCT_STAT_ST_GEN 1
13058_ACEOF
13059
13060
13061fi
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063ac_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 +020013064if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013065
13066cat >>confdefs.h <<_ACEOF
13067#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13068_ACEOF
13069
13070
13071fi
13072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073ac_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 +020013074if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076cat >>confdefs.h <<_ACEOF
13077#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13078_ACEOF
13079
13080
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013081fi
13082
Stefan Krah267b6392016-04-26 01:09:18 +020013083ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13084 #include <sys/types.h>
13085 #include <pwd.h>
13086
13087"
13088if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13089
13090cat >>confdefs.h <<_ACEOF
13091#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13092_ACEOF
13093
13094
13095fi
13096ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13097 #include <sys/types.h>
13098 #include <pwd.h>
13099
13100"
13101if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13105_ACEOF
13106
13107
13108fi
13109
Zachary Ware6a6967e2016-10-01 00:47:27 -050013110# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13111ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13112"
13113if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_SIGINFO_T_SI_BAND 1
13117_ACEOF
13118
13119
13120fi
13121
Michael W. Hudson54241132001-12-07 15:38:26 +000013122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13124$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013127else
Matthias Kloseb159a552010-04-25 21:00:44 +000013128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013130/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013131#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013132int
13133main ()
13134{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ;
13137 return 0;
13138}
13139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013140if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141 ac_cv_header_time_altzone=yes
13142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147fi
13148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13150$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013151if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
13155fi
13156
Guido van Rossumda88dad1995-01-26 00:46:29 +000013157was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13159$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013162
13163#include <sys/types.h>
13164#include <sys/select.h>
13165#include <sys/time.h>
13166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167int
13168main ()
13169{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013170;
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 ;
13172 return 0;
13173}
13174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013180 was_it_defined=yes
13181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13185$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13188$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013189if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191else
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013193/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013194#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013195int
13196main ()
13197{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204 ac_cv_struct_addrinfo=yes
13205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13209fi
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13212$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216
13217fi
13218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13220$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013221if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226
13227# include <sys/types.h>
13228# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013229int
13230main ()
13231{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238 ac_cv_struct_sockaddr_storage=yes
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13243fi
13244
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13246$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013247if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250
13251fi
13252
Christian Heimesdffa3942016-09-05 23:54:41 +020013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13254$as_echo_n "checking for sockaddr_alg... " >&6; }
13255if ${ac_cv_struct_sockaddr_alg+:} false; then :
13256 $as_echo_n "(cached) " >&6
13257else
13258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13259/* end confdefs.h. */
13260
13261# include <sys/types.h>
13262# include <sys/socket.h>
13263# include <linux/if_alg.h>
13264int
13265main ()
13266{
13267struct sockaddr_alg s
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272if ac_fn_c_try_compile "$LINENO"; then :
13273 ac_cv_struct_sockaddr_alg=yes
13274else
13275 ac_cv_struct_sockaddr_alg=no
13276fi
13277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278fi
13279
13280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13281$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13282if test $ac_cv_struct_sockaddr_alg = yes; then
13283
13284$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13285
13286fi
13287
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13291$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013292if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013297$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
13301static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013302test_array [0] = 0;
13303return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013304
13305 ;
13306 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013307}
Martin v. Löwis11437992002-04-12 09:54:03 +000013308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013310 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13317$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320
13321fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13324$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013325if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330
Martin v. Löwis11437992002-04-12 09:54:03 +000013331int
13332main ()
13333{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013336 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013338 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340 char const *const *pcpcc;
13341 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 /* NEC SVR4.0.2 mips cc rejects this. */
13343 struct point {int x, y;};
13344 static struct point const zero = {0,0};
13345 /* AIX XL C 1.02.0.0 rejects this.
13346 It does not let you subtract one const X* pointer from another in
13347 an arm of an if-expression whose if-part is not a constant
13348 expression */
13349 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352 ++pcpcc;
13353 ppc = (char**) pcpcc;
13354 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013355 { /* SCO 3.2v4 cc rejects this sort of thing. */
13356 char tx;
13357 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 }
13363 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13364 int x[] = {25, 17};
13365 const int *foo = &x[0];
13366 ++foo;
13367 }
13368 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13369 typedef const int *iptr;
13370 iptr p = 0;
13371 ++p;
13372 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013373 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013375 struct s { int j; const int *ap[3]; } bx;
13376 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 }
13378 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13379 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013383#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 ;
13386 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013387}
Martin v. Löwis11437992002-04-12 09:54:03 +000013388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013389if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390 ac_cv_c_const=yes
13391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13397$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401
13402fi
13403
Michael W. Hudson54241132001-12-07 15:38:26 +000013404
Guido van Rossumda88dad1995-01-26 00:46:29 +000013405works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13407$as_echo_n "checking for working signed char... " >&6; }
13408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013409/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411int
13412main ()
13413{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013414signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 ;
13416 return 0;
13417}
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013420 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013421else
Skip Montanaro6dead952003-09-25 14:50:04 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013424
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013425
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13429$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430
Guido van Rossumda88dad1995-01-26 00:46:29 +000013431have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13433$as_echo_n "checking for prototypes... " >&6; }
13434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Matthias Kloseb159a552010-04-25 21:00:44 +000013449 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13453$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454
Guido van Rossumda88dad1995-01-26 00:46:29 +000013455works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13457$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013460
13461#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013462int foo(int x, ...) {
13463 va_list va;
13464 va_start(va, x);
13465 va_arg(va, int);
13466 va_arg(va, char *);
13467 va_arg(va, double);
13468 return 0;
13469}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471int
13472main ()
13473{
Guido van Rossum90eea071996-08-30 20:58:57 +000013474return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 ;
13476 return 0;
13477}
13478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013484 works=yes
13485
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13489$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490
Martin v. Löwisd6320502004-08-12 13:45:08 +000013491# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13493$as_echo_n "checking for socketpair... " >&6; }
13494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013495/* end confdefs.h. */
13496
13497#include <sys/types.h>
13498#include <sys/socket.h>
13499
13500int
13501main ()
13502{
13503void *x=socketpair
13504 ;
13505 return 0;
13506}
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013511
Matthias Kloseb159a552010-04-25 21:00:44 +000013512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013517
13518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013520
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013521# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13523$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013526#include <sys/types.h>
13527#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013528int
13529main ()
13530{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013531struct sockaddr x;
13532x.sa_len = 0;
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 :
13538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13539$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013542
13543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13545$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013546
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013550# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013554if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13559$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560 OLD_CFLAGS=$CFLAGS
13561 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013563/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013564
13565# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
Martin v. Löwis11437992002-04-12 09:54:03 +000013567int
13568main ()
13569{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013570
13571 char *name;
13572 struct hostent *he, *res;
13573 char buffer[2048];
13574 int buflen = 2048;
13575 int h_errnop;
13576
13577 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013578
13579 ;
13580 return 0;
13581}
13582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013583if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013586
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13591$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013593else
Skip Montanaro6dead952003-09-25 14:50:04 +000013594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13596$as_echo "no" >&6; }
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13598$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013600/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013602# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604int
13605main ()
13606{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607
13608 char *name;
13609 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013610 char buffer[2048];
13611 int buflen = 2048;
13612 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013613
Matthias Kloseb159a552010-04-25 21:00:44 +000013614 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
13616 ;
13617 return 0;
13618}
13619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Matthias Kloseb159a552010-04-25 21:00:44 +000013625$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13628$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630else
Skip Montanaro6dead952003-09-25 14:50:04 +000013631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13635$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13637/* end confdefs.h. */
13638
13639# include <netdb.h>
13640
13641int
13642main ()
13643{
13644
13645 char *name;
13646 struct hostent *he;
13647 struct hostent_data data;
13648
13649 (void) gethostbyname_r(name, he, &data);
13650
13651 ;
13652 return 0;
13653}
13654_ACEOF
13655if ac_fn_c_try_compile "$LINENO"; then :
13656
13657 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13658
13659
13660$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13661
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13663$as_echo "yes" >&6; }
13664
13665else
13666
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13668$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678 CFLAGS=$OLD_CFLAGS
13679
13680else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 for ac_func in gethostbyname
13683do :
13684 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013685if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013688_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013689
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013690fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013691done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013694fi
13695
Michael W. Hudson54241132001-12-07 15:38:26 +000013696
13697
13698
13699
13700
13701
Guido van Rossum627b2d71993-12-24 10:39:16 +000013702# checks for system services
13703# (none yet)
13704
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013705# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013706ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013707if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013708
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13711$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013714else
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013716LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720/* Override any GCC internal prototype to avoid an error.
13721 Use char because int might match the return type of a GCC
13722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013723#ifdef __cplusplus
13724extern "C"
13725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013726char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013727int
13728main ()
13729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013730return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 ;
13732 return 0;
13733}
13734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013740rm -f core conftest.err conftest.$ac_objext \
13741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013742LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13745$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013746if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 cat >>confdefs.h <<_ACEOF
13748#define HAVE_LIBIEEE 1
13749_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013751 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752
Guido van Rossum627b2d71993-12-24 10:39:16 +000013753fi
13754
Michael W. Hudson54241132001-12-07 15:38:26 +000013755
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013756fi
13757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Guido van Rossum7f43da71994-08-01 12:15:30 +000013759# check for --with-libm=...
13760
Guido van Rossum563e7081996-09-10 18:20:48 +000013761case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013762Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013763*) LIBM=-lm
13764esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13766$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013769if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013771if test "$withval" = no
13772then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13774$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013775elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013776then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13778$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013779else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013780fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013781else
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13783$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784fi
13785
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786
13787# check for --with-libc=...
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13790$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013793if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013795if test "$withval" = no
13796then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13798$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013799elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013800then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13802$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013803else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013804fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013805else
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13807$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808fi
13809
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810
Stefan Krah1919b7e2012-03-21 18:25:23 +010013811# **************************************
13812# * Check for gcc x64 inline assembler *
13813# **************************************
13814
13815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13816$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818/* end confdefs.h. */
13819
13820int
13821main ()
13822{
13823
13824 __asm__ __volatile__ ("movq %rcx, %rax");
13825
13826 ;
13827 return 0;
13828}
13829_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013830if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013831 have_gcc_asm_for_x64=yes
13832else
13833 have_gcc_asm_for_x64=no
13834fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13838$as_echo "$have_gcc_asm_for_x64" >&6; }
13839if test "$have_gcc_asm_for_x64" = yes
13840then
13841
13842$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13843
13844fi
13845
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846# **************************************************
13847# * Check for various properties of floating point *
13848# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13851$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013852if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854else
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857 ac_cv_little_endian_double=no
13858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860/* end confdefs.h. */
13861
13862#include <string.h>
13863int main() {
13864 double x = 9006104071832581.0;
13865 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13866 return 0;
13867 else
13868 return 1;
13869}
13870
13871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873 ac_cv_little_endian_double=yes
13874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
13880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881fi
13882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13884$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885if test "$ac_cv_little_endian_double" = yes
13886then
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889
13890fi
13891
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13893$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013894if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896else
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899 ac_cv_big_endian_double=no
13900else
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902/* end confdefs.h. */
13903
13904#include <string.h>
13905int main() {
13906 double x = 9006104071832581.0;
13907 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13908 return 0;
13909 else
13910 return 1;
13911}
13912
13913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013914if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013915 ac_cv_big_endian_double=yes
13916else
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921fi
13922
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923fi
13924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13926$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927if test "$ac_cv_big_endian_double" = yes
13928then
13929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931
13932fi
13933
13934# Some ARM platforms use a mixed-endian representation for doubles.
13935# While Python doesn't currently have full support for these platforms
13936# (see e.g., issue 1762561), we can at least make sure that float <-> string
13937# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13939$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942else
13943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945 ac_cv_mixed_endian_double=no
13946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948/* end confdefs.h. */
13949
13950#include <string.h>
13951int main() {
13952 double x = 9006104071832581.0;
13953 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13954 return 0;
13955 else
13956 return 1;
13957}
13958
13959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961 ac_cv_mixed_endian_double=yes
13962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967fi
13968
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969fi
13970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13972$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973if test "$ac_cv_mixed_endian_double" = yes
13974then
13975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013977
13978fi
13979
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013980# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013981# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013982# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013983# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013984# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013985# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013986
13987# This inline assembler syntax may also work for suncc and icc,
13988# so we try it on all platforms.
13989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13991$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993/* end confdefs.h. */
13994
13995int
13996main ()
13997{
13998
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013999 unsigned short cw;
14000 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14001 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014002
14003 ;
14004 return 0;
14005}
14006_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014007if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008 have_gcc_asm_for_x87=yes
14009else
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014012rm -f core conftest.err conftest.$ac_objext \
14013 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14015$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014016if test "$have_gcc_asm_for_x87" = yes
14017then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014020
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14024$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14026/* end confdefs.h. */
14027
14028int
14029main ()
14030{
14031
14032 unsigned int fpcr;
14033 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14034 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14035
14036 ;
14037 return 0;
14038}
14039_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014040if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014041 have_gcc_asm_for_mc68881=yes
14042else
14043 have_gcc_asm_for_mc68881=no
14044fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014045rm -f core conftest.err conftest.$ac_objext \
14046 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14048$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14049if test "$have_gcc_asm_for_mc68881" = yes
14050then
14051
14052$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14053
14054fi
14055
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056# Detect whether system arithmetic is subject to x87-style double
14057# rounding issues. The result of this test has little meaning on non
14058# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14059# mode is round-to-nearest and double rounding issues are present, and
14060# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14062$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063# $BASECFLAGS may affect the result
14064ac_save_cc="$CC"
14065CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014066if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014067 ac_cv_x87_double_rounding=no
14068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014070/* end confdefs.h. */
14071
14072#include <stdlib.h>
14073#include <math.h>
14074int main() {
14075 volatile double x, y, z;
14076 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14077 x = 0.99999999999999989; /* 1-2**-53 */
14078 y = 1./x;
14079 if (y != 1.)
14080 exit(0);
14081 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14082 x = 1e16;
14083 y = 2.99999;
14084 z = x + y;
14085 if (z != 1e16+4.)
14086 exit(0);
14087 /* both tests show evidence of double rounding */
14088 exit(1);
14089}
14090
14091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014093 ac_cv_x87_double_rounding=no
14094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099fi
14100
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14103$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014104if test "$ac_cv_x87_double_rounding" = yes
14105then
14106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014108
14109fi
14110
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111# ************************************
14112# * Check for mathematical functions *
14113# ************************************
14114
14115LIBS_SAVE=$LIBS
14116LIBS="$LIBS $LIBM"
14117
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014118for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14119do :
14120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14121ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014122if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014123 cat >>confdefs.h <<_ACEOF
14124#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14125_ACEOF
14126
14127fi
14128done
14129
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014130for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014131do :
14132 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14133ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014134if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014135 cat >>confdefs.h <<_ACEOF
14136#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14137_ACEOF
14138
14139fi
14140done
14141
14142ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14143"
Victor Stinnere0be4232011-10-25 13:06:09 +020014144if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014145 ac_have_decl=1
14146else
14147 ac_have_decl=0
14148fi
14149
14150cat >>confdefs.h <<_ACEOF
14151#define HAVE_DECL_ISINF $ac_have_decl
14152_ACEOF
14153ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14154"
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014156 ac_have_decl=1
14157else
14158 ac_have_decl=0
14159fi
14160
14161cat >>confdefs.h <<_ACEOF
14162#define HAVE_DECL_ISNAN $ac_have_decl
14163_ACEOF
14164ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14165"
Victor Stinnere0be4232011-10-25 13:06:09 +020014166if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014167 ac_have_decl=1
14168else
14169 ac_have_decl=0
14170fi
14171
14172cat >>confdefs.h <<_ACEOF
14173#define HAVE_DECL_ISFINITE $ac_have_decl
14174_ACEOF
14175
14176
Mark Dickinsona614f042009-11-28 12:48:43 +000014177# For multiprocessing module, check that sem_open
14178# actually works. For FreeBSD versions <= 7.2,
14179# the kernel module that provides POSIX semaphores
14180# isn't loaded by default, so an attempt to call
14181# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14183$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014184if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014186else
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014188 ac_cv_posix_semaphores_enabled=yes
14189else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014191/* end confdefs.h. */
14192
14193#include <unistd.h>
14194#include <fcntl.h>
14195#include <stdio.h>
14196#include <semaphore.h>
14197#include <sys/stat.h>
14198
14199int main(void) {
14200 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14201 if (a == SEM_FAILED) {
14202 perror("sem_open");
14203 return 1;
14204 }
14205 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014206 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014207 return 0;
14208}
14209
14210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014211if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014212 ac_cv_posix_semaphores_enabled=yes
14213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014218fi
14219
14220
Mark Dickinsona614f042009-11-28 12:48:43 +000014221fi
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14224$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014225if test $ac_cv_posix_semaphores_enabled = no
14226then
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014229
14230fi
14231
Mark Dickinson10683072009-04-18 21:18:19 +000014232# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14234$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014239 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014242/* end confdefs.h. */
14243
14244#include <unistd.h>
14245#include <fcntl.h>
14246#include <stdio.h>
14247#include <semaphore.h>
14248#include <sys/stat.h>
14249
14250int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014251 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014252 int count;
14253 int res;
14254 if(a==SEM_FAILED){
14255 perror("sem_open");
14256 return 1;
14257
14258 }
14259 res = sem_getvalue(a, &count);
14260 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014261 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014262 return res==-1 ? 1 : 0;
14263}
14264
Mark Dickinson10683072009-04-18 21:18:19 +000014265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014266if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014273fi
14274
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014276fi
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14279$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014280if test $ac_cv_broken_sem_getvalue = yes
14281then
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014284
14285fi
14286
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014287ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14288"
14289if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14290 ac_have_decl=1
14291else
14292 ac_have_decl=0
14293fi
14294
14295cat >>confdefs.h <<_ACEOF
14296#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14297_ACEOF
14298ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14299"
14300if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14301 ac_have_decl=1
14302else
14303 ac_have_decl=0
14304fi
14305
14306cat >>confdefs.h <<_ACEOF
14307#define HAVE_DECL_RTLD_NOW $ac_have_decl
14308_ACEOF
14309ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14310"
14311if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14312 ac_have_decl=1
14313else
14314 ac_have_decl=0
14315fi
14316
14317cat >>confdefs.h <<_ACEOF
14318#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14319_ACEOF
14320ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14321"
14322if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14323 ac_have_decl=1
14324else
14325 ac_have_decl=0
14326fi
14327
14328cat >>confdefs.h <<_ACEOF
14329#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14330_ACEOF
14331ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14332"
14333if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14334 ac_have_decl=1
14335else
14336 ac_have_decl=0
14337fi
14338
14339cat >>confdefs.h <<_ACEOF
14340#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14341_ACEOF
14342ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14343"
14344if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14345 ac_have_decl=1
14346else
14347 ac_have_decl=0
14348fi
14349
14350cat >>confdefs.h <<_ACEOF
14351#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14352_ACEOF
14353ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14354"
14355if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14356 ac_have_decl=1
14357else
14358 ac_have_decl=0
14359fi
14360
14361cat >>confdefs.h <<_ACEOF
14362#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14363_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014364ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14365"
14366if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14367 ac_have_decl=1
14368else
14369 ac_have_decl=0
14370fi
14371
14372cat >>confdefs.h <<_ACEOF
14373#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14374_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014375
14376
Mark Dickinsonbd792642009-03-18 20:06:12 +000014377# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14379$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014380# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014381if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014382 enableval=$enable_big_digits; case $enable_big_digits in
14383yes)
14384 enable_big_digits=30 ;;
14385no)
14386 enable_big_digits=15 ;;
1438715|30)
14388 ;;
14389*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014390 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 +000014391esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14393$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014394
14395cat >>confdefs.h <<_ACEOF
14396#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14397_ACEOF
14398
14399
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14402$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014403fi
14404
14405
Guido van Rossumef2255b2000-03-10 22:30:29 +000014406# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014407ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014408if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014413 wchar_h="yes"
14414
Guido van Rossumef2255b2000-03-10 22:30:29 +000014415else
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014417
14418fi
14419
Michael W. Hudson54241132001-12-07 15:38:26 +000014420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014422# determine wchar_t size
14423if test "$wchar_h" = yes
14424then
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14428# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14430$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014431if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014433else
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14435"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 if test "$ac_cv_type_wchar_t" = yes; then
14439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014441as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014442See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443 else
14444 ac_cv_sizeof_wchar_t=0
14445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14450$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451
14452
14453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014455#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014456_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014457
Michael W. Hudson54241132001-12-07 15:38:26 +000014458
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014459fi
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14462$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014463have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014465/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014466
14467#include <tcl.h>
14468#if TCL_UTF_MAX != 6
14469# error "NOT UCS4_TCL"
14470#endif
14471int
14472main ()
14473{
14474
14475 ;
14476 return 0;
14477}
14478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014480
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014483
14484 have_ucs4_tcl=yes
14485
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14489$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014490
Skip Montanaro6dead952003-09-25 14:50:04 +000014491# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014492if test "$wchar_h" = yes
14493then
14494 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14496$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014497 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014499else
14500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014502 ac_cv_wchar_t_signed=yes
14503else
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014505/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014506
14507 #include <wchar.h>
14508 int main()
14509 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014510 /* Success: exit code 0 */
14511 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014512 }
14513
14514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014516 ac_cv_wchar_t_signed=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014522fi
14523
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014524fi
14525
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14527$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528fi
14529
Michael Osipov3738fad2018-08-24 18:17:19 +020014530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14531$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014532# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014533if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014534 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014535then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
Michael Osipov3738fad2018-08-24 18:17:19 +020014539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14540$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014541else
Michael Osipov3738fad2018-08-24 18:17:19 +020014542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14543$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014544fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014545
14546# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14548$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014549if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 ac_cv_c_bigendian=unknown
14553 # See if we're dealing with a universal compiler.
14554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14555/* end confdefs.h. */
14556#ifndef __APPLE_CC__
14557 not a universal capable compiler
14558 #endif
14559 typedef int dummy;
14560
Skip Montanaro6dead952003-09-25 14:50:04 +000014561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562if ac_fn_c_try_compile "$LINENO"; then :
14563
14564 # Check for potential -arch flags. It is not universal unless
14565 # there are at least two -arch flags with different values.
14566 ac_arch=
14567 ac_prev=
14568 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14569 if test -n "$ac_prev"; then
14570 case $ac_word in
14571 i?86 | x86_64 | ppc | ppc64)
14572 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14573 ac_arch=$ac_word
14574 else
14575 ac_cv_c_bigendian=universal
14576 break
14577 fi
14578 ;;
14579 esac
14580 ac_prev=
14581 elif test "x$ac_word" = "x-arch"; then
14582 ac_prev=arch
14583 fi
14584 done
14585fi
14586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14587 if test $ac_cv_c_bigendian = unknown; then
14588 # See if sys/param.h defines the BYTE_ORDER macro.
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014590/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593
Martin v. Löwis11437992002-04-12 09:54:03 +000014594int
14595main ()
14596{
Matthias Kloseb9621712010-04-24 17:59:49 +000014597#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14598 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14599 && LITTLE_ENDIAN)
14600 bogus endian macros
14601 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
14603 ;
14604 return 0;
14605}
14606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014607if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014608 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614int
14615main ()
14616{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 not big endian
14619 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014620
14621 ;
14622 return 0;
14623}
14624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014625if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014626 ac_cv_c_bigendian=yes
14627else
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014631fi
14632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14633 fi
14634 if test $ac_cv_c_bigendian = unknown; then
14635 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014637/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014638#include <limits.h>
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640int
14641main ()
14642{
Matthias Kloseb9621712010-04-24 17:59:49 +000014643#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14644 bogus endian macros
14645 #endif
14646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ;
14648 return 0;
14649}
14650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_compile "$LINENO"; then :
14652 # It does; now see whether it defined to _BIG_ENDIAN or not.
14653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14654/* end confdefs.h. */
14655#include <limits.h>
14656
14657int
14658main ()
14659{
14660#ifndef _BIG_ENDIAN
14661 not big endian
14662 #endif
14663
14664 ;
14665 return 0;
14666}
14667_ACEOF
14668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014670else
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14674fi
14675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14676 fi
14677 if test $ac_cv_c_bigendian = unknown; then
14678 # Compile a test program.
14679 if test "$cross_compiling" = yes; then :
14680 # Try to guess by grepping values from an object file.
14681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14682/* end confdefs.h. */
14683short int ascii_mm[] =
14684 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14685 short int ascii_ii[] =
14686 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14687 int use_ascii (int i) {
14688 return ascii_mm[i] + ascii_ii[i];
14689 }
14690 short int ebcdic_ii[] =
14691 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14692 short int ebcdic_mm[] =
14693 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14694 int use_ebcdic (int i) {
14695 return ebcdic_mm[i] + ebcdic_ii[i];
14696 }
14697 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699int
14700main ()
14701{
14702return use_ascii (foo) == use_ebcdic (foo);
14703 ;
14704 return 0;
14705}
14706_ACEOF
14707if ac_fn_c_try_compile "$LINENO"; then :
14708 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14709 ac_cv_c_bigendian=yes
14710 fi
14711 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14712 if test "$ac_cv_c_bigendian" = unknown; then
14713 ac_cv_c_bigendian=no
14714 else
14715 # finding both strings is unlikely to happen, but who knows?
14716 ac_cv_c_bigendian=unknown
14717 fi
14718 fi
14719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014723/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014725int
14726main ()
14727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 /* Are we little or big endian? From Harbison&Steele. */
14730 union
14731 {
14732 long int l;
14733 char c[sizeof (long int)];
14734 } u;
14735 u.l = 1;
14736 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737
14738 ;
14739 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014740}
Martin v. Löwis11437992002-04-12 09:54:03 +000014741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014743 ac_cv_c_bigendian=no
14744else
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14754$as_echo "$ac_cv_c_bigendian" >&6; }
14755 case $ac_cv_c_bigendian in #(
14756 yes)
14757 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14758;; #(
14759 no)
14760 ;; #(
14761 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ;; #(
14766 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014767 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014768 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770
Michael W. Hudson54241132001-12-07 15:38:26 +000014771
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014772# ABI version string for Python extension modules. This appears between the
14773# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14774# from the following attributes which affect the ABI of this Python build (in
14775# this order):
14776#
14777# * The Python implementation (always 'cpython-' for us)
14778# * The major and minor version numbers
14779# * --with-pydebug (adds a 'd')
14780# * --with-pymalloc (adds a 'm')
14781# * --with-wide-unicode (adds a 'u')
14782#
14783# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014784# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14785# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014786
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14788$as_echo_n "checking ABIFLAGS... " >&6; }
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14790$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14792$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014793SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14795$as_echo "$SOABI" >&6; }
14796
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014797
14798case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014799 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014800 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14801 *)
14802 EXT_SUFFIX=${SHLIB_SUFFIX};;
14803esac
14804
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14806$as_echo_n "checking LDVERSION... " >&6; }
14807LDVERSION='$(VERSION)$(ABIFLAGS)'
14808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14809$as_echo "$LDVERSION" >&6; }
14810
doko@python.org87421192013-01-26 11:39:31 +010014811
doko@ubuntu.com55532312016-06-14 08:55:19 +020014812if test x$PLATFORM_TRIPLET = x; then
14813 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14814else
14815 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14816fi
doko@python.org87421192013-01-26 11:39:31 +010014817
14818
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014819# Check whether right shifting a negative integer extends the sign bit
14820# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14822$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014823if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014825else
Martin v. Löwis11437992002-04-12 09:54:03 +000014826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014828 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014831/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014832
14833int main()
14834{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014835 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014836}
14837
Martin v. Löwis11437992002-04-12 09:54:03 +000014838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014839if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014840 ac_cv_rshift_extends_sign=yes
14841else
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014846fi
14847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848fi
14849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14851$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014852if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014853then
Martin v. Löwis11437992002-04-12 09:54:03 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014856
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014857fi
14858
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014859# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14861$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014862if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014864else
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014867/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014869int
14870main ()
14871{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014872
14873 FILE *f = fopen("/dev/null", "r");
14874 flockfile(f);
14875 getc_unlocked(f);
14876 funlockfile(f);
14877
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 ;
14879 return 0;
14880}
14881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014882if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014883 ac_cv_have_getc_unlocked=yes
14884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_cv_have_getc_unlocked=no
14886fi
14887rm -f core conftest.err conftest.$ac_objext \
14888 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890
Matthias Kloseb9621712010-04-24 17:59:49 +000014891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14892$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014893if test "$ac_cv_have_getc_unlocked" = yes
14894then
Martin v. Löwis11437992002-04-12 09:54:03 +000014895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014897
14898fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014899
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014900# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014901# save the value of LIBS so we don't actually link Python with readline
14902LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014903
Gregory P. Smith18820942008-09-07 06:24:49 +000014904# On some systems we need to link readline to a termcap compatible
14905# library. NOTE: Keep the precedence of listed libraries synchronised
14906# with setup.py.
14907py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14909$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014910for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014911 if test -z "$py_libtermcap"; then
14912 READLINE_LIBS="-lreadline"
14913 else
14914 READLINE_LIBS="-lreadline -l$py_libtermcap"
14915 fi
14916 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014918/* end confdefs.h. */
14919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920/* Override any GCC internal prototype to avoid an error.
14921 Use char because int might match the return type of a GCC
14922 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014923#ifdef __cplusplus
14924extern "C"
14925#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014926char readline ();
14927int
14928main ()
14929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014931 ;
14932 return 0;
14933}
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014936 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014938rm -f core conftest.err conftest.$ac_objext \
14939 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014940 if test $py_cv_lib_readline = yes; then
14941 break
14942 fi
14943done
14944# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14945#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014946if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14948$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014949else
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14951$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014954
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014955fi
14956
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014957# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014960#include <readline/readline.h>
14961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014962if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963 have_readline=yes
14964else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014965 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014966
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014967fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014968rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969if test $have_readline = yes
14970then
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014972/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014973#include <readline/readline.h>
14974
14975_ACEOF
14976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014978
Matthias Kloseb9621712010-04-24 17:59:49 +000014979$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014980
14981fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014982rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014985/* end confdefs.h. */
14986#include <readline/readline.h>
14987
14988_ACEOF
14989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014993
14994fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014995rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014996
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997fi
14998
Martin v. Löwis0daad592001-09-30 21:09:59 +000014999# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15001$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015002if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015004else
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015006LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010/* Override any GCC internal prototype to avoid an error.
15011 Use char because int might match the return type of a GCC
15012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015013#ifdef __cplusplus
15014extern "C"
15015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015016char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015017int
15018main ()
15019{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ;
15022 return 0;
15023}
15024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015030rm -f core conftest.err conftest.$ac_objext \
15031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015032LIBS=$ac_check_lib_save_LIBS
15033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15035$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015036if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015039
Martin v. Löwis0daad592001-09-30 21:09:59 +000015040fi
15041
Michael W. Hudson54241132001-12-07 15:38:26 +000015042
Thomas Wouters89d996e2007-09-08 17:39:28 +000015043# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15045$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015046if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015048else
15049 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015050LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015052/* end confdefs.h. */
15053
15054/* Override any GCC internal prototype to avoid an error.
15055 Use char because int might match the return type of a GCC
15056 builtin and then its argument prototype would still apply. */
15057#ifdef __cplusplus
15058extern "C"
15059#endif
15060char rl_completion_display_matches_hook ();
15061int
15062main ()
15063{
15064return rl_completion_display_matches_hook ();
15065 ;
15066 return 0;
15067}
15068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015069if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015070 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15071else
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015074rm -f core conftest.err conftest.$ac_objext \
15075 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076LIBS=$ac_check_lib_save_LIBS
15077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15079$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015080if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015081
Matthias Kloseb9621712010-04-24 17:59:49 +000015082$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015083
15084fi
15085
15086
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015087# also in 4.0, but not in editline
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15089$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15090if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15091 $as_echo_n "(cached) " >&6
15092else
15093 ac_check_lib_save_LIBS=$LIBS
15094LIBS="-lreadline $READLINE_LIBS $LIBS"
15095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096/* end confdefs.h. */
15097
15098/* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
15101#ifdef __cplusplus
15102extern "C"
15103#endif
15104char rl_resize_terminal ();
15105int
15106main ()
15107{
15108return rl_resize_terminal ();
15109 ;
15110 return 0;
15111}
15112_ACEOF
15113if ac_fn_c_try_link "$LINENO"; then :
15114 ac_cv_lib_readline_rl_resize_terminal=yes
15115else
15116 ac_cv_lib_readline_rl_resize_terminal=no
15117fi
15118rm -f core conftest.err conftest.$ac_objext \
15119 conftest$ac_exeext conftest.$ac_ext
15120LIBS=$ac_check_lib_save_LIBS
15121fi
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15123$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15124if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15125
15126$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15127
15128fi
15129
15130
Martin v. Löwis0daad592001-09-30 21:09:59 +000015131# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15133$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015134if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015136else
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015138LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142/* Override any GCC internal prototype to avoid an error.
15143 Use char because int might match the return type of a GCC
15144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015145#ifdef __cplusplus
15146extern "C"
15147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015148char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015149int
15150main ()
15151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 ;
15154 return 0;
15155}
15156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015162rm -f core conftest.err conftest.$ac_objext \
15163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015164LIBS=$ac_check_lib_save_LIBS
15165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15167$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015168if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015171
Guido van Rossum353ae582001-07-10 16:45:32 +000015172fi
15173
Jack Jansendd19cf82001-12-06 22:36:17 +000015174
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015177/* end confdefs.h. */
15178#include <readline/readline.h>
15179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015180if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181 have_readline=yes
15182else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015184
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015186rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187if test $have_readline = yes
15188then
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015190/* end confdefs.h. */
15191#include <readline/readline.h>
15192
15193_ACEOF
15194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015198
15199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015200rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201
15202fi
15203
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15205$as_echo_n "checking for append_history in -lreadline... " >&6; }
15206if ${ac_cv_lib_readline_append_history+:} false; then :
15207 $as_echo_n "(cached) " >&6
15208else
15209 ac_check_lib_save_LIBS=$LIBS
15210LIBS="-lreadline $READLINE_LIBS $LIBS"
15211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15212/* end confdefs.h. */
15213
15214/* Override any GCC internal prototype to avoid an error.
15215 Use char because int might match the return type of a GCC
15216 builtin and then its argument prototype would still apply. */
15217#ifdef __cplusplus
15218extern "C"
15219#endif
15220char append_history ();
15221int
15222main ()
15223{
15224return append_history ();
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229if ac_fn_c_try_link "$LINENO"; then :
15230 ac_cv_lib_readline_append_history=yes
15231else
15232 ac_cv_lib_readline_append_history=no
15233fi
15234rm -f core conftest.err conftest.$ac_objext \
15235 conftest$ac_exeext conftest.$ac_ext
15236LIBS=$ac_check_lib_save_LIBS
15237fi
15238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15239$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15240if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15241
15242$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15243
15244fi
15245
15246
Martin v. Löwis82bca632006-02-10 20:49:30 +000015247# End of readline checks: restore LIBS
15248LIBS=$LIBS_no_readline
15249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15251$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015252if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015257 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015258else
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015260/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261
15262int main()
15263{
15264 int val1 = nice(1);
15265 if (val1 != -1 && val1 == nice(2))
15266 exit(0);
15267 exit(1);
15268}
15269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015271if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015272 ac_cv_broken_nice=yes
15273else
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278fi
15279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280fi
15281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15283$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015284if test "$ac_cv_broken_nice" = yes
15285then
Martin v. Löwis11437992002-04-12 09:54:03 +000015286
Matthias Kloseb9621712010-04-24 17:59:49 +000015287$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015288
15289fi
15290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15292$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015293if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015295else
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015297 ac_cv_broken_poll=no
15298else
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300/* end confdefs.h. */
15301
15302#include <poll.h>
15303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015304int main()
15305{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015306 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015307 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308
15309 close (42);
15310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015311 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015316 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015317 return 1;
15318}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015319
15320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015321if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322 ac_cv_broken_poll=yes
15323else
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015330fi
15331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15333$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334if test "$ac_cv_broken_poll" = yes
15335then
15336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015338
15339fi
15340
Brett Cannon43802422005-02-10 20:48:03 +000015341# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000015342# (which is not required by ISO C or UNIX spec) and/or if we support
15343# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015344ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000015345#include <$ac_cv_struct_tm>
15346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347"
Victor Stinnere0be4232011-10-25 13:06:09 +020015348if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015349
15350cat >>confdefs.h <<_ACEOF
15351#define HAVE_STRUCT_TM_TM_ZONE 1
15352_ACEOF
15353
15354
15355fi
15356
15357if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015360
15361else
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15363"
Victor Stinnere0be4232011-10-25 13:06:09 +020015364if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368fi
15369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015371#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372_ACEOF
15373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15375$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015376if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378else
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015380/* end confdefs.h. */
15381#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382#if !HAVE_DECL_TZNAME
15383extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015384#endif
15385
15386int
15387main ()
15388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015390 ;
15391 return 0;
15392}
15393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015394if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015395 ac_cv_var_tzname=yes
15396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015399rm -f core conftest.err conftest.$ac_objext \
15400 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15403$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015404 if test $ac_cv_var_tzname = yes; then
15405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015407
15408 fi
15409fi
15410
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015411
Martin v. Löwis1d459062005-03-14 21:23:33 +000015412# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15414$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015415if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015417else
15418
Matthias Kloseb9621712010-04-24 17:59:49 +000015419if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015420 ac_cv_working_tzset=no
15421else
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015424
15425#include <stdlib.h>
15426#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015427#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015428
15429#if HAVE_TZNAME
15430extern char *tzname[];
15431#endif
15432
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015433int main()
15434{
Brett Cannon18367812003-09-19 00:59:16 +000015435 /* Note that we need to ensure that not only does tzset(3)
15436 do 'something' with localtime, but it works as documented
15437 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015438 This includes making sure that tzname is set properly if
15439 tm->tm_zone does not exist since it is the alternative way
15440 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015441
15442 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015443 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015444 */
15445
Martin v. Löwis1d459062005-03-14 21:23:33 +000015446 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015447 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15448
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015449 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015450 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015451 if (localtime(&groundhogday)->tm_hour != 0)
15452 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015453#if HAVE_TZNAME
15454 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15455 if (strcmp(tzname[0], "UTC") ||
15456 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15457 exit(1);
15458#endif
Brett Cannon18367812003-09-19 00:59:16 +000015459
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015460 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015462 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015463 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015464#if HAVE_TZNAME
15465 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15466 exit(1);
15467#endif
Brett Cannon18367812003-09-19 00:59:16 +000015468
15469 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15470 tzset();
15471 if (localtime(&groundhogday)->tm_hour != 11)
15472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015473#if HAVE_TZNAME
15474 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15475 exit(1);
15476#endif
15477
15478#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015479 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15480 exit(1);
15481 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15482 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015483#endif
Brett Cannon18367812003-09-19 00:59:16 +000015484
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 exit(0);
15486}
15487
15488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015490 ac_cv_working_tzset=yes
15491else
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496fi
15497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498fi
15499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15501$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015502if test "$ac_cv_working_tzset" = yes
15503then
15504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015506
15507fi
15508
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015509# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15511$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015512if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015514else
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015516/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015517#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015518int
15519main ()
15520{
15521
15522struct stat st;
15523st.st_mtim.tv_nsec = 1;
15524
15525 ;
15526 return 0;
15527}
15528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015530 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015531else
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15535fi
15536
Matthias Kloseb9621712010-04-24 17:59:49 +000015537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15538$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015539if test "$ac_cv_stat_tv_nsec" = yes
15540then
15541
Matthias Kloseb9621712010-04-24 17:59:49 +000015542$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015543
15544fi
15545
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015546# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15548$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015549if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015551else
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015553/* end confdefs.h. */
15554#include <sys/stat.h>
15555int
15556main ()
15557{
15558
15559struct stat st;
15560st.st_mtimespec.tv_nsec = 1;
15561
15562 ;
15563 return 0;
15564}
15565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015567 ac_cv_stat_tv_nsec2=yes
15568else
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15572fi
15573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15575$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015576if test "$ac_cv_stat_tv_nsec2" = yes
15577then
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015580
15581fi
15582
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015583# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015584ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015585if test "$cross_compiling" = no; then
15586 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15587fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015588
15589for ac_header in curses.h ncurses.h
15590do :
15591 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15592ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15593if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15594 cat >>confdefs.h <<_ACEOF
15595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15596_ACEOF
15597
15598fi
15599
15600done
15601
15602
15603# On Solaris, term.h requires curses.h
15604for ac_header in term.h
15605do :
15606 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15607#ifdef HAVE_CURSES_H
15608#include <curses.h>
15609#endif
15610
15611"
15612if test "x$ac_cv_header_term_h" = xyes; then :
15613 cat >>confdefs.h <<_ACEOF
15614#define HAVE_TERM_H 1
15615_ACEOF
15616
15617fi
15618
15619done
15620
15621
Jack Jansen666b1e72001-10-31 12:11:48 +000015622# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15624$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015625if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015626 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015627else
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015629/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015630#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015631int
15632main ()
15633{
Jack Jansen666b1e72001-10-31 12:11:48 +000015634
15635 int rtn;
15636 rtn = mvwdelch(0,0,0);
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 ;
15639 return 0;
15640}
15641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015642if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015643 ac_cv_mvwdelch_is_expression=yes
15644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15648fi
15649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15651$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015652
15653if test "$ac_cv_mvwdelch_is_expression" = yes
15654then
Martin v. Löwis11437992002-04-12 09:54:03 +000015655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015657
15658fi
15659
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015660# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15661# structs since version 5.7. If the macro is defined as zero before including
15662# [n]curses.h, ncurses will expose fields of the structs regardless of the
15663# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15665$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015670/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015671
15672 #define NCURSES_OPAQUE 0
15673 #include <curses.h>
15674
Martin v. Löwis11437992002-04-12 09:54:03 +000015675int
15676main ()
15677{
Jack Jansen666b1e72001-10-31 12:11:48 +000015678
15679 WINDOW *w;
15680 w->_flags = 0;
15681
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 ;
15683 return 0;
15684}
15685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015686if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015687 ac_cv_window_has_flags=yes
15688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692fi
15693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15695$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015696
Jack Jansen666b1e72001-10-31 12:11:48 +000015697
15698if test "$ac_cv_window_has_flags" = yes
15699then
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
Matthias Kloseb9621712010-04-24 17:59:49 +000015701$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015702
15703fi
15704
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15706$as_echo_n "checking for is_pad... " >&6; }
15707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15708/* end confdefs.h. */
15709#include <curses.h>
15710int
15711main ()
15712{
15713
15714#ifndef is_pad
15715void *x=is_pad
15716#endif
15717
15718 ;
15719 return 0;
15720}
15721_ACEOF
15722if ac_fn_c_try_compile "$LINENO"; then :
15723
15724$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15725
15726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15727$as_echo "yes" >&6; }
15728else
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15730$as_echo "no" >&6; }
15731
15732fi
15733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15736$as_echo_n "checking for is_term_resized... " >&6; }
15737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015738/* end confdefs.h. */
15739#include <curses.h>
15740int
15741main ()
15742{
15743void *x=is_term_resized
15744 ;
15745 return 0;
15746}
15747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015751
Matthias Kloseb159a552010-04-25 21:00:44 +000015752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015753$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015754else
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15756$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015757
15758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15762$as_echo_n "checking for resize_term... " >&6; }
15763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015764/* end confdefs.h. */
15765#include <curses.h>
15766int
15767main ()
15768{
15769void *x=resize_term
15770 ;
15771 return 0;
15772}
15773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015774if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015777
Matthias Kloseb159a552010-04-25 21:00:44 +000015778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015779$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015780else
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15782$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015783
15784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15788$as_echo_n "checking for resizeterm... " >&6; }
15789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015790/* end confdefs.h. */
15791#include <curses.h>
15792int
15793main ()
15794{
15795void *x=resizeterm
15796 ;
15797 return 0;
15798}
15799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015800if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015803
Matthias Kloseb159a552010-04-25 21:00:44 +000015804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15808$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015809
15810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015812
15813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15814$as_echo_n "checking for immedok... " >&6; }
15815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15816/* end confdefs.h. */
15817#include <curses.h>
15818int
15819main ()
15820{
15821
15822#ifndef immedok
15823void *x=immedok
15824#endif
15825
15826 ;
15827 return 0;
15828}
15829_ACEOF
15830if ac_fn_c_try_compile "$LINENO"; then :
15831
15832$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15833
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15835$as_echo "yes" >&6; }
15836else
15837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15838$as_echo "no" >&6; }
15839
15840fi
15841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15842
15843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15844$as_echo_n "checking for syncok... " >&6; }
15845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15846/* end confdefs.h. */
15847#include <curses.h>
15848int
15849main ()
15850{
15851
15852#ifndef syncok
15853void *x=syncok
15854#endif
15855
15856 ;
15857 return 0;
15858}
15859_ACEOF
15860if ac_fn_c_try_compile "$LINENO"; then :
15861
15862$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15863
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15865$as_echo "yes" >&6; }
15866else
15867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15868$as_echo "no" >&6; }
15869
15870fi
15871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15874$as_echo_n "checking for wchgat... " >&6; }
15875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876/* end confdefs.h. */
15877#include <curses.h>
15878int
15879main ()
15880{
15881
15882#ifndef wchgat
15883void *x=wchgat
15884#endif
15885
15886 ;
15887 return 0;
15888}
15889_ACEOF
15890if ac_fn_c_try_compile "$LINENO"; then :
15891
15892$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15893
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15895$as_echo "yes" >&6; }
15896else
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15898$as_echo "no" >&6; }
15899
15900fi
15901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15902
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15904$as_echo_n "checking for filter... " >&6; }
15905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15906/* end confdefs.h. */
15907#include <curses.h>
15908int
15909main ()
15910{
15911
15912#ifndef filter
15913void *x=filter
15914#endif
15915
15916 ;
15917 return 0;
15918}
15919_ACEOF
15920if ac_fn_c_try_compile "$LINENO"; then :
15921
15922$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15923
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15925$as_echo "yes" >&6; }
15926else
15927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15928$as_echo "no" >&6; }
15929
15930fi
15931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15932
15933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15934$as_echo_n "checking for has_key... " >&6; }
15935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15936/* end confdefs.h. */
15937#include <curses.h>
15938int
15939main ()
15940{
15941
15942#ifndef has_key
15943void *x=has_key
15944#endif
15945
15946 ;
15947 return 0;
15948}
15949_ACEOF
15950if ac_fn_c_try_compile "$LINENO"; then :
15951
15952$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15953
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15955$as_echo "yes" >&6; }
15956else
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15958$as_echo "no" >&6; }
15959
15960fi
15961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15962
15963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15964$as_echo_n "checking for typeahead... " >&6; }
15965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15966/* end confdefs.h. */
15967#include <curses.h>
15968int
15969main ()
15970{
15971
15972#ifndef typeahead
15973void *x=typeahead
15974#endif
15975
15976 ;
15977 return 0;
15978}
15979_ACEOF
15980if ac_fn_c_try_compile "$LINENO"; then :
15981
15982$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15983
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15985$as_echo "yes" >&6; }
15986else
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15988$as_echo "no" >&6; }
15989
15990fi
15991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15992
15993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15994$as_echo_n "checking for use_env... " >&6; }
15995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15996/* end confdefs.h. */
15997#include <curses.h>
15998int
15999main ()
16000{
16001
16002#ifndef use_env
16003void *x=use_env
16004#endif
16005
16006 ;
16007 return 0;
16008}
16009_ACEOF
16010if ac_fn_c_try_compile "$LINENO"; then :
16011
16012$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16013
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16015$as_echo "yes" >&6; }
16016else
16017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16018$as_echo "no" >&6; }
16019
16020fi
16021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016022# last curses configure check
16023CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016024
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16026$as_echo "$as_me: checking for device files" >&6;}
16027
16028if test "x$cross_compiling" = xyes; then
16029 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16031$as_echo_n "checking for /dev/ptmx... " >&6; }
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16033$as_echo "not set" >&6; }
16034 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16035 fi
16036 if test "${ac_cv_file__dev_ptc+set}" != set; then
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16038$as_echo_n "checking for /dev/ptc... " >&6; }
16039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16040$as_echo "not set" >&6; }
16041 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16042 fi
16043fi
16044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16046$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016047if ${ac_cv_file__dev_ptmx+:} false; then :
16048 $as_echo_n "(cached) " >&6
16049else
16050 test "$cross_compiling" = yes &&
16051 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16052if test -r "/dev/ptmx"; then
16053 ac_cv_file__dev_ptmx=yes
16054else
16055 ac_cv_file__dev_ptmx=no
16056fi
16057fi
16058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16059$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16060if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016061
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016062fi
16063
16064if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016067
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16070$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016071if ${ac_cv_file__dev_ptc+:} false; then :
16072 $as_echo_n "(cached) " >&6
16073else
16074 test "$cross_compiling" = yes &&
16075 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16076if test -r "/dev/ptc"; then
16077 ac_cv_file__dev_ptc=yes
16078else
16079 ac_cv_file__dev_ptc=no
16080fi
16081fi
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16083$as_echo "$ac_cv_file__dev_ptc" >&6; }
16084if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016085
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016086fi
16087
16088if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016089
Matthias Kloseb9621712010-04-24 17:59:49 +000016090$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016091
Neal Norwitz865400f2003-03-21 01:42:58 +000016092fi
16093
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016094if test $ac_sys_system = Darwin
16095then
16096 LIBS="$LIBS -framework CoreFoundation"
16097fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016098
Matthias Kloseb9621712010-04-24 17:59:49 +000016099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16100$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016101if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016102 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016103else
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016105 ac_cv_have_size_t_format="cross -- assuming yes"
16106
Thomas Wouters477c8d52006-05-27 19:21:47 +000016107else
Matthias Kloseb9621712010-04-24 17:59:49 +000016108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016109/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016110
Thomas Wouters477c8d52006-05-27 19:21:47 +000016111#include <stdio.h>
16112#include <stddef.h>
16113#include <string.h>
16114
Christian Heimes2c181612007-12-17 20:04:13 +000016115#ifdef HAVE_SYS_TYPES_H
16116#include <sys/types.h>
16117#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016118
16119#ifdef HAVE_SSIZE_T
16120typedef ssize_t Py_ssize_t;
16121#elif SIZEOF_VOID_P == SIZEOF_LONG
16122typedef long Py_ssize_t;
16123#else
16124typedef int Py_ssize_t;
16125#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016126
Christian Heimes2c181612007-12-17 20:04:13 +000016127int main()
16128{
16129 char buffer[256];
16130
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16132 return 1;
16133
Thomas Wouters89f507f2006-12-13 04:49:30 +000016134 if (strcmp(buffer, "123"))
16135 return 1;
16136
16137 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16138 return 1;
16139
16140 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016141 return 1;
16142
16143 return 0;
16144}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145
Thomas Wouters477c8d52006-05-27 19:21:47 +000016146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016147if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016148 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016149else
Matthias Kloseb9621712010-04-24 17:59:49 +000016150 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16153 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016154fi
16155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16158$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016159if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016160
Matthias Kloseb9621712010-04-24 17:59:49 +000016161$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016162
16163fi
16164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016166#ifdef HAVE_SYS_TYPES_H
16167#include <sys/types.h>
16168#endif
16169#ifdef HAVE_SYS_SOCKET_H
16170#include <sys/socket.h>
16171#endif
16172
Matthias Kloseb9621712010-04-24 17:59:49 +000016173"
Victor Stinnere0be4232011-10-25 13:06:09 +020016174if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016175
Martin v. Löwis11437992002-04-12 09:54:03 +000016176else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016177
Matthias Kloseb9621712010-04-24 17:59:49 +000016178$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016179
16180fi
16181
Michael W. Hudson54241132001-12-07 15:38:26 +000016182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16184$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016185if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016187else
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016189 ac_cv_broken_mbstowcs=no
16190else
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016192/* end confdefs.h. */
16193
Stefan Krah19c21392012-11-22 23:47:32 +010016194#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016195#include<stdlib.h>
16196int main() {
16197 size_t len = -1;
16198 const char *str = "text";
16199 len = mbstowcs(NULL, str, 0);
16200 return (len != 4);
16201}
16202
16203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016204if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016205 ac_cv_broken_mbstowcs=no
16206else
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016211fi
16212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016213fi
16214
Matthias Kloseb9621712010-04-24 17:59:49 +000016215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16216$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016217if test "$ac_cv_broken_mbstowcs" = yes
16218then
16219
Matthias Kloseb9621712010-04-24 17:59:49 +000016220$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016221
16222fi
16223
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16226$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016227
16228# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016229if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016230 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016231if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016232then
16233
Matthias Kloseb9621712010-04-24 17:59:49 +000016234$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16237$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016239if test "$withval" = no
16240then
16241
16242$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16245$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246fi
16247
Antoine Pitrou042b1282010-08-13 21:15:58 +000016248else
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16250$as_echo "no value specified" >&6; }
16251fi
16252
Antoine Pitroub52ec782009-01-25 16:34:23 +000016253
Matthias Kloseb17289e2012-03-15 19:51:34 +010016254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16255$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16256if ${ac_cv_computed_gotos+:} false; then :
16257 $as_echo_n "(cached) " >&6
16258else
16259 if test "$cross_compiling" = yes; then :
16260 if test "${with_computed_gotos+set}" = set; then
16261 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16262 else
16263 ac_cv_computed_gotos=no
16264 fi
16265else
16266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h. */
16268
16269int main(int argc, char **argv)
16270{
16271 static void *targets[1] = { &&LABEL1 };
16272 goto LABEL2;
16273LABEL1:
16274 return 0;
16275LABEL2:
16276 goto *targets[0];
16277 return 1;
16278}
16279
16280_ACEOF
16281if ac_fn_c_try_run "$LINENO"; then :
16282 ac_cv_computed_gotos=yes
16283else
16284 ac_cv_computed_gotos=no
16285fi
16286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16287 conftest.$ac_objext conftest.beam conftest.$ac_ext
16288fi
16289
16290fi
16291
16292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16293$as_echo "$ac_cv_computed_gotos" >&6; }
16294case "$ac_cv_computed_gotos" in yes*)
16295
16296$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16297
16298esac
16299
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016300case $ac_sys_system in
16301AIX*)
16302
16303$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16304 ;;
16305esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016306
Michael W. Hudson54241132001-12-07 15:38:26 +000016307
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016308
16309
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016310for h in `(cd $srcdir;echo Python/thread_*.h)`
16311do
16312 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16313done
16314
Michael W. Hudson54241132001-12-07 15:38:26 +000016315
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016316SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16318$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016319for dir in $SRCDIRS; do
16320 if test ! -d $dir; then
16321 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016322 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016323done
Matthias Kloseb9621712010-04-24 17:59:49 +000016324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16325$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016326
Stefan Krah1919b7e2012-03-21 18:25:23 +010016327# Availability of -O2:
16328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16329$as_echo_n "checking for -O2... " >&6; }
16330saved_cflags="$CFLAGS"
16331CFLAGS="-O2"
16332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334
16335int
16336main ()
16337{
16338
16339
16340 ;
16341 return 0;
16342}
16343_ACEOF
16344if ac_fn_c_try_compile "$LINENO"; then :
16345 have_O2=yes
16346else
16347 have_O2=no
16348fi
16349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16351$as_echo "$have_O2" >&6; }
16352CFLAGS="$saved_cflags"
16353
16354# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16355# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16357$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16358saved_cflags="$CFLAGS"
16359CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16360if test "$have_O2" = no; then
16361 CFLAGS=""
16362fi
16363if test "$cross_compiling" = yes; then :
16364 have_glibc_memmove_bug=undefined
16365else
16366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16367/* end confdefs.h. */
16368
16369#include <stdio.h>
16370#include <stdlib.h>
16371#include <string.h>
16372void foo(void *p, void *q) { memmove(p, q, 19); }
16373int main() {
16374 char a[32] = "123456789000000000";
16375 foo(&a[9], a);
16376 if (strcmp(a, "123456789123456789000000000") != 0)
16377 return 1;
16378 foo(a, &a[9]);
16379 if (strcmp(a, "123456789000000000") != 0)
16380 return 1;
16381 return 0;
16382}
16383
16384_ACEOF
16385if ac_fn_c_try_run "$LINENO"; then :
16386 have_glibc_memmove_bug=no
16387else
16388 have_glibc_memmove_bug=yes
16389fi
16390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16391 conftest.$ac_objext conftest.beam conftest.$ac_ext
16392fi
16393
16394CFLAGS="$saved_cflags"
16395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16396$as_echo "$have_glibc_memmove_bug" >&6; }
16397if test "$have_glibc_memmove_bug" = yes; then
16398
16399$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16400
16401fi
16402
16403if test "$have_gcc_asm_for_x87" = yes; then
16404 # Some versions of gcc miscompile inline asm:
16405 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16406 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16407 case $CC in
16408 *gcc*)
16409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16410$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16411 saved_cflags="$CFLAGS"
16412 CFLAGS="-O2"
16413 if test "$cross_compiling" = yes; then :
16414 have_ipa_pure_const_bug=undefined
16415else
16416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16417/* end confdefs.h. */
16418
16419 __attribute__((noinline)) int
16420 foo(int *p) {
16421 int r;
16422 asm ( "movl \$6, (%1)\n\t"
16423 "xorl %0, %0\n\t"
16424 : "=r" (r) : "r" (p) : "memory"
16425 );
16426 return r;
16427 }
16428 int main() {
16429 int p = 8;
16430 if ((foo(&p) ? : p) != 6)
16431 return 1;
16432 return 0;
16433 }
16434
16435_ACEOF
16436if ac_fn_c_try_run "$LINENO"; then :
16437 have_ipa_pure_const_bug=no
16438else
16439 have_ipa_pure_const_bug=yes
16440fi
16441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16442 conftest.$ac_objext conftest.beam conftest.$ac_ext
16443fi
16444
16445 CFLAGS="$saved_cflags"
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16447$as_echo "$have_ipa_pure_const_bug" >&6; }
16448 if test "$have_ipa_pure_const_bug" = yes; then
16449
16450$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16451
16452 fi
16453 ;;
16454 esac
16455fi
16456
Victor Stinner4f5366e2015-01-09 02:13:19 +010016457# Check for stdatomic.h
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16459$as_echo_n "checking for stdatomic.h... " >&6; }
16460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16461/* end confdefs.h. */
16462
16463
16464 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016465 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016466 int main() {
16467 int loaded_value = atomic_load(&value);
16468 return 0;
16469 }
16470
16471
16472_ACEOF
16473if ac_fn_c_try_link "$LINENO"; then :
16474 have_stdatomic_h=yes
16475else
16476 have_stdatomic_h=no
16477fi
16478rm -f core conftest.err conftest.$ac_objext \
16479 conftest$ac_exeext conftest.$ac_ext
16480
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16482$as_echo "$have_stdatomic_h" >&6; }
16483
16484if test "$have_stdatomic_h" = yes; then
16485
16486$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16487
16488fi
16489
16490# Check for GCC >= 4.7 __atomic builtins
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16492$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494/* end confdefs.h. */
16495
16496
16497 volatile int val = 1;
16498 int main() {
16499 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16500 return 0;
16501 }
16502
16503
16504_ACEOF
16505if ac_fn_c_try_link "$LINENO"; then :
16506 have_builtin_atomic=yes
16507else
16508 have_builtin_atomic=no
16509fi
16510rm -f core conftest.err conftest.$ac_objext \
16511 conftest$ac_exeext conftest.$ac_ext
16512
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16514$as_echo "$have_builtin_atomic" >&6; }
16515
16516if test "$have_builtin_atomic" = yes; then
16517
16518$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16519
16520fi
16521
Ned Deily322f5ba2013-11-21 23:01:59 -080016522# ensurepip option
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16524$as_echo_n "checking for ensurepip... " >&6; }
16525
16526# Check whether --with-ensurepip was given.
16527if test "${with_ensurepip+set}" = set; then :
16528 withval=$with_ensurepip;
16529else
16530 with_ensurepip=upgrade
16531fi
16532
16533case $with_ensurepip in #(
16534 yes|upgrade) :
16535 ENSUREPIP=upgrade ;; #(
16536 install) :
16537 ENSUREPIP=install ;; #(
16538 no) :
16539 ENSUREPIP=no ;; #(
16540 *) :
16541 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16542esac
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16544$as_echo "$ENSUREPIP" >&6; }
16545
16546
Victor Stinner35a97c02015-03-08 02:59:09 +010016547# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16549$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551/* end confdefs.h. */
16552
16553
16554 #include <dirent.h>
16555
16556 int main() {
16557 struct dirent entry;
16558 return entry.d_type == DT_UNKNOWN;
16559 }
16560
16561
16562_ACEOF
16563if ac_fn_c_try_link "$LINENO"; then :
16564 have_dirent_d_type=yes
16565else
16566 have_dirent_d_type=no
16567fi
16568rm -f core conftest.err conftest.$ac_objext \
16569 conftest$ac_exeext conftest.$ac_ext
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16571$as_echo "$have_dirent_d_type" >&6; }
16572
16573if test "$have_dirent_d_type" = yes; then
16574
16575$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16576
16577fi
16578
Victor Stinner9eb57c52015-03-19 22:21:49 +010016579# check if the Linux getrandom() syscall is available
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16581$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584
16585
Victor Stinner1b80b242016-04-12 22:34:58 +020016586 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016587 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016588 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016589
16590 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016591 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016592 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016593 const int flags = GRND_NONBLOCK;
16594 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016595 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016596 return 0;
16597 }
16598
16599
16600_ACEOF
16601if ac_fn_c_try_link "$LINENO"; then :
16602 have_getrandom_syscall=yes
16603else
16604 have_getrandom_syscall=no
16605fi
16606rm -f core conftest.err conftest.$ac_objext \
16607 conftest$ac_exeext conftest.$ac_ext
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16609$as_echo "$have_getrandom_syscall" >&6; }
16610
16611if test "$have_getrandom_syscall" = yes; then
16612
16613$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16614
16615fi
16616
Victor Stinner3abf44e2015-09-18 15:38:37 +020016617# check if the getrandom() function is available
16618# the test was written for the Solaris function of <sys/random.h>
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16620$as_echo_n "checking for the getrandom() function... " >&6; }
16621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16622/* end confdefs.h. */
16623
16624
16625 #include <sys/random.h>
16626
16627 int main() {
16628 char buffer[1];
16629 const size_t buflen = sizeof(buffer);
16630 const int flags = 0;
16631 /* ignore the result, Python checks for ENOSYS at runtime */
16632 (void)getrandom(buffer, buflen, flags);
16633 return 0;
16634 }
16635
16636
16637_ACEOF
16638if ac_fn_c_try_link "$LINENO"; then :
16639 have_getrandom=yes
16640else
16641 have_getrandom=no
16642fi
16643rm -f core conftest.err conftest.$ac_objext \
16644 conftest$ac_exeext conftest.$ac_ext
16645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16646$as_echo "$have_getrandom" >&6; }
16647
16648if test "$have_getrandom" = yes; then
16649
16650$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16651
16652fi
16653
Christian Heimesff5be6e2018-01-20 13:19:21 +010016654# Check for usable OpenSSL
16655
16656 found=false
16657
16658# Check whether --with-openssl was given.
16659if test "${with_openssl+set}" = set; then :
16660 withval=$with_openssl;
16661 case "$withval" in
16662 "" | y | ye | yes | n | no)
16663 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16664 ;;
16665 *) ssldirs="$withval"
16666 ;;
16667 esac
16668
16669else
16670
16671 # if pkg-config is installed and openssl has installed a .pc file,
16672 # then use that information and don't search ssldirs
16673 if test -n "$ac_tool_prefix"; then
16674 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16675set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16677$as_echo_n "checking for $ac_word... " >&6; }
16678if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16679 $as_echo_n "(cached) " >&6
16680else
16681 if test -n "$PKG_CONFIG"; then
16682 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16683else
16684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16685for as_dir in $PATH
16686do
16687 IFS=$as_save_IFS
16688 test -z "$as_dir" && as_dir=.
16689 for ac_exec_ext in '' $ac_executable_extensions; do
16690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16691 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16693 break 2
16694 fi
16695done
16696 done
16697IFS=$as_save_IFS
16698
16699fi
16700fi
16701PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16702if test -n "$PKG_CONFIG"; then
16703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16704$as_echo "$PKG_CONFIG" >&6; }
16705else
16706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16707$as_echo "no" >&6; }
16708fi
16709
16710
16711fi
16712if test -z "$ac_cv_prog_PKG_CONFIG"; then
16713 ac_ct_PKG_CONFIG=$PKG_CONFIG
16714 # Extract the first word of "pkg-config", so it can be a program name with args.
16715set dummy pkg-config; ac_word=$2
16716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16717$as_echo_n "checking for $ac_word... " >&6; }
16718if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16719 $as_echo_n "(cached) " >&6
16720else
16721 if test -n "$ac_ct_PKG_CONFIG"; then
16722 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16723else
16724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16725for as_dir in $PATH
16726do
16727 IFS=$as_save_IFS
16728 test -z "$as_dir" && as_dir=.
16729 for ac_exec_ext in '' $ac_executable_extensions; do
16730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16731 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16733 break 2
16734 fi
16735done
16736 done
16737IFS=$as_save_IFS
16738
16739fi
16740fi
16741ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16742if test -n "$ac_ct_PKG_CONFIG"; then
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16744$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16745else
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16747$as_echo "no" >&6; }
16748fi
16749
16750 if test "x$ac_ct_PKG_CONFIG" = x; then
16751 PKG_CONFIG=""
16752 else
16753 case $cross_compiling:$ac_tool_warned in
16754yes:)
16755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16757ac_tool_warned=yes ;;
16758esac
16759 PKG_CONFIG=$ac_ct_PKG_CONFIG
16760 fi
16761else
16762 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16763fi
16764
16765 if test x"$PKG_CONFIG" != x""; then
16766 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16767 if test $? = 0; then
16768 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16769 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16770 found=true
16771 fi
16772 fi
16773
16774 # no such luck; use some default ssldirs
16775 if ! $found; then
16776 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16777 fi
16778
16779
16780fi
16781
16782
16783
16784 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16785 # an 'openssl' subdirectory
16786
16787 if ! $found; then
16788 OPENSSL_INCLUDES=
16789 for ssldir in $ssldirs; do
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16791$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16792 if test -f "$ssldir/include/openssl/ssl.h"; then
16793 OPENSSL_INCLUDES="-I$ssldir/include"
16794 OPENSSL_LDFLAGS="-L$ssldir/lib"
16795 OPENSSL_LIBS="-lssl -lcrypto"
16796 found=true
16797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16798$as_echo "yes" >&6; }
16799 break
16800 else
16801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16802$as_echo "no" >&6; }
16803 fi
16804 done
16805
16806 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16807 # it will just work!
16808 fi
16809
16810 # try the preprocessor and linker with our new flags,
16811 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16812
16813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16814$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16815 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16816 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16817
16818 save_LIBS="$LIBS"
16819 save_LDFLAGS="$LDFLAGS"
16820 save_CPPFLAGS="$CPPFLAGS"
16821 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16822 LIBS="$OPENSSL_LIBS $LIBS"
16823 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16825/* end confdefs.h. */
16826#include <openssl/ssl.h>
16827int
16828main ()
16829{
16830SSL_new(NULL)
16831 ;
16832 return 0;
16833}
16834_ACEOF
16835if ac_fn_c_try_link "$LINENO"; then :
16836
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16838$as_echo "yes" >&6; }
16839 have_openssl=yes
16840
16841else
16842
16843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16844$as_echo "no" >&6; }
16845 have_openssl=no
16846
16847fi
16848rm -f core conftest.err conftest.$ac_objext \
16849 conftest$ac_exeext conftest.$ac_ext
16850 CPPFLAGS="$save_CPPFLAGS"
16851 LDFLAGS="$save_LDFLAGS"
16852 LIBS="$save_LIBS"
16853
16854
16855
16856
16857
16858
16859if test "$have_openssl" = yes; then
16860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16861$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16862
16863 save_LIBS="$LIBS"
16864 save_LDFLAGS="$LDFLAGS"
16865 save_CPPFLAGS="$CPPFLAGS"
16866 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16867 LIBS="$OPENSSL_LIBS $LIBS"
16868 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16869
16870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16871/* end confdefs.h. */
16872
16873 #include <openssl/x509_vfy.h>
16874
16875int
16876main ()
16877{
16878
16879 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16880 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16881 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16882 X509_VERIFY_PARAM_set_hostflags(p, 0);
16883
16884 ;
16885 return 0;
16886}
16887
16888_ACEOF
16889if ac_fn_c_try_link "$LINENO"; then :
16890
16891 ac_cv_has_x509_verify_param_set1_host=yes
16892
16893else
16894
16895 ac_cv_has_x509_verify_param_set1_host=no
16896
16897fi
16898rm -f core conftest.err conftest.$ac_objext \
16899 conftest$ac_exeext conftest.$ac_ext
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16901$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16902 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16903
16904$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16905
16906 fi
16907
16908 CPPFLAGS="$save_CPPFLAGS"
16909 LDFLAGS="$save_LDFLAGS"
16910 LIBS="$save_LIBS"
16911fi
16912
Christian Heimes892d66e2018-01-29 14:10:18 +010016913# ssl module default cipher suite string
16914
16915
16916
16917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16918$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16919
16920# Check whether --with-ssl-default-suites was given.
16921if test "${with_ssl_default_suites+set}" = set; then :
16922 withval=$with_ssl_default_suites;
16923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16924$as_echo "$withval" >&6; }
16925case "$withval" in
16926 python)
16927 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16928
16929 ;;
16930 openssl)
16931 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16932
16933 ;;
16934 *)
16935 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16936
16937 cat >>confdefs.h <<_ACEOF
16938#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16939_ACEOF
16940
16941 ;;
16942esac
16943
16944else
16945
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16947$as_echo "python" >&6; }
16948$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16949
16950
16951fi
16952
16953
16954
Guido van Rossum627b2d71993-12-24 10:39:16 +000016955# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016956ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016957
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016958ac_config_files="$ac_config_files Modules/ld_so_aix"
16959
Martin v. Löwis11437992002-04-12 09:54:03 +000016960cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016961# This file is a shell script that caches the results of configure
16962# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016963# scripts and configure runs, see configure's option --config-cache.
16964# It is not useful on other systems. If it contains results you don't
16965# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016966#
Martin v. Löwis11437992002-04-12 09:54:03 +000016967# config.status only pays attention to the cache file if you give it
16968# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016969#
Skip Montanaro6dead952003-09-25 14:50:04 +000016970# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016971# loading this file, other *unset* `ac_cv_foo' will be assigned the
16972# following values.
16973
16974_ACEOF
16975
Guido van Rossumf78abae1997-01-21 22:02:36 +000016976# The following way of writing the cache mishandles newlines in values,
16977# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016979# Ultrix sh set writes to stderr and can't be redirected directly,
16980# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981(
16982 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16983 eval ac_val=\$$ac_var
16984 case $ac_val in #(
16985 *${as_nl}*)
16986 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016987 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16988$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989 esac
16990 case $ac_var in #(
16991 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16993 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994 esac ;;
16995 esac
16996 done
16997
Martin v. Löwis11437992002-04-12 09:54:03 +000016998 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17000 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017001 # `set' does not quote correctly, so add quotes: double-quote
17002 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017004 "s/'/'\\\\''/g;
17005 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 *)
17008 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017010 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011 esac |
17012 sort
17013) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017018 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17019 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17021 :end' >>confcache
17022if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17023 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017024 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017025 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17026$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017027 if test ! -f "$cache_file" || test -h "$cache_file"; then
17028 cat confcache >"$cache_file"
17029 else
17030 case $cache_file in #(
17031 */* | ?:*)
17032 mv -f confcache "$cache_file"$$ &&
17033 mv -f "$cache_file"$$ "$cache_file" ;; #(
17034 *)
17035 mv -f confcache "$cache_file" ;;
17036 esac
17037 fi
17038 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017039 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17041$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017042 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017043fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017044rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017045
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017046test "x$prefix" = xNONE && prefix=$ac_default_prefix
17047# Let make expand exec_prefix.
17048test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017050DEFS=-DHAVE_CONFIG_H
17051
Skip Montanaro6dead952003-09-25 14:50:04 +000017052ac_libobjs=
17053ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017054U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017055for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17056 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017058 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17060 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17062 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017063done
17064LIBOBJS=$ac_libobjs
17065
17066LTLIBOBJS=$ac_ltlibobjs
17067
17068
Martin v. Löwis11437992002-04-12 09:54:03 +000017069
Matthias Kloseb9621712010-04-24 17:59:49 +000017070
Victor Stinnere0be4232011-10-25 13:06:09 +020017071: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017072ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017073ac_clean_files_save=$ac_clean_files
17074ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017075{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17076$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17077as_write_fail=0
17078cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017079#! $SHELL
17080# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017081# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017082# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017083# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017086ac_cs_recheck=false
17087ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017088
Matthias Kloseb9621712010-04-24 17:59:49 +000017089SHELL=\${CONFIG_SHELL-$SHELL}
17090export SHELL
17091_ASEOF
17092cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17093## -------------------- ##
17094## M4sh Initialization. ##
17095## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097# Be more Bourne compatible
17098DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017099if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 emulate sh
17101 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017102 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017103 # is contrary to our usage. Disable this feature.
17104 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017106else
Matthias Kloseb9621712010-04-24 17:59:49 +000017107 case `(set -o) 2>/dev/null` in #(
17108 *posix*) :
17109 set -o posix ;; #(
17110 *) :
17111 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017112esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017113fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017114
17115
Matthias Kloseb9621712010-04-24 17:59:49 +000017116as_nl='
17117'
17118export as_nl
17119# Printing a long string crashes Solaris 7 /usr/bin/printf.
17120as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17121as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17122as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17123# Prefer a ksh shell builtin over an external printf program on Solaris,
17124# but without wasting forks for bash or zsh.
17125if test -z "$BASH_VERSION$ZSH_VERSION" \
17126 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17127 as_echo='print -r --'
17128 as_echo_n='print -rn --'
17129elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17130 as_echo='printf %s\n'
17131 as_echo_n='printf %s'
17132else
17133 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17134 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17135 as_echo_n='/usr/ucb/echo -n'
17136 else
17137 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17138 as_echo_n_body='eval
17139 arg=$1;
17140 case $arg in #(
17141 *"$as_nl"*)
17142 expr "X$arg" : "X\\(.*\\)$as_nl";
17143 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17144 esac;
17145 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17146 '
17147 export as_echo_n_body
17148 as_echo_n='sh -c $as_echo_n_body as_echo'
17149 fi
17150 export as_echo_body
17151 as_echo='sh -c $as_echo_body as_echo'
17152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017153
17154# The user is always right.
17155if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017156 PATH_SEPARATOR=:
17157 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17158 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17159 PATH_SEPARATOR=';'
17160 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163
17164# IFS
17165# We need space, tab and new line, in precisely that order. Quoting is
17166# there to prevent editors from complaining about space-tab.
17167# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17168# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169IFS=" "" $as_nl"
17170
17171# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017172as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017173case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 *[\\/]* ) as_myself=$0 ;;
17175 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017176for as_dir in $PATH
17177do
17178 IFS=$as_save_IFS
17179 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017180 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17181 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184 ;;
17185esac
17186# We did not find ourselves, most probably we were run as `sh COMMAND'
17187# in which case we are not to be found in the path.
17188if test "x$as_myself" = x; then
17189 as_myself=$0
17190fi
17191if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017192 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17193 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194fi
17195
Matthias Kloseb9621712010-04-24 17:59:49 +000017196# Unset variables that we do not need and which cause bugs (e.g. in
17197# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17198# suppresses any "Segmentation fault" message there. '((' could
17199# trigger a bug in pdksh 5.2.14.
17200for as_var in BASH_ENV ENV MAIL MAILPATH
17201do eval test x\${$as_var+set} = xset \
17202 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017203done
17204PS1='$ '
17205PS2='> '
17206PS4='+ '
17207
17208# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017209LC_ALL=C
17210export LC_ALL
17211LANGUAGE=C
17212export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017213
Matthias Kloseb9621712010-04-24 17:59:49 +000017214# CDPATH.
17215(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17216
17217
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017218# as_fn_error STATUS ERROR [LINENO LOG_FD]
17219# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017220# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17221# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017222# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017223as_fn_error ()
17224{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017225 as_status=$1; test $as_status -eq 0 && as_status=1
17226 if test "$4"; then
17227 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17228 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017230 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017231 as_fn_exit $as_status
17232} # as_fn_error
17233
17234
17235# as_fn_set_status STATUS
17236# -----------------------
17237# Set $? to STATUS, without forking.
17238as_fn_set_status ()
17239{
17240 return $1
17241} # as_fn_set_status
17242
17243# as_fn_exit STATUS
17244# -----------------
17245# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17246as_fn_exit ()
17247{
17248 set +e
17249 as_fn_set_status $1
17250 exit $1
17251} # as_fn_exit
17252
17253# as_fn_unset VAR
17254# ---------------
17255# Portably unset VAR.
17256as_fn_unset ()
17257{
17258 { eval $1=; unset $1;}
17259}
17260as_unset=as_fn_unset
17261# as_fn_append VAR VALUE
17262# ----------------------
17263# Append the text in VALUE to the end of the definition contained in VAR. Take
17264# advantage of any shell optimizations that allow amortized linear growth over
17265# repeated appends, instead of the typical quadratic growth present in naive
17266# implementations.
17267if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17268 eval 'as_fn_append ()
17269 {
17270 eval $1+=\$2
17271 }'
17272else
17273 as_fn_append ()
17274 {
17275 eval $1=\$$1\$2
17276 }
17277fi # as_fn_append
17278
17279# as_fn_arith ARG...
17280# ------------------
17281# Perform arithmetic evaluation on the ARGs, and store the result in the
17282# global $as_val. Take advantage of shells that can avoid forks. The arguments
17283# must be portable across $(()) and expr.
17284if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17285 eval 'as_fn_arith ()
17286 {
17287 as_val=$(( $* ))
17288 }'
17289else
17290 as_fn_arith ()
17291 {
17292 as_val=`expr "$@" || test $? -eq 1`
17293 }
17294fi # as_fn_arith
17295
17296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297if expr a : '\(a\)' >/dev/null 2>&1 &&
17298 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17299 as_expr=expr
17300else
17301 as_expr=false
17302fi
17303
17304if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17305 as_basename=basename
17306else
17307 as_basename=false
17308fi
17309
Matthias Kloseb9621712010-04-24 17:59:49 +000017310if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17311 as_dirname=dirname
17312else
17313 as_dirname=false
17314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316as_me=`$as_basename -- "$0" ||
17317$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17318 X"$0" : 'X\(//\)$' \| \
17319 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017320$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 sed '/^.*\/\([^/][^/]*\)\/*$/{
17322 s//\1/
17323 q
17324 }
17325 /^X\/\(\/\/\)$/{
17326 s//\1/
17327 q
17328 }
17329 /^X\/\(\/\).*/{
17330 s//\1/
17331 q
17332 }
17333 s/.*/./; q'`
17334
Matthias Kloseb9621712010-04-24 17:59:49 +000017335# Avoid depending upon Character Ranges.
17336as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17337as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17338as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17339as_cr_digits='0123456789'
17340as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341
17342ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017343case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017345 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017347 xy) ECHO_C='\c';;
17348 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17349 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 esac;;
17351*)
17352 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017354
Martin v. Löwis11437992002-04-12 09:54:03 +000017355rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356if test -d conf$$.dir; then
17357 rm -f conf$$.dir/conf$$.file
17358else
17359 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017360 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017362if (echo >conf$$.file) 2>/dev/null; then
17363 if ln -s conf$$.file conf$$ 2>/dev/null; then
17364 as_ln_s='ln -s'
17365 # ... but there are two gotchas:
17366 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17367 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017368 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017370 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017371 elif ln conf$$.file conf$$ 2>/dev/null; then
17372 as_ln_s=ln
17373 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017374 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017376else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017377 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17380rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017381
Matthias Kloseb9621712010-04-24 17:59:49 +000017382
17383# as_fn_mkdir_p
17384# -------------
17385# Create "$as_dir" as a directory, including parents if necessary.
17386as_fn_mkdir_p ()
17387{
17388
17389 case $as_dir in #(
17390 -*) as_dir=./$as_dir;;
17391 esac
17392 test -d "$as_dir" || eval $as_mkdir_p || {
17393 as_dirs=
17394 while :; do
17395 case $as_dir in #(
17396 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17397 *) as_qdir=$as_dir;;
17398 esac
17399 as_dirs="'$as_qdir' $as_dirs"
17400 as_dir=`$as_dirname -- "$as_dir" ||
17401$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17402 X"$as_dir" : 'X\(//\)[^/]' \| \
17403 X"$as_dir" : 'X\(//\)$' \| \
17404 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17405$as_echo X"$as_dir" |
17406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17407 s//\1/
17408 q
17409 }
17410 /^X\(\/\/\)[^/].*/{
17411 s//\1/
17412 q
17413 }
17414 /^X\(\/\/\)$/{
17415 s//\1/
17416 q
17417 }
17418 /^X\(\/\).*/{
17419 s//\1/
17420 q
17421 }
17422 s/.*/./; q'`
17423 test -d "$as_dir" && break
17424 done
17425 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017426 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017427
17428
17429} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017430if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017432else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017433 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017434 as_mkdir_p=false
17435fi
17436
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017437
17438# as_fn_executable_p FILE
17439# -----------------------
17440# Test if FILE is an executable regular file.
17441as_fn_executable_p ()
17442{
17443 test -f "$1" && test -x "$1"
17444} # as_fn_executable_p
17445as_test_x='test -x'
17446as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017447
17448# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017449as_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 +000017450
17451# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017452as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017453
17454
Martin v. Löwis11437992002-04-12 09:54:03 +000017455exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017456## ----------------------------------- ##
17457## Main body of $CONFIG_STATUS script. ##
17458## ----------------------------------- ##
17459_ASEOF
17460test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017461
Matthias Kloseb9621712010-04-24 17:59:49 +000017462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17463# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017464# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465# values after options handling.
17466ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017467This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017468generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017469
17470 CONFIG_FILES = $CONFIG_FILES
17471 CONFIG_HEADERS = $CONFIG_HEADERS
17472 CONFIG_LINKS = $CONFIG_LINKS
17473 CONFIG_COMMANDS = $CONFIG_COMMANDS
17474 $ $0 $@
17475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476on `(hostname || uname -n) 2>/dev/null | sed 1q`
17477"
17478
Martin v. Löwis11437992002-04-12 09:54:03 +000017479_ACEOF
17480
Matthias Kloseb9621712010-04-24 17:59:49 +000017481case $ac_config_files in *"
17482"*) set x $ac_config_files; shift; ac_config_files=$*;;
17483esac
17484
17485case $ac_config_headers in *"
17486"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17487esac
17488
17489
17490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017491# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017492config_files="$ac_config_files"
17493config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
Matthias Kloseb9621712010-04-24 17:59:49 +000017497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017498ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017499\`$as_me' instantiates files and other configuration actions
17500from templates according to the current configuration. Unless the files
17501and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017502
Matthias Kloseb9621712010-04-24 17:59:49 +000017503Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017504
17505 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017507 --config print configuration, then exit
17508 -q, --quiet, --silent
17509 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 -d, --debug don't remove temporary files
17511 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 --file=FILE[:TEMPLATE]
17513 instantiate the configuration file FILE
17514 --header=FILE[:TEMPLATE]
17515 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017516
17517Configuration files:
17518$config_files
17519
17520Configuration headers:
17521$config_headers
17522
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017523Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17527ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017528ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017529python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017530configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017531 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017532
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017533Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017534This config.status script is free software; the Free Software Foundation
17535gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536
17537ac_pwd='$ac_pwd'
17538srcdir='$srcdir'
17539INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017540MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017541test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017542_ACEOF
17543
Matthias Kloseb9621712010-04-24 17:59:49 +000017544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17545# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017546ac_need_defaults=:
17547while test $# != 0
17548do
17549 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017550 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17552 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017553 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555 --*=)
17556 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17557 ac_optarg=
17558 ac_shift=:
17559 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017561 ac_option=$1
17562 ac_optarg=$2
17563 ac_shift=shift
17564 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017565 esac
17566
Skip Montanaro6dead952003-09-25 14:50:04 +000017567 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017568 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017569 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17570 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 $as_echo "$ac_cs_version"; exit ;;
17573 --config | --confi | --conf | --con | --co | --c )
17574 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 debug=: ;;
17577 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017578 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017579 case $ac_optarg in
17580 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017581 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 esac
17583 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 ac_need_defaults=false;;
17585 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017586 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017587 case $ac_optarg in
17588 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17589 esac
17590 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592 --he | --h)
17593 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017594 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017595Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017598 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17599 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17600 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
17602 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017603 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017604Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017608
17609 esac
17610 shift
17611done
17612
Skip Montanaro6dead952003-09-25 14:50:04 +000017613ac_configure_extra_args=
17614
17615if $ac_cs_silent; then
17616 exec 6>/dev/null
17617 ac_configure_extra_args="$ac_configure_extra_args --silent"
17618fi
17619
17620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017622if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017623 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 shift
17625 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17626 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017628 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017629fi
17630
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633exec 5>>config.log
17634{
17635 echo
17636 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17637## Running $as_me. ##
17638_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017639 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017645
Matthias Kloseb9621712010-04-24 17:59:49 +000017646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647
17648# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017649for ac_config_target in $ac_config_targets
17650do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651 case $ac_config_target in
17652 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17653 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17654 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017655 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17656 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017658 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017659 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017660 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661
Victor Stinnere0be4232011-10-25 13:06:09 +020017662 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 esac
17664done
17665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666
Martin v. Löwis11437992002-04-12 09:54:03 +000017667# If the user did not use the arguments to specify the items to instantiate,
17668# then the envvar interface is used. Set only those that are not.
17669# We use the long form for the default assignment because of an extremely
17670# bizarre bug on SunOS 4.1.3.
17671if $ac_need_defaults; then
17672 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17673 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17674fi
17675
Skip Montanaro6dead952003-09-25 14:50:04 +000017676# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017678# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679# Hook for its removal unless debugging.
17680# Note that there is a small window in which the directory will not be cleaned:
17681# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017682$debug ||
17683{
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017686 : "${ac_tmp:=$tmp}"
17687 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017690}
Martin v. Löwis11437992002-04-12 09:54:03 +000017691# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017692
Martin v. Löwis11437992002-04-12 09:54:03 +000017693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017695 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017696} ||
17697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698 tmp=./conf$$-$RANDOM
17699 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017700} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017701ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017702
Matthias Kloseb9621712010-04-24 17:59:49 +000017703# Set up the scripts for CONFIG_FILES section.
17704# No need to generate them if there are no CONFIG_FILES.
17705# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017707
Matthias Kloseb9621712010-04-24 17:59:49 +000017708
17709ac_cr=`echo X | tr X '\015'`
17710# On cygwin, bash can eat \r inside `` if the user requested igncr.
17711# But we know of no other shell where ac_cr would be empty at this
17712# point, so we can use a bashism as a fallback.
17713if test "x$ac_cr" = x; then
17714 eval ac_cr=\$\'\\r\'
17715fi
17716ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17717if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017718 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017719else
17720 ac_cs_awk_cr=$ac_cr
17721fi
17722
Victor Stinnere0be4232011-10-25 13:06:09 +020017723echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017724_ACEOF
17725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
Matthias Kloseb9621712010-04-24 17:59:49 +000017727{
17728 echo "cat >conf$$subs.awk <<_ACEOF" &&
17729 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17730 echo "_ACEOF"
17731} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17733ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734ac_delim='%!_!# '
17735for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017736 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017737 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17740 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 break
17742 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017743 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 else
17745 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747done
Matthias Kloseb9621712010-04-24 17:59:49 +000017748rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
Matthias Kloseb9621712010-04-24 17:59:49 +000017750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017751cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017753sed -n '
17754h
17755s/^/S["/; s/!.*/"]=/
17756p
17757g
17758s/^[^!]*!//
17759:repl
17760t repl
17761s/'"$ac_delim"'$//
17762t delim
17763:nl
17764h
17765s/\(.\{148\}\)..*/\1/
17766t more1
17767s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17768p
17769n
17770b repl
17771:more1
17772s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17773p
17774g
17775s/.\{148\}//
17776t nl
17777:delim
17778h
17779s/\(.\{148\}\)..*/\1/
17780t more2
17781s/["\\]/\\&/g; s/^/"/; s/$/"/
17782p
17783b
17784:more2
17785s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17786p
17787g
17788s/.\{148\}//
17789t delim
17790' <conf$$subs.awk | sed '
17791/^[^""]/{
17792 N
17793 s/\n//
17794}
17795' >>$CONFIG_STATUS || ac_write_fail=1
17796rm -f conf$$subs.awk
17797cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17798_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017799cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017800 for (key in S) S_is_set[key] = 1
17801 FS = ""
17802
17803}
17804{
17805 line = $ 0
17806 nfields = split(line, field, "@")
17807 substed = 0
17808 len = length(field[1])
17809 for (i = 2; i < nfields; i++) {
17810 key = field[i]
17811 keylen = length(key)
17812 if (S_is_set[key]) {
17813 value = S[key]
17814 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17815 len += length(value) + length(field[++i])
17816 substed = 1
17817 } else
17818 len += 1 + keylen
17819 }
17820
17821 print line
17822}
17823
17824_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17827if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17828 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17829else
17830 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017831fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017832 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017833_ACEOF
17834
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017835# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17836# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837# trailing colons and then remove the whole line if VPATH becomes empty
17838# (actually we leave an empty line to preserve line numbers).
17839if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017840 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17841h
17842s///
17843s/^/:/
17844s/[ ]*$/:/
17845s/:\$(srcdir):/:/g
17846s/:\${srcdir}:/:/g
17847s/:@srcdir@:/:/g
17848s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017850x
17851s/\(=[ ]*\).*/\1/
17852G
17853s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854s/^[^=]*=[ ]*$//
17855}'
17856fi
17857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017859fi # test -n "$CONFIG_FILES"
17860
Matthias Kloseb9621712010-04-24 17:59:49 +000017861# Set up the scripts for CONFIG_HEADERS section.
17862# No need to generate them if there are no CONFIG_HEADERS.
17863# This happens for instance with `./config.status Makefile'.
17864if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017865cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017866BEGIN {
17867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869# Transform confdefs.h into an awk script `defines.awk', embedded as
17870# here-document in config.status, that substitutes the proper values into
17871# config.h.in to produce config.h.
17872
17873# Create a delimiter string that does not exist in confdefs.h, to ease
17874# handling of long lines.
17875ac_delim='%!_!# '
17876for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017877 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17878 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017879 break
17880 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017881 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017882 else
17883 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17884 fi
17885done
17886
17887# For the awk script, D is an array of macro values keyed by name,
17888# likewise P contains macro parameters if any. Preserve backslash
17889# newline sequences.
17890
17891ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17892sed -n '
17893s/.\{148\}/&'"$ac_delim"'/g
17894t rset
17895:rset
17896s/^[ ]*#[ ]*define[ ][ ]*/ /
17897t def
17898d
17899:def
17900s/\\$//
17901t bsnl
17902s/["\\]/\\&/g
17903s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17904D["\1"]=" \3"/p
17905s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17906d
17907:bsnl
17908s/["\\]/\\&/g
17909s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17910D["\1"]=" \3\\\\\\n"\\/p
17911t cont
17912s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17913t cont
17914d
17915:cont
17916n
17917s/.\{148\}/&'"$ac_delim"'/g
17918t clear
17919:clear
17920s/\\$//
17921t bsnlc
17922s/["\\]/\\&/g; s/^/"/; s/$/"/p
17923d
17924:bsnlc
17925s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17926b cont
17927' <confdefs.h | sed '
17928s/'"$ac_delim"'/"\\\
17929"/g' >>$CONFIG_STATUS || ac_write_fail=1
17930
17931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17932 for (key in D) D_is_set[key] = 1
17933 FS = ""
17934}
17935/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17936 line = \$ 0
17937 split(line, arg, " ")
17938 if (arg[1] == "#") {
17939 defundef = arg[2]
17940 mac1 = arg[3]
17941 } else {
17942 defundef = substr(arg[1], 2)
17943 mac1 = arg[2]
17944 }
17945 split(mac1, mac2, "(") #)
17946 macro = mac2[1]
17947 prefix = substr(line, 1, index(line, defundef) - 1)
17948 if (D_is_set[macro]) {
17949 # Preserve the white space surrounding the "#".
17950 print prefix "define", macro P[macro] D[macro]
17951 next
17952 } else {
17953 # Replace #undef with comments. This is necessary, for example,
17954 # in the case of _POSIX_SOURCE, which is predefined and required
17955 # on some systems where configure will not decide to define it.
17956 if (defundef == "undef") {
17957 print "/*", prefix defundef, macro, "*/"
17958 next
17959 }
17960 }
17961}
17962{ print }
17963_ACAWK
17964_ACEOF
17965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017966 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017967fi # test -n "$CONFIG_HEADERS"
17968
17969
17970eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17971shift
17972for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973do
17974 case $ac_tag in
17975 :[FHLC]) ac_mode=$ac_tag; continue;;
17976 esac
17977 case $ac_mode$ac_tag in
17978 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017979 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980 :[FH]-) ac_tag=-:-;;
17981 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17982 esac
17983 ac_save_IFS=$IFS
17984 IFS=:
17985 set x $ac_tag
17986 IFS=$ac_save_IFS
17987 shift
17988 ac_file=$1
17989 shift
17990
17991 case $ac_mode in
17992 :L) ac_source=$1;;
17993 :[FH])
17994 ac_file_inputs=
17995 for ac_f
17996 do
17997 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017998 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999 *) # Look for the file first in the build tree, then in the source tree
18000 # (if the path is not absolute). The absolute path cannot be DOS-style,
18001 # because $ac_f cannot contain `:'.
18002 test -f "$ac_f" ||
18003 case $ac_f in
18004 [\\/$]*) false;;
18005 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18006 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018007 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018009 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18010 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011 done
18012
18013 # Let's still pretend it is `configure' which instantiates (i.e., don't
18014 # use $as_me), people would be surprised to read:
18015 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018016 configure_input='Generated from '`
18017 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18018 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 if test x"$ac_file" != x-; then
18020 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018021 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18022$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018024 # Neutralize special characters interpreted by sed in replacement strings.
18025 case $configure_input in #(
18026 *\&* | *\|* | *\\* )
18027 ac_sed_conf_input=`$as_echo "$configure_input" |
18028 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18029 *) ac_sed_conf_input=$configure_input;;
18030 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031
18032 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018033 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18034 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 esac
18036 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018037 esac
18038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018040$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018041 X"$ac_file" : 'X\(//\)[^/]' \| \
18042 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018044$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18046 s//\1/
18047 q
18048 }
18049 /^X\(\/\/\)[^/].*/{
18050 s//\1/
18051 q
18052 }
18053 /^X\(\/\/\)$/{
18054 s//\1/
18055 q
18056 }
18057 /^X\(\/\).*/{
18058 s//\1/
18059 q
18060 }
18061 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018062 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018063 ac_builddir=.
18064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065case "$ac_dir" in
18066.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18067*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018068 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018070 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071 case $ac_top_builddir_sub in
18072 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18073 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18074 esac ;;
18075esac
18076ac_abs_top_builddir=$ac_pwd
18077ac_abs_builddir=$ac_pwd$ac_dir_suffix
18078# for backward compatibility:
18079ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018080
18081case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 ac_top_srcdir=$ac_top_builddir_sub
18085 ac_abs_top_srcdir=$ac_pwd ;;
18086 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088 ac_top_srcdir=$srcdir
18089 ac_abs_top_srcdir=$srcdir ;;
18090 *) # Relative name.
18091 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18092 ac_top_srcdir=$ac_top_build_prefix$srcdir
18093 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018094esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 case $ac_mode in
18099 :F)
18100 #
18101 # CONFIG_FILE
18102 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018103
18104 case $INSTALL in
18105 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018107 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018108 ac_MKDIR_P=$MKDIR_P
18109 case $MKDIR_P in
18110 [\\/$]* | ?:[\\/]* ) ;;
18111 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18112 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018113_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114
Matthias Kloseb9621712010-04-24 17:59:49 +000018115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116# If the template does not know about datarootdir, expand it.
18117# FIXME: This hack should be removed a few years after 2.60.
18118ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018119ac_sed_dataroot='
18120/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121 p
18122 q
18123}
18124/@datadir@/p
18125/@docdir@/p
18126/@infodir@/p
18127/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018128/@mandir@/p'
18129case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130*datarootdir*) ac_datarootdir_seen=yes;;
18131*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18133$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 ac_datarootdir_hack='
18137 s&@datadir@&$datadir&g
18138 s&@docdir@&$docdir&g
18139 s&@infodir@&$infodir&g
18140 s&@localedir@&$localedir&g
18141 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018142 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143esac
18144_ACEOF
18145
18146# Neutralize VPATH when `$srcdir' = `.'.
18147# Shell code in configure.ac might set extrasub.
18148# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18150ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018151$extrasub
18152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018153cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018154:t
18155/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018156s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018158s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159s&@srcdir@&$ac_srcdir&;t t
18160s&@abs_srcdir@&$ac_abs_srcdir&;t t
18161s&@top_srcdir@&$ac_top_srcdir&;t t
18162s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18163s&@builddir@&$ac_builddir&;t t
18164s&@abs_builddir@&$ac_abs_builddir&;t t
18165s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18166s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018167s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018169"
Victor Stinnere0be4232011-10-25 13:06:09 +020018170eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18171 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018174 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18175 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18176 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018178which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018179$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018180which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018181
Victor Stinnere0be4232011-10-25 13:06:09 +020018182 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018183 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018184 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18185 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018186 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018187 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188 ;;
18189 :H)
18190 #
18191 # CONFIG_HEADER
18192 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018193 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018194 {
18195 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018196 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18197 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018198 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018199 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018200 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18201$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018202 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018203 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018204 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 fi
18207 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018208 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018209 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018210 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018214
18215 esac
18216
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018217
18218 case $ac_file$ac_mode in
18219 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18220
18221 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222done # for ac_tag
18223
Guido van Rossum627b2d71993-12-24 10:39:16 +000018224
Matthias Kloseb9621712010-04-24 17:59:49 +000018225as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018226_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018227ac_clean_files=$ac_clean_files_save
18228
Matthias Kloseb9621712010-04-24 17:59:49 +000018229test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018230 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018231
Martin v. Löwis11437992002-04-12 09:54:03 +000018232
18233# configure is writing to config.log, and then calls config.status.
18234# config.status does its own redirection, appending to config.log.
18235# Unfortunately, on DOS this fails, as config.log is still kept open
18236# by configure, so config.status won't be able to write to it; its
18237# output is simply discarded. So we exec the FD to /dev/null,
18238# effectively closing config.log, so it can be properly (re)opened and
18239# appended to by config.status. When coming back to configure, we
18240# need to make the FD available again.
18241if test "$no_create" != yes; then
18242 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018243 ac_config_status_args=
18244 test "$silent" = yes &&
18245 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018246 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018247 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 exec 5>>config.log
18249 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18250 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018251 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018252fi
18253if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18255$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018256fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018257
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018258
Christian Heimes75ed8902013-11-20 01:11:18 +010018259echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018260if test ! -f Modules/Setup.local
18261then
18262 echo "# Edit this file for local setup changes" >Modules/Setup.local
18263fi
18264
Christian Heimes75ed8902013-11-20 01:11:18 +010018265echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018266$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018267 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018268 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018269mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018270
18271if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18272 echo "" >&6
18273 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018274 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 +000018275 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018276 echo "" >&6
18277 echo "" >&6
18278fi
18279