blob: b4a70e6736bb8a395cc1f4b2190d26ee4a700f6a [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
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011288ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11289 #include <dirent.h>
11290"
11291if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11292
11293$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11294
11295fi
11296
11297
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011298# For some functions, having a definition is not sufficient, since
11299# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11301$as_echo_n "checking for chroot... " >&6; }
11302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305int
11306main ()
11307{
11308void *x=chroot
11309 ;
11310 return 0;
11311}
11312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316
Matthias Kloseb159a552010-04-25 21:00:44 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011318$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319else
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
11323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11326$as_echo_n "checking for link... " >&6; }
11327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011328/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330int
11331main ()
11332{
11333void *x=link
11334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341
Matthias Kloseb159a552010-04-25 21:00:44 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011343$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344else
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347
11348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11351$as_echo_n "checking for symlink... " >&6; }
11352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011354#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355int
11356main ()
11357{
11358void *x=symlink
11359 ;
11360 return 0;
11361}
11362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011366
Matthias Kloseb159a552010-04-25 21:00:44 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011368$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011372
11373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11376$as_echo_n "checking for fchdir... " >&6; }
11377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011378/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379#include <unistd.h>
11380int
11381main ()
11382{
11383void *x=fchdir
11384 ;
11385 return 0;
11386}
11387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011389
Matthias Kloseb9621712010-04-24 17:59:49 +000011390$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011391
Matthias Kloseb159a552010-04-25 21:00:44 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011393$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394else
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397
11398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11401$as_echo_n "checking for fsync... " >&6; }
11402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011404#include <unistd.h>
11405int
11406main ()
11407{
11408void *x=fsync
11409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011416
Matthias Kloseb159a552010-04-25 21:00:44 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011418$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011419else
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011422
11423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11426$as_echo_n "checking for fdatasync... " >&6; }
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011429#include <unistd.h>
11430int
11431main ()
11432{
11433void *x=fdatasync
11434 ;
11435 return 0;
11436}
11437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011441
Matthias Kloseb159a552010-04-25 21:00:44 +000011442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011447
11448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11451$as_echo_n "checking for epoll... " >&6; }
11452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011453/* end confdefs.h. */
11454#include <sys/epoll.h>
11455int
11456main ()
11457{
11458void *x=epoll_create
11459 ;
11460 return 0;
11461}
11462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011466
Matthias Kloseb159a552010-04-25 21:00:44 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011468$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011469else
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011472
11473fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11476$as_echo_n "checking for epoll_create1... " >&6; }
11477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11478/* end confdefs.h. */
11479#include <sys/epoll.h>
11480int
11481main ()
11482{
11483void *x=epoll_create1
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488if ac_fn_c_try_compile "$LINENO"; then :
11489
11490$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493$as_echo "yes" >&6; }
11494else
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
11497
11498fi
11499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11501$as_echo_n "checking for kqueue... " >&6; }
11502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011503/* end confdefs.h. */
11504
11505#include <sys/types.h>
11506#include <sys/event.h>
11507
11508int
11509main ()
11510{
11511int x=kqueue()
11512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011519
Matthias Kloseb159a552010-04-25 21:00:44 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011521$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011525
11526fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11529$as_echo_n "checking for prlimit... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11531/* end confdefs.h. */
11532
11533#include <sys/time.h>
11534#include <sys/resource.h>
11535
11536int
11537main ()
11538{
11539void *x=prlimit
11540 ;
11541 return 0;
11542}
11543_ACEOF
11544if ac_fn_c_try_compile "$LINENO"; then :
11545
11546$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11547
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11549$as_echo "yes" >&6; }
11550else
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553
11554fi
11555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11556
Martin v. Löwisd5843682002-11-21 20:41:28 +000011557# On some systems (eg. FreeBSD 5), we would find a definition of the
11558# functions ctermid_r, setgroups in the library, but no prototype
11559# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11560# address to avoid compiler warnings and potential miscompilations
11561# because of the missing prototypes.
11562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11564$as_echo_n "checking for ctermid_r... " >&6; }
11565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567
Martin v. Löwisd5843682002-11-21 20:41:28 +000011568#include <stdio.h>
11569
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570int
11571main ()
11572{
11573void* p = ctermid_r
11574 ;
11575 return 0;
11576}
11577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011579
Matthias Kloseb9621712010-04-24 17:59:49 +000011580$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011581
Matthias Kloseb159a552010-04-25 21:00:44 +000011582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011587
11588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11590
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11592$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011593if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011594 $as_echo_n "(cached) " >&6
11595else
11596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011597/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011598#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011599int
11600main ()
11601{
11602void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011603
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011609 ac_cv_flock_decl=yes
11610else
11611 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011612
11613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011615
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011616fi
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11618$as_echo "$ac_cv_flock_decl" >&6; }
11619if test "x${ac_cv_flock_decl}" = xyes; then
11620 for ac_func in flock
11621do :
11622 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011623if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011624 cat >>confdefs.h <<_ACEOF
11625#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011626_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011627
Antoine Pitroua3000072010-09-07 14:52:42 +000011628else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011630$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011631if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011632 $as_echo_n "(cached) " >&6
11633else
11634 ac_check_lib_save_LIBS=$LIBS
11635LIBS="-lbsd $LIBS"
11636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11637/* end confdefs.h. */
11638
11639/* Override any GCC internal prototype to avoid an error.
11640 Use char because int might match the return type of a GCC
11641 builtin and then its argument prototype would still apply. */
11642#ifdef __cplusplus
11643extern "C"
11644#endif
11645char flock ();
11646int
11647main ()
11648{
11649return flock ();
11650 ;
11651 return 0;
11652}
11653_ACEOF
11654if ac_fn_c_try_link "$LINENO"; then :
11655 ac_cv_lib_bsd_flock=yes
11656else
11657 ac_cv_lib_bsd_flock=no
11658fi
11659rm -f core conftest.err conftest.$ac_objext \
11660 conftest$ac_exeext conftest.$ac_ext
11661LIBS=$ac_check_lib_save_LIBS
11662fi
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11664$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011666 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011667
11668
11669$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11670
11671
11672fi
11673
11674
11675fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011676done
11677
Antoine Pitroua3000072010-09-07 14:52:42 +000011678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11681$as_echo_n "checking for getpagesize... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011685#include <unistd.h>
11686
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687int
11688main ()
11689{
11690void* p = getpagesize
11691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011698
Matthias Kloseb159a552010-04-25 21:00:44 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011700$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11703$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011704
11705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011707
Victor Stinner984890f2011-11-24 13:53:38 +010011708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11709$as_echo_n "checking for broken unsetenv... " >&6; }
11710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11711/* end confdefs.h. */
11712
11713#include <stdlib.h>
11714
11715int
11716main ()
11717{
11718int res = unsetenv("DUMMY")
11719 ;
11720 return 0;
11721}
11722_ACEOF
11723if ac_fn_c_try_compile "$LINENO"; then :
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
11726else
11727
11728$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11729
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11731$as_echo "yes" >&6; }
11732
11733fi
11734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11735
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011736for ac_prog in true
11737do
11738 # Extract the first word of "$ac_prog", so it can be a program name with args.
11739set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011742if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011744else
11745 if test -n "$TRUE"; then
11746 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11747else
11748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11749for as_dir in $PATH
11750do
11751 IFS=$as_save_IFS
11752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 $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 +000011757 break 2
11758 fi
11759done
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011762
11763fi
11764fi
11765TRUE=$ac_cv_prog_TRUE
11766if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11768$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011772fi
11773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011775 test -n "$TRUE" && break
11776done
11777test -n "$TRUE" || TRUE="/bin/true"
11778
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11781$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784else
11785 ac_check_lib_save_LIBS=$LIBS
11786LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011788/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790/* Override any GCC internal prototype to avoid an error.
11791 Use char because int might match the return type of a GCC
11792 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793#ifdef __cplusplus
11794extern "C"
11795#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797int
11798main ()
11799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801 ;
11802 return 0;
11803}
11804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806 ac_cv_lib_c_inet_aton=yes
11807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011810rm -f core conftest.err conftest.$ac_objext \
11811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011812LIBS=$ac_check_lib_save_LIBS
11813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11815$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011816if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011817 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11820$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823else
11824 ac_check_lib_save_LIBS=$LIBS
11825LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011829/* Override any GCC internal prototype to avoid an error.
11830 Use char because int might match the return type of a GCC
11831 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832#ifdef __cplusplus
11833extern "C"
11834#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836int
11837main ()
11838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840 ;
11841 return 0;
11842}
11843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845 ac_cv_lib_resolv_inet_aton=yes
11846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849rm -f core conftest.err conftest.$ac_objext \
11850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011851LIBS=$ac_check_lib_save_LIBS
11852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11854$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011856 cat >>confdefs.h <<_ACEOF
11857#define HAVE_LIBRESOLV 1
11858_ACEOF
11859
11860 LIBS="-lresolv $LIBS"
11861
11862fi
11863
11864
11865fi
11866
11867
Christian Heimesd0764e22007-12-04 15:00:33 +000011868# On Tru64, chflags seems to be present, but calling it will
11869# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11871$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011872if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011874else
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011876 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011879/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011880
Christian Heimesd0764e22007-12-04 15:00:33 +000011881#include <sys/stat.h>
11882#include <unistd.h>
11883int main(int argc, char*argv[])
11884{
11885 if(chflags(argv[0], 0) != 0)
11886 return 1;
11887 return 0;
11888}
Ned Deily3eb67d52011-06-28 00:00:28 -070011889
Christian Heimesd0764e22007-12-04 15:00:33 +000011890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011898fi
11899
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11903$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011904if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011907 ac_cv_have_chflags="yes"
11908else
11909 ac_cv_have_chflags="no"
11910fi
11911
11912fi
11913if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011916
11917fi
11918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11920$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011921if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011925 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011928/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011929
Christian Heimesd0764e22007-12-04 15:00:33 +000011930#include <sys/stat.h>
11931#include <unistd.h>
11932int main(int argc, char*argv[])
11933{
11934 if(lchflags(argv[0], 0) != 0)
11935 return 1;
11936 return 0;
11937}
Ned Deily3eb67d52011-06-28 00:00:28 -070011938
Christian Heimesd0764e22007-12-04 15:00:33 +000011939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011941 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011947fi
11948
11949
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11952$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011953if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011955if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011956 ac_cv_have_lchflags="yes"
11957else
11958 ac_cv_have_lchflags="no"
11959fi
11960
11961fi
11962if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011965
11966fi
11967
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011968case $ac_sys_system/$ac_sys_release in
11969Darwin/*)
11970 _CUR_CFLAGS="${CFLAGS}"
11971 _CUR_LDFLAGS="${LDFLAGS}"
11972 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11973 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11974 ;;
11975esac
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11978$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011979if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981else
11982 ac_check_lib_save_LIBS=$LIBS
11983LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011985/* end confdefs.h. */
11986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987/* Override any GCC internal prototype to avoid an error.
11988 Use char because int might match the return type of a GCC
11989 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990#ifdef __cplusplus
11991extern "C"
11992#endif
11993char inflateCopy ();
11994int
11995main ()
11996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012003 ac_cv_lib_z_inflateCopy=yes
12004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012007rm -f core conftest.err conftest.$ac_objext \
12008 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012009LIBS=$ac_check_lib_save_LIBS
12010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12012$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012016
12017fi
12018
12019
12020case $ac_sys_system/$ac_sys_release in
12021Darwin/*)
12022 CFLAGS="${_CUR_CFLAGS}"
12023 LDFLAGS="${_CUR_LDFLAGS}"
12024 ;;
12025esac
12026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12028$as_echo_n "checking for hstrerror... " >&6; }
12029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012031
Martin v. Löwise9416172003-05-03 10:12:45 +000012032#include <netdb.h>
12033
Martin v. Löwise9416172003-05-03 10:12:45 +000012034int
12035main ()
12036{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012045
Matthias Kloseb159a552010-04-25 21:00:44 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
12052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012053rm -f core conftest.err conftest.$ac_objext \
12054 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12057$as_echo_n "checking for inet_aton... " >&6; }
12058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
Martin v. Löwis86d66262006-02-17 08:40:11 +000012061#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012062#include <sys/socket.h>
12063#include <netinet/in.h>
12064#include <arpa/inet.h>
12065
Martin v. Löwise9416172003-05-03 10:12:45 +000012066int
12067main ()
12068{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012077
Matthias Kloseb159a552010-04-25 21:00:44 +000012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12082$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012083
12084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012085rm -f core conftest.err conftest.$ac_objext \
12086 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12089$as_echo_n "checking for inet_pton... " >&6; }
12090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012092
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012093#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012094#include <sys/socket.h>
12095#include <netinet/in.h>
12096#include <arpa/inet.h>
12097
Martin v. Löwise9416172003-05-03 10:12:45 +000012098int
12099main ()
12100{
12101void* p = inet_pton
12102 ;
12103 return 0;
12104}
12105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012109
Matthias Kloseb159a552010-04-25 21:00:44 +000012110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012112else
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012115
12116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012118
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012119# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12121$as_echo_n "checking for setgroups... " >&6; }
12122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012123/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012124
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012125#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012126#ifdef HAVE_GRP_H
12127#include <grp.h>
12128#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130int
12131main ()
12132{
12133void* p = setgroups
12134 ;
12135 return 0;
12136}
12137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141
Matthias Kloseb159a552010-04-25 21:00:44 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012143$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12146$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012147
12148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012150
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012151# check for openpty and forkpty
12152
12153for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012154do :
12155 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012156if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012158#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012159_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12163$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012166else
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172/* Override any GCC internal prototype to avoid an error.
12173 Use char because int might match the return type of a GCC
12174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012175#ifdef __cplusplus
12176extern "C"
12177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012178char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012179int
12180main ()
12181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ;
12184 return 0;
12185}
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012192rm -f core conftest.err conftest.$ac_objext \
12193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012194LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12197$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12203$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012204if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206else
12207 ac_check_lib_save_LIBS=$LIBS
12208LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210/* end confdefs.h. */
12211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212/* Override any GCC internal prototype to avoid an error.
12213 Use char because int might match the return type of a GCC
12214 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215#ifdef __cplusplus
12216extern "C"
12217#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012218char openpty ();
12219int
12220main ()
12221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223 ;
12224 return 0;
12225}
12226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228 ac_cv_lib_bsd_openpty=yes
12229else
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232rm -f core conftest.err conftest.$ac_objext \
12233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234LIBS=$ac_check_lib_save_LIBS
12235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12237$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012238if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012240 LIBS="$LIBS -lbsd"
12241fi
12242
12243
12244fi
12245
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246
12247fi
12248done
12249
12250for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012251do :
12252 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012253if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012256_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257
Fred Drake8cef4cf2000-06-28 16:40:38 +000012258else
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12260$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263else
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012265LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269/* Override any GCC internal prototype to avoid an error.
12270 Use char because int might match the return type of a GCC
12271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012272#ifdef __cplusplus
12273extern "C"
12274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012275char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012276int
12277main ()
12278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 ;
12281 return 0;
12282}
12283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289rm -f core conftest.err conftest.$ac_objext \
12290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012291LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12294$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012295if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012298else
Matthias Kloseb9621712010-04-24 17:59:49 +000012299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12300$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012301if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303else
12304 ac_check_lib_save_LIBS=$LIBS
12305LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012307/* end confdefs.h. */
12308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309/* Override any GCC internal prototype to avoid an error.
12310 Use char because int might match the return type of a GCC
12311 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312#ifdef __cplusplus
12313extern "C"
12314#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012315char forkpty ();
12316int
12317main ()
12318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012319return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012325 ac_cv_lib_bsd_forkpty=yes
12326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329rm -f core conftest.err conftest.$ac_objext \
12330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012331LIBS=$ac_check_lib_save_LIBS
12332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12334$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012335if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012337 LIBS="$LIBS -lbsd"
12338fi
12339
12340
12341fi
12342
Fred Drake8cef4cf2000-06-28 16:40:38 +000012343
12344fi
12345done
12346
Jack Jansendd19cf82001-12-06 22:36:17 +000012347
Michael W. Hudson54241132001-12-07 15:38:26 +000012348# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012349for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012350do :
12351 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12352ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012353if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012356_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012358fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012359done
12360
Michael W. Hudson54241132001-12-07 15:38:26 +000012361
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012362ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012363if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012364 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012365
Martin v. Löwis1142de32002-03-29 16:28:31 +000012366else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012368 *" dup2.$ac_objext "* ) ;;
12369 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012371esac
12372
Martin v. Löwis1142de32002-03-29 16:28:31 +000012373fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012375ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012376if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012377 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12378
12379else
12380 case " $LIBOBJS " in
12381 *" strdup.$ac_objext "* ) ;;
12382 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12383 ;;
12384esac
12385
12386fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012387
12388
12389for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012390do :
12391 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012392if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012399int
12400main ()
12401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012410
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012413
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012415done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416
Jack Jansen150753c2003-03-29 22:07:47 +000012417for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012418do :
12419 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012420if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012426#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012427int
12428main ()
12429{
12430setpgrp(0,0);
12431 ;
12432 return 0;
12433}
12434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012438
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012441
12442fi
12443done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012444
Thomas Wouters3a584202000-08-05 23:28:51 +000012445for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012446do :
12447 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012448if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012449 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012454#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012455int
12456main ()
12457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ;
12460 return 0;
12461}
12462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463if ac_fn_c_try_compile "$LINENO"; then :
12464
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465else
Skip Montanaro6dead952003-09-25 14:50:04 +000012466
Matthias Kloseb9621712010-04-24 17:59:49 +000012467$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Guido van Rossum627b2d71993-12-24 10:39:16 +000012470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012474done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475
Michael W. Hudson54241132001-12-07 15:38:26 +000012476
Victor Stinnere0be4232011-10-25 13:06:09 +020012477for ac_func in clock_gettime
12478do :
12479 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12480if test "x$ac_cv_func_clock_gettime" = xyes; then :
12481 cat >>confdefs.h <<_ACEOF
12482#define HAVE_CLOCK_GETTIME 1
12483_ACEOF
12484
12485else
12486
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12488$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12489if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12490 $as_echo_n "(cached) " >&6
12491else
12492 ac_check_lib_save_LIBS=$LIBS
12493LIBS="-lrt $LIBS"
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12495/* end confdefs.h. */
12496
12497/* Override any GCC internal prototype to avoid an error.
12498 Use char because int might match the return type of a GCC
12499 builtin and then its argument prototype would still apply. */
12500#ifdef __cplusplus
12501extern "C"
12502#endif
12503char clock_gettime ();
12504int
12505main ()
12506{
12507return clock_gettime ();
12508 ;
12509 return 0;
12510}
12511_ACEOF
12512if ac_fn_c_try_link "$LINENO"; then :
12513 ac_cv_lib_rt_clock_gettime=yes
12514else
12515 ac_cv_lib_rt_clock_gettime=no
12516fi
12517rm -f core conftest.err conftest.$ac_objext \
12518 conftest$ac_exeext conftest.$ac_ext
12519LIBS=$ac_check_lib_save_LIBS
12520fi
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12522$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12523if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12524
Victor Stinner7efb8332014-08-29 15:41:08 +020012525 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012526 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12527
12528
12529$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12530
12531
12532fi
12533
12534
12535fi
12536done
12537
12538
12539for ac_func in clock_getres
12540do :
12541 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12542if test "x$ac_cv_func_clock_getres" = xyes; then :
12543 cat >>confdefs.h <<_ACEOF
12544#define HAVE_CLOCK_GETRES 1
12545_ACEOF
12546
12547else
12548
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12550$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12551if ${ac_cv_lib_rt_clock_getres+:} false; then :
12552 $as_echo_n "(cached) " >&6
12553else
12554 ac_check_lib_save_LIBS=$LIBS
12555LIBS="-lrt $LIBS"
12556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557/* end confdefs.h. */
12558
12559/* Override any GCC internal prototype to avoid an error.
12560 Use char because int might match the return type of a GCC
12561 builtin and then its argument prototype would still apply. */
12562#ifdef __cplusplus
12563extern "C"
12564#endif
12565char clock_getres ();
12566int
12567main ()
12568{
12569return clock_getres ();
12570 ;
12571 return 0;
12572}
12573_ACEOF
12574if ac_fn_c_try_link "$LINENO"; then :
12575 ac_cv_lib_rt_clock_getres=yes
12576else
12577 ac_cv_lib_rt_clock_getres=no
12578fi
12579rm -f core conftest.err conftest.$ac_objext \
12580 conftest$ac_exeext conftest.$ac_ext
12581LIBS=$ac_check_lib_save_LIBS
12582fi
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12584$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12585if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12586
12587 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12588
12589
12590fi
12591
12592
12593fi
12594done
12595
12596
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012597for ac_func in clock_settime
12598do :
12599 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12600if test "x$ac_cv_func_clock_settime" = xyes; then :
12601 cat >>confdefs.h <<_ACEOF
12602#define HAVE_CLOCK_SETTIME 1
12603_ACEOF
12604
12605else
12606
12607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12608$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12609if ${ac_cv_lib_rt_clock_settime+:} false; then :
12610 $as_echo_n "(cached) " >&6
12611else
12612 ac_check_lib_save_LIBS=$LIBS
12613LIBS="-lrt $LIBS"
12614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12615/* end confdefs.h. */
12616
12617/* Override any GCC internal prototype to avoid an error.
12618 Use char because int might match the return type of a GCC
12619 builtin and then its argument prototype would still apply. */
12620#ifdef __cplusplus
12621extern "C"
12622#endif
12623char clock_settime ();
12624int
12625main ()
12626{
12627return clock_settime ();
12628 ;
12629 return 0;
12630}
12631_ACEOF
12632if ac_fn_c_try_link "$LINENO"; then :
12633 ac_cv_lib_rt_clock_settime=yes
12634else
12635 ac_cv_lib_rt_clock_settime=no
12636fi
12637rm -f core conftest.err conftest.$ac_objext \
12638 conftest$ac_exeext conftest.$ac_ext
12639LIBS=$ac_check_lib_save_LIBS
12640fi
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12642$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12643if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12644
12645 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12646
12647
12648fi
12649
12650
12651fi
12652done
12653
12654
Matthias Kloseb9621712010-04-24 17:59:49 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12656$as_echo_n "checking for major... " >&6; }
12657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012659
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012660#if defined(MAJOR_IN_MKDEV)
12661#include <sys/mkdev.h>
12662#elif defined(MAJOR_IN_SYSMACROS)
12663#include <sys/sysmacros.h>
12664#else
12665#include <sys/types.h>
12666#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012667
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012668int
12669main ()
12670{
12671
12672 makedev(major(0),minor(0));
12673
12674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012679
12680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12684$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012685
12686else
Skip Montanaro6dead952003-09-25 14:50:04 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012690
12691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012692rm -f core conftest.err conftest.$ac_objext \
12693 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012694
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012695# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012696# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12698$as_echo_n "checking for getaddrinfo... " >&6; }
12699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012701
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012702#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012703#include <sys/socket.h>
12704#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012705#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012706
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012710getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012716 have_getaddrinfo=yes
12717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012720rm -f core conftest.err conftest.$ac_objext \
12721 conftest$ac_exeext conftest.$ac_ext
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12723$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012724if test $have_getaddrinfo = yes
12725then
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12727$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012728 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012732
12733if test "${enable_ipv6+set}" = set; then
12734 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12735else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012736 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012737fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741
Stefan Krah19c21392012-11-22 23:47:32 +010012742#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012743#include <sys/types.h>
12744#include <netdb.h>
12745#include <string.h>
12746#include <sys/socket.h>
12747#include <netinet/in.h>
12748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012749int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750{
12751 int passive, gaierr, inet4 = 0, inet6 = 0;
12752 struct addrinfo hints, *ai, *aitop;
12753 char straddr[INET6_ADDRSTRLEN], strport[16];
12754
12755 for (passive = 0; passive <= 1; passive++) {
12756 memset(&hints, 0, sizeof(hints));
12757 hints.ai_family = AF_UNSPEC;
12758 hints.ai_flags = passive ? AI_PASSIVE : 0;
12759 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012760 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012761 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12762 (void)gai_strerror(gaierr);
12763 goto bad;
12764 }
12765 for (ai = aitop; ai; ai = ai->ai_next) {
12766 if (ai->ai_addr == NULL ||
12767 ai->ai_addrlen == 0 ||
12768 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12769 straddr, sizeof(straddr), strport, sizeof(strport),
12770 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12771 goto bad;
12772 }
12773 switch (ai->ai_family) {
12774 case AF_INET:
12775 if (strcmp(strport, "54321") != 0) {
12776 goto bad;
12777 }
12778 if (passive) {
12779 if (strcmp(straddr, "0.0.0.0") != 0) {
12780 goto bad;
12781 }
12782 } else {
12783 if (strcmp(straddr, "127.0.0.1") != 0) {
12784 goto bad;
12785 }
12786 }
12787 inet4++;
12788 break;
12789 case AF_INET6:
12790 if (strcmp(strport, "54321") != 0) {
12791 goto bad;
12792 }
12793 if (passive) {
12794 if (strcmp(straddr, "::") != 0) {
12795 goto bad;
12796 }
12797 } else {
12798 if (strcmp(straddr, "::1") != 0) {
12799 goto bad;
12800 }
12801 }
12802 inet6++;
12803 break;
12804 case AF_UNSPEC:
12805 goto bad;
12806 break;
12807 default:
12808 /* another family support? */
12809 break;
12810 }
12811 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012812 freeaddrinfo(aitop);
12813 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012814 }
12815
12816 if (!(inet4 == 0 || inet4 == 2))
12817 goto bad;
12818 if (!(inet6 == 0 || inet6 == 2))
12819 goto bad;
12820
12821 if (aitop)
12822 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012823 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012824
12825 bad:
12826 if (aitop)
12827 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012828 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829}
12830
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012833 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012841fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012842
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12846$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12847
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012848if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012849then
12850 if test $ipv6 = yes
12851 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012852 echo 'Fatal: You must get working getaddrinfo() function.'
12853 echo ' or you can specify "--disable-ipv6"'.
12854 exit 1
12855 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012856else
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Matthias Kloseb9621712010-04-24 17:59:49 +000012858$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012859
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012860fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012861
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012862for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012863do :
12864 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012865if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012868_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012870fi
12871done
12872
Michael W. Hudson54241132001-12-07 15:38:26 +000012873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12876$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012877if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882#include <sys/types.h>
12883#include <sys/time.h>
12884#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Martin v. Löwis11437992002-04-12 09:54:03 +000012886int
12887main ()
12888{
12889if ((struct tm *) 0)
12890return 0;
12891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12903$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012904if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907
12908fi
12909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12911$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012912if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012917#include <sys/types.h>
12918#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920int
12921main ()
12922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923struct tm tm;
12924 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ;
12927 return 0;
12928}
12929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931 ac_cv_struct_tm=time.h
12932else
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12938$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012939if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942
12943fi
12944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945ac_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 +000012946#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948"
Victor Stinnere0be4232011-10-25 13:06:09 +020012949if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
12951cat >>confdefs.h <<_ACEOF
12952#define HAVE_STRUCT_TM_TM_ZONE 1
12953_ACEOF
12954
12955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012957
Martin v. Löwis11437992002-04-12 09:54:03 +000012958if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961
12962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12964"
Victor Stinnere0be4232011-10-25 13:06:09 +020012965if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969fi
12970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012972#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973_ACEOF
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12976$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012981/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012982#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983#if !HAVE_DECL_TZNAME
12984extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987int
12988main ()
12989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 ;
12992 return 0;
12993}
12994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012995if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996 ac_cv_var_tzname=yes
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013000rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13004$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013005 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009 fi
13010fi
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012ac_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 +020013013if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_STRUCT_STAT_ST_RDEV 1
13017_ACEOF
13018
13019
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013020fi
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022ac_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 +020013023if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025cat >>confdefs.h <<_ACEOF
13026#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13027_ACEOF
13028
13029
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013030fi
13031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032ac_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 +020013033if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013034
13035cat >>confdefs.h <<_ACEOF
13036#define HAVE_STRUCT_STAT_ST_FLAGS 1
13037_ACEOF
13038
13039
13040fi
13041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042ac_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 +020013043if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013044
13045cat >>confdefs.h <<_ACEOF
13046#define HAVE_STRUCT_STAT_ST_GEN 1
13047_ACEOF
13048
13049
13050fi
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052ac_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 +020013053if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013054
13055cat >>confdefs.h <<_ACEOF
13056#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13057_ACEOF
13058
13059
13060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062ac_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 +020013063if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065cat >>confdefs.h <<_ACEOF
13066#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13067_ACEOF
13068
13069
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013070fi
13071
Stefan Krah267b6392016-04-26 01:09:18 +020013072ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13073 #include <sys/types.h>
13074 #include <pwd.h>
13075
13076"
13077if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13078
13079cat >>confdefs.h <<_ACEOF
13080#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13081_ACEOF
13082
13083
13084fi
13085ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13086 #include <sys/types.h>
13087 #include <pwd.h>
13088
13089"
13090if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13091
13092cat >>confdefs.h <<_ACEOF
13093#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13094_ACEOF
13095
13096
13097fi
13098
Zachary Ware6a6967e2016-10-01 00:47:27 -050013099# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13100ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13101"
13102if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13103
13104cat >>confdefs.h <<_ACEOF
13105#define HAVE_SIGINFO_T_SI_BAND 1
13106_ACEOF
13107
13108
13109fi
13110
Michael W. Hudson54241132001-12-07 15:38:26 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13113$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013114if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116else
Matthias Kloseb159a552010-04-25 21:00:44 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013119/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013120#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
13127}
13128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130 ac_cv_header_time_altzone=yes
13131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13139$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143
13144fi
13145
Guido van Rossumda88dad1995-01-26 00:46:29 +000013146was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13148$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013151
13152#include <sys/types.h>
13153#include <sys/select.h>
13154#include <sys/time.h>
13155
Martin v. Löwis11437992002-04-12 09:54:03 +000013156int
13157main ()
13158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013159;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 ;
13161 return 0;
13162}
13163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013165
13166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013168
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013169 was_it_defined=yes
13170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13174$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13177$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013178if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013182/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013183#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013184int
13185main ()
13186{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 ;
13189 return 0;
13190}
13191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193 ac_cv_struct_addrinfo=yes
13194else
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13198fi
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13201$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205
13206fi
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13209$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013214/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013215
13216# include <sys/types.h>
13217# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013218int
13219main ()
13220{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 ;
13223 return 0;
13224}
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227 ac_cv_struct_sockaddr_storage=yes
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232fi
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13235$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239
13240fi
13241
Christian Heimesdffa3942016-09-05 23:54:41 +020013242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13243$as_echo_n "checking for sockaddr_alg... " >&6; }
13244if ${ac_cv_struct_sockaddr_alg+:} false; then :
13245 $as_echo_n "(cached) " >&6
13246else
13247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h. */
13249
13250# include <sys/types.h>
13251# include <sys/socket.h>
13252# include <linux/if_alg.h>
13253int
13254main ()
13255{
13256struct sockaddr_alg s
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261if ac_fn_c_try_compile "$LINENO"; then :
13262 ac_cv_struct_sockaddr_alg=yes
13263else
13264 ac_cv_struct_sockaddr_alg=no
13265fi
13266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13267fi
13268
13269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13270$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13271if test $ac_cv_struct_sockaddr_alg = yes; then
13272
13273$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13274
13275fi
13276
Guido van Rossum627b2d71993-12-24 10:39:16 +000013277# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13280$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013287int
13288main ()
13289{
13290static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013291test_array [0] = 0;
13292return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
13294 ;
13295 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013296}
Martin v. Löwis11437992002-04-12 09:54:03 +000013297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013299 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13306$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309
13310fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13313$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013314if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013318/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319
Martin v. Löwis11437992002-04-12 09:54:03 +000013320int
13321main ()
13322{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013323
Martin v. Löwis11437992002-04-12 09:54:03 +000013324#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013325 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013327 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329 char const *const *pcpcc;
13330 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 /* NEC SVR4.0.2 mips cc rejects this. */
13332 struct point {int x, y;};
13333 static struct point const zero = {0,0};
13334 /* AIX XL C 1.02.0.0 rejects this.
13335 It does not let you subtract one const X* pointer from another in
13336 an arm of an if-expression whose if-part is not a constant
13337 expression */
13338 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341 ++pcpcc;
13342 ppc = (char**) pcpcc;
13343 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013344 { /* SCO 3.2v4 cc rejects this sort of thing. */
13345 char tx;
13346 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013347 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 }
13352 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13353 int x[] = {25, 17};
13354 const int *foo = &x[0];
13355 ++foo;
13356 }
13357 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13358 typedef const int *iptr;
13359 iptr p = 0;
13360 ++p;
13361 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013362 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013363 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013364 struct s { int j; const int *ap[3]; } bx;
13365 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 }
13367 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13368 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013369 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013372#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013376}
Martin v. Löwis11437992002-04-12 09:54:03 +000013377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379 ac_cv_c_const=yes
13380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13386$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
13391fi
13392
Michael W. Hudson54241132001-12-07 15:38:26 +000013393
Guido van Rossumda88dad1995-01-26 00:46:29 +000013394works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13396$as_echo_n "checking for working signed char... " >&6; }
13397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400int
13401main ()
13402{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013409 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013410else
Skip Montanaro6dead952003-09-25 14:50:04 +000013411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013413
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013414
Guido van Rossum7f43da71994-08-01 12:15:30 +000013415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13418$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013419
Guido van Rossumda88dad1995-01-26 00:46:29 +000013420have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13422$as_echo_n "checking for prototypes... " >&6; }
13423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013425int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013426int
13427main ()
13428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Matthias Kloseb159a552010-04-25 21:00:44 +000013438 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13442$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443
Guido van Rossumda88dad1995-01-26 00:46:29 +000013444works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13446$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013448/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013449
13450#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013451int foo(int x, ...) {
13452 va_list va;
13453 va_start(va, x);
13454 va_arg(va, int);
13455 va_arg(va, char *);
13456 va_arg(va, double);
13457 return 0;
13458}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460int
13461main ()
13462{
Guido van Rossum90eea071996-08-30 20:58:57 +000013463return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013472
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013473 works=yes
13474
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13478$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479
Martin v. Löwisd6320502004-08-12 13:45:08 +000013480# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13482$as_echo_n "checking for socketpair... " >&6; }
13483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013484/* end confdefs.h. */
13485
13486#include <sys/types.h>
13487#include <sys/socket.h>
13488
13489int
13490main ()
13491{
13492void *x=socketpair
13493 ;
13494 return 0;
13495}
13496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013500
Matthias Kloseb159a552010-04-25 21:00:44 +000013501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013506
13507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013509
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013510# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13512$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013515#include <sys/types.h>
13516#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013517int
13518main ()
13519{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013520struct sockaddr x;
13521x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_compile "$LINENO"; then :
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13528$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013531
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013535
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013539# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013543if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13548$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013549 OLD_CFLAGS=$CFLAGS
13550 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013552/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013553
13554# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556int
13557main ()
13558{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013559
13560 char *name;
13561 struct hostent *he, *res;
13562 char buffer[2048];
13563 int buflen = 2048;
13564 int h_errnop;
13565
13566 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
13568 ;
13569 return 0;
13570}
13571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13580$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013582else
Skip Montanaro6dead952003-09-25 14:50:04 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13587$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013589/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013591# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593int
13594main ()
13595{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013596
13597 char *name;
13598 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013599 char buffer[2048];
13600 int buflen = 2048;
13601 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013602
Matthias Kloseb159a552010-04-25 21:00:44 +000013603 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
13605 ;
13606 return 0;
13607}
13608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Matthias Kloseb159a552010-04-25 21:00:44 +000013614$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13617$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619else
Skip Montanaro6dead952003-09-25 14:50:04 +000013620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13622$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13624$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626/* end confdefs.h. */
13627
13628# include <netdb.h>
13629
13630int
13631main ()
13632{
13633
13634 char *name;
13635 struct hostent *he;
13636 struct hostent_data data;
13637
13638 (void) gethostbyname_r(name, he, &data);
13639
13640 ;
13641 return 0;
13642}
13643_ACEOF
13644if ac_fn_c_try_compile "$LINENO"; then :
13645
13646 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13647
13648
13649$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13650
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13652$as_echo "yes" >&6; }
13653
13654else
13655
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013667 CFLAGS=$OLD_CFLAGS
13668
13669else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 for ac_func in gethostbyname
13672do :
13673 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013674if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013676#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013677_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013680done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013681
Michael W. Hudson54241132001-12-07 15:38:26 +000013682
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013683fi
13684
Michael W. Hudson54241132001-12-07 15:38:26 +000013685
13686
13687
13688
13689
13690
William Grzybowski23e65b22018-09-07 09:06:15 -030013691
Guido van Rossum627b2d71993-12-24 10:39:16 +000013692# checks for system services
13693# (none yet)
13694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013696ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13701$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013702if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704else
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013706LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710/* Override any GCC internal prototype to avoid an error.
13711 Use char because int might match the return type of a GCC
13712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013713#ifdef __cplusplus
13714extern "C"
13715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013716char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013717int
13718main ()
13719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ;
13722 return 0;
13723}
13724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013730rm -f core conftest.err conftest.$ac_objext \
13731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13735$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 cat >>confdefs.h <<_ACEOF
13738#define HAVE_LIBIEEE 1
13739_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013741 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742
Guido van Rossum627b2d71993-12-24 10:39:16 +000013743fi
13744
Michael W. Hudson54241132001-12-07 15:38:26 +000013745
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013746fi
13747
Michael W. Hudson54241132001-12-07 15:38:26 +000013748
Guido van Rossum7f43da71994-08-01 12:15:30 +000013749# check for --with-libm=...
13750
Guido van Rossum563e7081996-09-10 18:20:48 +000013751case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013752Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013753*) LIBM=-lm
13754esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13756$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013761if test "$withval" = no
13762then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13764$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013765elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013766then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13768$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013769else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013770fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013771else
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13773$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774fi
13775
Guido van Rossum7f43da71994-08-01 12:15:30 +000013776
13777# check for --with-libc=...
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13780$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013783if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013785if test "$withval" = no
13786then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13788$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013789elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013790then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13792$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013793else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013794fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013795else
Matthias Kloseb9621712010-04-24 17:59:49 +000013796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13797$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798fi
13799
Guido van Rossum7f43da71994-08-01 12:15:30 +000013800
Stefan Krah1919b7e2012-03-21 18:25:23 +010013801# **************************************
13802# * Check for gcc x64 inline assembler *
13803# **************************************
13804
13805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13806$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808/* end confdefs.h. */
13809
13810int
13811main ()
13812{
13813
13814 __asm__ __volatile__ ("movq %rcx, %rax");
13815
13816 ;
13817 return 0;
13818}
13819_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013820if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013821 have_gcc_asm_for_x64=yes
13822else
13823 have_gcc_asm_for_x64=no
13824fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013825rm -f core conftest.err conftest.$ac_objext \
13826 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13828$as_echo "$have_gcc_asm_for_x64" >&6; }
13829if test "$have_gcc_asm_for_x64" = yes
13830then
13831
13832$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13833
13834fi
13835
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836# **************************************************
13837# * Check for various properties of floating point *
13838# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13841$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013842if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844else
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847 ac_cv_little_endian_double=no
13848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850/* end confdefs.h. */
13851
13852#include <string.h>
13853int main() {
13854 double x = 9006104071832581.0;
13855 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13856 return 0;
13857 else
13858 return 1;
13859}
13860
13861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863 ac_cv_little_endian_double=yes
13864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
13870
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871fi
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13874$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875if test "$ac_cv_little_endian_double" = yes
13876then
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879
13880fi
13881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13883$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013884if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013886else
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889 ac_cv_big_endian_double=no
13890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892/* end confdefs.h. */
13893
13894#include <string.h>
13895int main() {
13896 double x = 9006104071832581.0;
13897 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13898 return 0;
13899 else
13900 return 1;
13901}
13902
13903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013904if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905 ac_cv_big_endian_double=yes
13906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911fi
13912
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913fi
13914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13916$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013917if test "$ac_cv_big_endian_double" = yes
13918then
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921
13922fi
13923
13924# Some ARM platforms use a mixed-endian representation for doubles.
13925# While Python doesn't currently have full support for these platforms
13926# (see e.g., issue 1762561), we can at least make sure that float <-> string
13927# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13929$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013930if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013932else
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935 ac_cv_mixed_endian_double=no
13936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938/* end confdefs.h. */
13939
13940#include <string.h>
13941int main() {
13942 double x = 9006104071832581.0;
13943 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13944 return 0;
13945 else
13946 return 1;
13947}
13948
13949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013950if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951 ac_cv_mixed_endian_double=yes
13952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957fi
13958
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959fi
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13962$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013963if test "$ac_cv_mixed_endian_double" = yes
13964then
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967
13968fi
13969
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013970# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013971# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013972# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013973# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013974# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013975# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013976
13977# This inline assembler syntax may also work for suncc and icc,
13978# so we try it on all platforms.
13979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13981$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013983/* end confdefs.h. */
13984
13985int
13986main ()
13987{
13988
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013989 unsigned short cw;
13990 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13991 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992
13993 ;
13994 return 0;
13995}
13996_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013997if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013998 have_gcc_asm_for_x87=yes
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014002rm -f core conftest.err conftest.$ac_objext \
14003 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14005$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014006if test "$have_gcc_asm_for_x87" = yes
14007then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14014$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016/* end confdefs.h. */
14017
14018int
14019main ()
14020{
14021
14022 unsigned int fpcr;
14023 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14024 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14025
14026 ;
14027 return 0;
14028}
14029_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014030if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014031 have_gcc_asm_for_mc68881=yes
14032else
14033 have_gcc_asm_for_mc68881=no
14034fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014035rm -f core conftest.err conftest.$ac_objext \
14036 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14038$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14039if test "$have_gcc_asm_for_mc68881" = yes
14040then
14041
14042$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14043
14044fi
14045
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014046# Detect whether system arithmetic is subject to x87-style double
14047# rounding issues. The result of this test has little meaning on non
14048# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14049# mode is round-to-nearest and double rounding issues are present, and
14050# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14052$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053# $BASECFLAGS may affect the result
14054ac_save_cc="$CC"
14055CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014056if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014057 ac_cv_x87_double_rounding=no
14058else
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014060/* end confdefs.h. */
14061
14062#include <stdlib.h>
14063#include <math.h>
14064int main() {
14065 volatile double x, y, z;
14066 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14067 x = 0.99999999999999989; /* 1-2**-53 */
14068 y = 1./x;
14069 if (y != 1.)
14070 exit(0);
14071 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14072 x = 1e16;
14073 y = 2.99999;
14074 z = x + y;
14075 if (z != 1e16+4.)
14076 exit(0);
14077 /* both tests show evidence of double rounding */
14078 exit(1);
14079}
14080
14081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014082if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014083 ac_cv_x87_double_rounding=no
14084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014089fi
14090
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14093$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014094if test "$ac_cv_x87_double_rounding" = yes
14095then
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014098
14099fi
14100
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101# ************************************
14102# * Check for mathematical functions *
14103# ************************************
14104
14105LIBS_SAVE=$LIBS
14106LIBS="$LIBS $LIBM"
14107
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014108for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14109do :
14110 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14111ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014112if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113 cat >>confdefs.h <<_ACEOF
14114#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14115_ACEOF
14116
14117fi
14118done
14119
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014120for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014121do :
14122 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14123ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014124if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125 cat >>confdefs.h <<_ACEOF
14126#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14127_ACEOF
14128
14129fi
14130done
14131
14132ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14133"
Victor Stinnere0be4232011-10-25 13:06:09 +020014134if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014135 ac_have_decl=1
14136else
14137 ac_have_decl=0
14138fi
14139
14140cat >>confdefs.h <<_ACEOF
14141#define HAVE_DECL_ISINF $ac_have_decl
14142_ACEOF
14143ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14144"
Victor Stinnere0be4232011-10-25 13:06:09 +020014145if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014146 ac_have_decl=1
14147else
14148 ac_have_decl=0
14149fi
14150
14151cat >>confdefs.h <<_ACEOF
14152#define HAVE_DECL_ISNAN $ac_have_decl
14153_ACEOF
14154ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14155"
Victor Stinnere0be4232011-10-25 13:06:09 +020014156if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014157 ac_have_decl=1
14158else
14159 ac_have_decl=0
14160fi
14161
14162cat >>confdefs.h <<_ACEOF
14163#define HAVE_DECL_ISFINITE $ac_have_decl
14164_ACEOF
14165
14166
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014167# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14168# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14170$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014171if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014173else
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014176 ac_cv_tanh_preserves_zero_sign=no
14177else
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014179/* end confdefs.h. */
14180
14181#include <math.h>
14182#include <stdlib.h>
14183int main() {
14184 /* return 0 if either negative zeros don't exist
14185 on this platform or if negative zeros exist
14186 and tanh(-0.) == -0. */
14187 if (atan2(0., -1.) == atan2(-0., -1.) ||
14188 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14189 else exit(1);
14190}
14191
14192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014193if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014194 ac_cv_tanh_preserves_zero_sign=yes
14195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014200fi
14201
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014202fi
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14205$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014206if test "$ac_cv_tanh_preserves_zero_sign" = yes
14207then
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014210
14211fi
14212
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014213if test "$ac_cv_func_log1p" = yes
14214then
14215 # On some versions of AIX, log1p(-0.) returns 0. instead of
14216 # -0. See issue #9920.
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14218$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014219 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014221else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014222
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014223 if test "$cross_compiling" = yes; then :
14224 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014225else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14227/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014228
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014229 #include <math.h>
14230 #include <stdlib.h>
14231 int main() {
14232 /* Fail if the signs of log1p(-0.) and -0. can be
14233 distinguished. */
14234 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14235 return 0;
14236 else
14237 return 1;
14238 }
14239
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014240_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014241if ac_fn_c_try_run "$LINENO"; then :
14242 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014243else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014244 ac_cv_log1p_drops_zero_sign=yes
14245fi
14246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014248fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014249
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014250fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014251
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14253$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14254fi
14255if test "$ac_cv_log1p_drops_zero_sign" = yes
14256then
14257
14258$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14259
14260fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014261
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014262LIBS=$LIBS_SAVE
14263
Mark Dickinsona614f042009-11-28 12:48:43 +000014264# For multiprocessing module, check that sem_open
14265# actually works. For FreeBSD versions <= 7.2,
14266# the kernel module that provides POSIX semaphores
14267# isn't loaded by default, so an attempt to call
14268# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14270$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014271if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014273else
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014275 ac_cv_posix_semaphores_enabled=yes
14276else
Matthias Kloseb9621712010-04-24 17:59:49 +000014277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014278/* end confdefs.h. */
14279
14280#include <unistd.h>
14281#include <fcntl.h>
14282#include <stdio.h>
14283#include <semaphore.h>
14284#include <sys/stat.h>
14285
14286int main(void) {
14287 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14288 if (a == SEM_FAILED) {
14289 perror("sem_open");
14290 return 1;
14291 }
14292 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014293 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014294 return 0;
14295}
14296
14297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014299 ac_cv_posix_semaphores_enabled=yes
14300else
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014305fi
14306
14307
Mark Dickinsona614f042009-11-28 12:48:43 +000014308fi
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14311$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014312if test $ac_cv_posix_semaphores_enabled = no
14313then
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014316
14317fi
14318
Mark Dickinson10683072009-04-18 21:18:19 +000014319# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14321$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014326 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014327else
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014329/* end confdefs.h. */
14330
14331#include <unistd.h>
14332#include <fcntl.h>
14333#include <stdio.h>
14334#include <semaphore.h>
14335#include <sys/stat.h>
14336
14337int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014338 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014339 int count;
14340 int res;
14341 if(a==SEM_FAILED){
14342 perror("sem_open");
14343 return 1;
14344
14345 }
14346 res = sem_getvalue(a, &count);
14347 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014348 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014349 return res==-1 ? 1 : 0;
14350}
14351
Mark Dickinson10683072009-04-18 21:18:19 +000014352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014354 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14359 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014360fi
14361
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014362
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363fi
14364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14366$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367if test $ac_cv_broken_sem_getvalue = yes
14368then
14369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014371
14372fi
14373
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014374ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14375"
14376if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14377 ac_have_decl=1
14378else
14379 ac_have_decl=0
14380fi
14381
14382cat >>confdefs.h <<_ACEOF
14383#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14384_ACEOF
14385ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14386"
14387if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14388 ac_have_decl=1
14389else
14390 ac_have_decl=0
14391fi
14392
14393cat >>confdefs.h <<_ACEOF
14394#define HAVE_DECL_RTLD_NOW $ac_have_decl
14395_ACEOF
14396ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14397"
14398if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14399 ac_have_decl=1
14400else
14401 ac_have_decl=0
14402fi
14403
14404cat >>confdefs.h <<_ACEOF
14405#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14406_ACEOF
14407ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14408"
14409if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14410 ac_have_decl=1
14411else
14412 ac_have_decl=0
14413fi
14414
14415cat >>confdefs.h <<_ACEOF
14416#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14417_ACEOF
14418ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14419"
14420if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14421 ac_have_decl=1
14422else
14423 ac_have_decl=0
14424fi
14425
14426cat >>confdefs.h <<_ACEOF
14427#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14428_ACEOF
14429ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14430"
14431if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14432 ac_have_decl=1
14433else
14434 ac_have_decl=0
14435fi
14436
14437cat >>confdefs.h <<_ACEOF
14438#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14439_ACEOF
14440ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14441"
14442if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14443 ac_have_decl=1
14444else
14445 ac_have_decl=0
14446fi
14447
14448cat >>confdefs.h <<_ACEOF
14449#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14450_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014451ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14452"
14453if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14454 ac_have_decl=1
14455else
14456 ac_have_decl=0
14457fi
14458
14459cat >>confdefs.h <<_ACEOF
14460#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14461_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014462
14463
Mark Dickinsonbd792642009-03-18 20:06:12 +000014464# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14466$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014467# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014468if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014469 enableval=$enable_big_digits; case $enable_big_digits in
14470yes)
14471 enable_big_digits=30 ;;
14472no)
14473 enable_big_digits=15 ;;
1447415|30)
14475 ;;
14476*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014477 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 +000014478esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14480$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014481
14482cat >>confdefs.h <<_ACEOF
14483#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14484_ACEOF
14485
14486
14487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14489$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014490fi
14491
14492
Guido van Rossumef2255b2000-03-10 22:30:29 +000014493# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014494ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014495if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014500 wchar_h="yes"
14501
Guido van Rossumef2255b2000-03-10 22:30:29 +000014502else
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504
14505fi
14506
Michael W. Hudson54241132001-12-07 15:38:26 +000014507
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014509# determine wchar_t size
14510if test "$wchar_h" = yes
14511then
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14514# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14515# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14517$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14522"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014523
Martin v. Löwis11437992002-04-12 09:54:03 +000014524else
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 if test "$ac_cv_type_wchar_t" = yes; then
14526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014528as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530 else
14531 ac_cv_sizeof_wchar_t=0
14532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014534
Martin v. Löwis11437992002-04-12 09:54:03 +000014535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14537$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538
14539
14540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014542#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014543_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014544
Michael W. Hudson54241132001-12-07 15:38:26 +000014545
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014546fi
14547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14549$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014550have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014552/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014553
14554#include <tcl.h>
14555#if TCL_UTF_MAX != 6
14556# error "NOT UCS4_TCL"
14557#endif
14558int
14559main ()
14560{
14561
14562 ;
14563 return 0;
14564}
14565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014567
14568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014570
14571 have_ucs4_tcl=yes
14572
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14576$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014577
Skip Montanaro6dead952003-09-25 14:50:04 +000014578# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014579if test "$wchar_h" = yes
14580then
14581 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14583$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014584 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014586else
14587
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014589 ac_cv_wchar_t_signed=yes
14590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014592/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014593
14594 #include <wchar.h>
14595 int main()
14596 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014597 /* Success: exit code 0 */
14598 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014599 }
14600
14601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014602if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014603 ac_cv_wchar_t_signed=yes
14604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014609fi
14610
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014611fi
14612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14614$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615fi
14616
Michael Osipov3738fad2018-08-24 18:17:19 +020014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14618$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014619# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014620if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014621 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014622then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014625
Michael Osipov3738fad2018-08-24 18:17:19 +020014626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14627$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014628else
Michael Osipov3738fad2018-08-24 18:17:19 +020014629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14630$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014631fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632
14633# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14635$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 ac_cv_c_bigendian=unknown
14640 # See if we're dealing with a universal compiler.
14641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14642/* end confdefs.h. */
14643#ifndef __APPLE_CC__
14644 not a universal capable compiler
14645 #endif
14646 typedef int dummy;
14647
Skip Montanaro6dead952003-09-25 14:50:04 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_compile "$LINENO"; then :
14650
14651 # Check for potential -arch flags. It is not universal unless
14652 # there are at least two -arch flags with different values.
14653 ac_arch=
14654 ac_prev=
14655 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14656 if test -n "$ac_prev"; then
14657 case $ac_word in
14658 i?86 | x86_64 | ppc | ppc64)
14659 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14660 ac_arch=$ac_word
14661 else
14662 ac_cv_c_bigendian=universal
14663 break
14664 fi
14665 ;;
14666 esac
14667 ac_prev=
14668 elif test "x$ac_word" = "x-arch"; then
14669 ac_prev=arch
14670 fi
14671 done
14672fi
14673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14674 if test $ac_cv_c_bigendian = unknown; then
14675 # See if sys/param.h defines the BYTE_ORDER macro.
14676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014677/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014678#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014680
Martin v. Löwis11437992002-04-12 09:54:03 +000014681int
14682main ()
14683{
Matthias Kloseb9621712010-04-24 17:59:49 +000014684#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14685 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14686 && LITTLE_ENDIAN)
14687 bogus endian macros
14688 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
14690 ;
14691 return 0;
14692}
14693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014695 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014697/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014698#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014700
Martin v. Löwis11437992002-04-12 09:54:03 +000014701int
14702main ()
14703{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 not big endian
14706 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014707
14708 ;
14709 return 0;
14710}
14711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014712if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713 ac_cv_c_bigendian=yes
14714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014718fi
14719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14720 fi
14721 if test $ac_cv_c_bigendian = unknown; then
14722 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014724/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014725#include <limits.h>
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727int
14728main ()
14729{
Matthias Kloseb9621712010-04-24 17:59:49 +000014730#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14731 bogus endian macros
14732 #endif
14733
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 ;
14735 return 0;
14736}
14737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014738if ac_fn_c_try_compile "$LINENO"; then :
14739 # It does; now see whether it defined to _BIG_ENDIAN or not.
14740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741/* end confdefs.h. */
14742#include <limits.h>
14743
14744int
14745main ()
14746{
14747#ifndef _BIG_ENDIAN
14748 not big endian
14749 #endif
14750
14751 ;
14752 return 0;
14753}
14754_ACEOF
14755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014757else
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14761fi
14762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14763 fi
14764 if test $ac_cv_c_bigendian = unknown; then
14765 # Compile a test program.
14766 if test "$cross_compiling" = yes; then :
14767 # Try to guess by grepping values from an object file.
14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14769/* end confdefs.h. */
14770short int ascii_mm[] =
14771 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14772 short int ascii_ii[] =
14773 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14774 int use_ascii (int i) {
14775 return ascii_mm[i] + ascii_ii[i];
14776 }
14777 short int ebcdic_ii[] =
14778 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14779 short int ebcdic_mm[] =
14780 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14781 int use_ebcdic (int i) {
14782 return ebcdic_mm[i] + ebcdic_ii[i];
14783 }
14784 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786int
14787main ()
14788{
14789return use_ascii (foo) == use_ebcdic (foo);
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794if ac_fn_c_try_compile "$LINENO"; then :
14795 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14796 ac_cv_c_bigendian=yes
14797 fi
14798 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14799 if test "$ac_cv_c_bigendian" = unknown; then
14800 ac_cv_c_bigendian=no
14801 else
14802 # finding both strings is unlikely to happen, but who knows?
14803 ac_cv_c_bigendian=unknown
14804 fi
14805 fi
14806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014808else
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014810/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014812int
14813main ()
14814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 /* Are we little or big endian? From Harbison&Steele. */
14817 union
14818 {
14819 long int l;
14820 char c[sizeof (long int)];
14821 } u;
14822 u.l = 1;
14823 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824
14825 ;
14826 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014827}
Martin v. Löwis11437992002-04-12 09:54:03 +000014828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014829if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014830 ac_cv_c_bigendian=no
14831else
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14841$as_echo "$ac_cv_c_bigendian" >&6; }
14842 case $ac_cv_c_bigendian in #(
14843 yes)
14844 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14845;; #(
14846 no)
14847 ;; #(
14848 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ;; #(
14853 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014854 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014855 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014857
Michael W. Hudson54241132001-12-07 15:38:26 +000014858
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014859# ABI version string for Python extension modules. This appears between the
14860# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14861# from the following attributes which affect the ABI of this Python build (in
14862# this order):
14863#
14864# * The Python implementation (always 'cpython-' for us)
14865# * The major and minor version numbers
14866# * --with-pydebug (adds a 'd')
14867# * --with-pymalloc (adds a 'm')
14868# * --with-wide-unicode (adds a 'u')
14869#
14870# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014871# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14872# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014873
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14875$as_echo_n "checking ABIFLAGS... " >&6; }
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14877$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14879$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014880SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14882$as_echo "$SOABI" >&6; }
14883
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014884
14885case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014886 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014887 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14888 *)
14889 EXT_SUFFIX=${SHLIB_SUFFIX};;
14890esac
14891
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14893$as_echo_n "checking LDVERSION... " >&6; }
14894LDVERSION='$(VERSION)$(ABIFLAGS)'
14895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14896$as_echo "$LDVERSION" >&6; }
14897
doko@python.org87421192013-01-26 11:39:31 +010014898
doko@ubuntu.com55532312016-06-14 08:55:19 +020014899if test x$PLATFORM_TRIPLET = x; then
14900 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14901else
14902 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14903fi
doko@python.org87421192013-01-26 11:39:31 +010014904
14905
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014906# Check whether right shifting a negative integer extends the sign bit
14907# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14909$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014910if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014912else
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014915 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014919
14920int main()
14921{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014922 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014923}
14924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014927 ac_cv_rshift_extends_sign=yes
14928else
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014933fi
14934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935fi
14936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14938$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014939if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014940then
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Matthias Kloseb9621712010-04-24 17:59:49 +000014942$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014943
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014944fi
14945
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014946# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14948$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014949if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014951else
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014955#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014956int
14957main ()
14958{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014959
14960 FILE *f = fopen("/dev/null", "r");
14961 flockfile(f);
14962 getc_unlocked(f);
14963 funlockfile(f);
14964
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ;
14966 return 0;
14967}
14968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014969if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014970 ac_cv_have_getc_unlocked=yes
14971else
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 ac_cv_have_getc_unlocked=no
14973fi
14974rm -f core conftest.err conftest.$ac_objext \
14975 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14979$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014980if test "$ac_cv_have_getc_unlocked" = yes
14981then
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014984
14985fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014986
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014987# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014988# save the value of LIBS so we don't actually link Python with readline
14989LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014990
Gregory P. Smith18820942008-09-07 06:24:49 +000014991# On some systems we need to link readline to a termcap compatible
14992# library. NOTE: Keep the precedence of listed libraries synchronised
14993# with setup.py.
14994py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14996$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014997for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014998 if test -z "$py_libtermcap"; then
14999 READLINE_LIBS="-lreadline"
15000 else
15001 READLINE_LIBS="-lreadline -l$py_libtermcap"
15002 fi
15003 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015005/* end confdefs.h. */
15006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007/* Override any GCC internal prototype to avoid an error.
15008 Use char because int might match the return type of a GCC
15009 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015010#ifdef __cplusplus
15011extern "C"
15012#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015013char readline ();
15014int
15015main ()
15016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015018 ;
15019 return 0;
15020}
15021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015022if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015023 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core conftest.err conftest.$ac_objext \
15026 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015027 if test $py_cv_lib_readline = yes; then
15028 break
15029 fi
15030done
15031# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15032#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015033if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15035$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015036else
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15038$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015041
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015042fi
15043
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015044# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015046/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015047#include <readline/readline.h>
15048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015050 have_readline=yes
15051else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015052 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015053
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015054fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015055rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015056if test $have_readline = yes
15057then
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015059/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015060#include <readline/readline.h>
15061
15062_ACEOF
15063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015065
Matthias Kloseb9621712010-04-24 17:59:49 +000015066$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015067
15068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015069rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015072/* end confdefs.h. */
15073#include <readline/readline.h>
15074
15075_ACEOF
15076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015078
Matthias Kloseb9621712010-04-24 17:59:49 +000015079$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015080
15081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015082rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015083
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015084fi
15085
Martin v. Löwis0daad592001-09-30 21:09:59 +000015086# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15088$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015089if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015091else
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015093LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097/* Override any GCC internal prototype to avoid an error.
15098 Use char because int might match the return type of a GCC
15099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015100#ifdef __cplusplus
15101extern "C"
15102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104int
15105main ()
15106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 ;
15109 return 0;
15110}
15111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015114else
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117rm -f core conftest.err conftest.$ac_objext \
15118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015119LIBS=$ac_check_lib_save_LIBS
15120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15122$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015123if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015126
Martin v. Löwis0daad592001-09-30 21:09:59 +000015127fi
15128
Michael W. Hudson54241132001-12-07 15:38:26 +000015129
Thomas Wouters89d996e2007-09-08 17:39:28 +000015130# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15132$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015133if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015135else
15136 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015137LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015139/* end confdefs.h. */
15140
15141/* Override any GCC internal prototype to avoid an error.
15142 Use char because int might match the return type of a GCC
15143 builtin and then its argument prototype would still apply. */
15144#ifdef __cplusplus
15145extern "C"
15146#endif
15147char rl_completion_display_matches_hook ();
15148int
15149main ()
15150{
15151return rl_completion_display_matches_hook ();
15152 ;
15153 return 0;
15154}
15155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015157 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015161rm -f core conftest.err conftest.$ac_objext \
15162 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015163LIBS=$ac_check_lib_save_LIBS
15164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15166$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015167if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015170
15171fi
15172
15173
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015174# also in 4.0, but not in editline
15175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15176$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15177if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15178 $as_echo_n "(cached) " >&6
15179else
15180 ac_check_lib_save_LIBS=$LIBS
15181LIBS="-lreadline $READLINE_LIBS $LIBS"
15182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15183/* end confdefs.h. */
15184
15185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
15188#ifdef __cplusplus
15189extern "C"
15190#endif
15191char rl_resize_terminal ();
15192int
15193main ()
15194{
15195return rl_resize_terminal ();
15196 ;
15197 return 0;
15198}
15199_ACEOF
15200if ac_fn_c_try_link "$LINENO"; then :
15201 ac_cv_lib_readline_rl_resize_terminal=yes
15202else
15203 ac_cv_lib_readline_rl_resize_terminal=no
15204fi
15205rm -f core conftest.err conftest.$ac_objext \
15206 conftest$ac_exeext conftest.$ac_ext
15207LIBS=$ac_check_lib_save_LIBS
15208fi
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15210$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15211if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15212
15213$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15214
15215fi
15216
15217
Martin v. Löwis0daad592001-09-30 21:09:59 +000015218# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15220$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015221if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015222 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015223else
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015225LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229/* Override any GCC internal prototype to avoid an error.
15230 Use char because int might match the return type of a GCC
15231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015232#ifdef __cplusplus
15233extern "C"
15234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015235char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015236int
15237main ()
15238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 ;
15241 return 0;
15242}
15243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015246else
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015249rm -f core conftest.err conftest.$ac_objext \
15250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015251LIBS=$ac_check_lib_save_LIBS
15252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15254$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015255if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015258
Guido van Rossum353ae582001-07-10 16:45:32 +000015259fi
15260
Jack Jansendd19cf82001-12-06 22:36:17 +000015261
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015262# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015264/* end confdefs.h. */
15265#include <readline/readline.h>
15266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015268 have_readline=yes
15269else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015270 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015271
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015272fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015273rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015274if test $have_readline = yes
15275then
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015277/* end confdefs.h. */
15278#include <readline/readline.h>
15279
15280_ACEOF
15281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015285
15286fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015287rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015288
15289fi
15290
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15292$as_echo_n "checking for append_history in -lreadline... " >&6; }
15293if ${ac_cv_lib_readline_append_history+:} false; then :
15294 $as_echo_n "(cached) " >&6
15295else
15296 ac_check_lib_save_LIBS=$LIBS
15297LIBS="-lreadline $READLINE_LIBS $LIBS"
15298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15299/* end confdefs.h. */
15300
15301/* Override any GCC internal prototype to avoid an error.
15302 Use char because int might match the return type of a GCC
15303 builtin and then its argument prototype would still apply. */
15304#ifdef __cplusplus
15305extern "C"
15306#endif
15307char append_history ();
15308int
15309main ()
15310{
15311return append_history ();
15312 ;
15313 return 0;
15314}
15315_ACEOF
15316if ac_fn_c_try_link "$LINENO"; then :
15317 ac_cv_lib_readline_append_history=yes
15318else
15319 ac_cv_lib_readline_append_history=no
15320fi
15321rm -f core conftest.err conftest.$ac_objext \
15322 conftest$ac_exeext conftest.$ac_ext
15323LIBS=$ac_check_lib_save_LIBS
15324fi
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15326$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15327if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15328
15329$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15330
15331fi
15332
15333
Martin v. Löwis82bca632006-02-10 20:49:30 +000015334# End of readline checks: restore LIBS
15335LIBS=$LIBS_no_readline
15336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15338$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015339if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015341else
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015344 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015345else
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015347/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015348
15349int main()
15350{
15351 int val1 = nice(1);
15352 if (val1 != -1 && val1 == nice(2))
15353 exit(0);
15354 exit(1);
15355}
15356
Martin v. Löwis11437992002-04-12 09:54:03 +000015357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015358if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015359 ac_cv_broken_nice=yes
15360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015365fi
15366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367fi
15368
Matthias Kloseb9621712010-04-24 17:59:49 +000015369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15370$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015371if test "$ac_cv_broken_nice" = yes
15372then
Martin v. Löwis11437992002-04-12 09:54:03 +000015373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015375
15376fi
15377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15379$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015380if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015384 ac_cv_broken_poll=no
15385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015387/* end confdefs.h. */
15388
15389#include <poll.h>
15390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015391int main()
15392{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015393 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015394 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015395
15396 close (42);
15397
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015398 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015399 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015400 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015401 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015402 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015403 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015404 return 1;
15405}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015406
15407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015408if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015409 ac_cv_broken_poll=yes
15410else
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015417fi
15418
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15420$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015421if test "$ac_cv_broken_poll" = yes
15422then
15423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015425
15426fi
15427
Brett Cannon43802422005-02-10 20:48:03 +000015428# 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 +000015429# (which is not required by ISO C or UNIX spec) and/or if we support
15430# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015431ac_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 +000015432#include <$ac_cv_struct_tm>
15433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434"
Victor Stinnere0be4232011-10-25 13:06:09 +020015435if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015436
15437cat >>confdefs.h <<_ACEOF
15438#define HAVE_STRUCT_TM_TM_ZONE 1
15439_ACEOF
15440
15441
15442fi
15443
15444if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15445
Matthias Kloseb9621712010-04-24 17:59:49 +000015446$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015447
15448else
Matthias Kloseb9621712010-04-24 17:59:49 +000015449 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15450"
Victor Stinnere0be4232011-10-25 13:06:09 +020015451if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455fi
15456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015458#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459_ACEOF
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15462$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015463if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465else
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015467/* end confdefs.h. */
15468#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469#if !HAVE_DECL_TZNAME
15470extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015471#endif
15472
15473int
15474main ()
15475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015477 ;
15478 return 0;
15479}
15480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015481if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015482 ac_cv_var_tzname=yes
15483else
Matthias Kloseb9621712010-04-24 17:59:49 +000015484 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015486rm -f core conftest.err conftest.$ac_objext \
15487 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15490$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015491 if test $ac_cv_var_tzname = yes; then
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015494
15495 fi
15496fi
15497
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015498
Martin v. Löwis1d459062005-03-14 21:23:33 +000015499# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15501$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015502if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504else
15505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507 ac_cv_working_tzset=no
15508else
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015510/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015511
15512#include <stdlib.h>
15513#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015514#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015515
15516#if HAVE_TZNAME
15517extern char *tzname[];
15518#endif
15519
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015520int main()
15521{
Brett Cannon18367812003-09-19 00:59:16 +000015522 /* Note that we need to ensure that not only does tzset(3)
15523 do 'something' with localtime, but it works as documented
15524 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015525 This includes making sure that tzname is set properly if
15526 tm->tm_zone does not exist since it is the alternative way
15527 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015528
15529 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015530 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015531 */
15532
Martin v. Löwis1d459062005-03-14 21:23:33 +000015533 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015534 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15535
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015536 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015537 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015538 if (localtime(&groundhogday)->tm_hour != 0)
15539 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015540#if HAVE_TZNAME
15541 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15542 if (strcmp(tzname[0], "UTC") ||
15543 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15544 exit(1);
15545#endif
Brett Cannon18367812003-09-19 00:59:16 +000015546
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015547 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015548 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015549 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015550 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015551#if HAVE_TZNAME
15552 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15553 exit(1);
15554#endif
Brett Cannon18367812003-09-19 00:59:16 +000015555
15556 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15557 tzset();
15558 if (localtime(&groundhogday)->tm_hour != 11)
15559 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015560#if HAVE_TZNAME
15561 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15562 exit(1);
15563#endif
15564
15565#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015566 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15567 exit(1);
15568 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15569 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015570#endif
Brett Cannon18367812003-09-19 00:59:16 +000015571
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015572 exit(0);
15573}
15574
15575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015576if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015577 ac_cv_working_tzset=yes
15578else
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015583fi
15584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585fi
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15588$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015589if test "$ac_cv_working_tzset" = yes
15590then
15591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015593
15594fi
15595
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015596# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15598$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015599if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015600 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015601else
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015603/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015604#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015605int
15606main ()
15607{
15608
15609struct stat st;
15610st.st_mtim.tv_nsec = 1;
15611
15612 ;
15613 return 0;
15614}
15615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015617 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015618else
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15622fi
15623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15625$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015626if test "$ac_cv_stat_tv_nsec" = yes
15627then
15628
Matthias Kloseb9621712010-04-24 17:59:49 +000015629$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015630
15631fi
15632
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015633# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15635$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015636if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015640/* end confdefs.h. */
15641#include <sys/stat.h>
15642int
15643main ()
15644{
15645
15646struct stat st;
15647st.st_mtimespec.tv_nsec = 1;
15648
15649 ;
15650 return 0;
15651}
15652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015654 ac_cv_stat_tv_nsec2=yes
15655else
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15659fi
15660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15662$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015663if test "$ac_cv_stat_tv_nsec2" = yes
15664then
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015667
15668fi
15669
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015670# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015671ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015672if test "$cross_compiling" = no; then
15673 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15674fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015675
15676for ac_header in curses.h ncurses.h
15677do :
15678 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15679ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15680if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15681 cat >>confdefs.h <<_ACEOF
15682#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15683_ACEOF
15684
15685fi
15686
15687done
15688
15689
15690# On Solaris, term.h requires curses.h
15691for ac_header in term.h
15692do :
15693 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15694#ifdef HAVE_CURSES_H
15695#include <curses.h>
15696#endif
15697
15698"
15699if test "x$ac_cv_header_term_h" = xyes; then :
15700 cat >>confdefs.h <<_ACEOF
15701#define HAVE_TERM_H 1
15702_ACEOF
15703
15704fi
15705
15706done
15707
15708
Jack Jansen666b1e72001-10-31 12:11:48 +000015709# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15711$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015712if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015716/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015717#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015718int
15719main ()
15720{
Jack Jansen666b1e72001-10-31 12:11:48 +000015721
15722 int rtn;
15723 rtn = mvwdelch(0,0,0);
15724
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 ;
15726 return 0;
15727}
15728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015729if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015730 ac_cv_mvwdelch_is_expression=yes
15731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15735fi
15736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15738$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015739
15740if test "$ac_cv_mvwdelch_is_expression" = yes
15741then
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015744
15745fi
15746
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015747# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15748# structs since version 5.7. If the macro is defined as zero before including
15749# [n]curses.h, ncurses will expose fields of the structs regardless of the
15750# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15752$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015753if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015758
15759 #define NCURSES_OPAQUE 0
15760 #include <curses.h>
15761
Martin v. Löwis11437992002-04-12 09:54:03 +000015762int
15763main ()
15764{
Jack Jansen666b1e72001-10-31 12:11:48 +000015765
15766 WINDOW *w;
15767 w->_flags = 0;
15768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ;
15770 return 0;
15771}
15772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015773if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015774 ac_cv_window_has_flags=yes
15775else
Matthias Kloseb9621712010-04-24 17:59:49 +000015776 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15779fi
15780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15782$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015783
Jack Jansen666b1e72001-10-31 12:11:48 +000015784
15785if test "$ac_cv_window_has_flags" = yes
15786then
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015789
15790fi
15791
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15793$as_echo_n "checking for is_pad... " >&6; }
15794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15795/* end confdefs.h. */
15796#include <curses.h>
15797int
15798main ()
15799{
15800
15801#ifndef is_pad
15802void *x=is_pad
15803#endif
15804
15805 ;
15806 return 0;
15807}
15808_ACEOF
15809if ac_fn_c_try_compile "$LINENO"; then :
15810
15811$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15812
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15814$as_echo "yes" >&6; }
15815else
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15817$as_echo "no" >&6; }
15818
15819fi
15820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15823$as_echo_n "checking for is_term_resized... " >&6; }
15824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015825/* end confdefs.h. */
15826#include <curses.h>
15827int
15828main ()
15829{
15830void *x=is_term_resized
15831 ;
15832 return 0;
15833}
15834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015838
Matthias Kloseb159a552010-04-25 21:00:44 +000015839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015840$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015841else
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015844
15845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15849$as_echo_n "checking for resize_term... " >&6; }
15850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015851/* end confdefs.h. */
15852#include <curses.h>
15853int
15854main ()
15855{
15856void *x=resize_term
15857 ;
15858 return 0;
15859}
15860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015861if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015862
Matthias Kloseb9621712010-04-24 17:59:49 +000015863$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015864
Matthias Kloseb159a552010-04-25 21:00:44 +000015865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015866$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15869$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015870
15871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15875$as_echo_n "checking for resizeterm... " >&6; }
15876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015877/* end confdefs.h. */
15878#include <curses.h>
15879int
15880main ()
15881{
15882void *x=resizeterm
15883 ;
15884 return 0;
15885}
15886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015887if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015890
Matthias Kloseb159a552010-04-25 21:00:44 +000015891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015893else
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15895$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015896
15897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015899
15900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15901$as_echo_n "checking for immedok... " >&6; }
15902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15903/* end confdefs.h. */
15904#include <curses.h>
15905int
15906main ()
15907{
15908
15909#ifndef immedok
15910void *x=immedok
15911#endif
15912
15913 ;
15914 return 0;
15915}
15916_ACEOF
15917if ac_fn_c_try_compile "$LINENO"; then :
15918
15919$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15920
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15922$as_echo "yes" >&6; }
15923else
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15925$as_echo "no" >&6; }
15926
15927fi
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15929
15930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15931$as_echo_n "checking for syncok... " >&6; }
15932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15933/* end confdefs.h. */
15934#include <curses.h>
15935int
15936main ()
15937{
15938
15939#ifndef syncok
15940void *x=syncok
15941#endif
15942
15943 ;
15944 return 0;
15945}
15946_ACEOF
15947if ac_fn_c_try_compile "$LINENO"; then :
15948
15949$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15950
15951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15952$as_echo "yes" >&6; }
15953else
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15955$as_echo "no" >&6; }
15956
15957fi
15958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15959
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15961$as_echo_n "checking for wchgat... " >&6; }
15962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15963/* end confdefs.h. */
15964#include <curses.h>
15965int
15966main ()
15967{
15968
15969#ifndef wchgat
15970void *x=wchgat
15971#endif
15972
15973 ;
15974 return 0;
15975}
15976_ACEOF
15977if ac_fn_c_try_compile "$LINENO"; then :
15978
15979$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15980
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15982$as_echo "yes" >&6; }
15983else
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15985$as_echo "no" >&6; }
15986
15987fi
15988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15989
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15991$as_echo_n "checking for filter... " >&6; }
15992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15993/* end confdefs.h. */
15994#include <curses.h>
15995int
15996main ()
15997{
15998
15999#ifndef filter
16000void *x=filter
16001#endif
16002
16003 ;
16004 return 0;
16005}
16006_ACEOF
16007if ac_fn_c_try_compile "$LINENO"; then :
16008
16009$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16010
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16012$as_echo "yes" >&6; }
16013else
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16015$as_echo "no" >&6; }
16016
16017fi
16018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16019
16020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16021$as_echo_n "checking for has_key... " >&6; }
16022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023/* end confdefs.h. */
16024#include <curses.h>
16025int
16026main ()
16027{
16028
16029#ifndef has_key
16030void *x=has_key
16031#endif
16032
16033 ;
16034 return 0;
16035}
16036_ACEOF
16037if ac_fn_c_try_compile "$LINENO"; then :
16038
16039$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16040
16041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16042$as_echo "yes" >&6; }
16043else
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16045$as_echo "no" >&6; }
16046
16047fi
16048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16049
16050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16051$as_echo_n "checking for typeahead... " >&6; }
16052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16053/* end confdefs.h. */
16054#include <curses.h>
16055int
16056main ()
16057{
16058
16059#ifndef typeahead
16060void *x=typeahead
16061#endif
16062
16063 ;
16064 return 0;
16065}
16066_ACEOF
16067if ac_fn_c_try_compile "$LINENO"; then :
16068
16069$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16070
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16072$as_echo "yes" >&6; }
16073else
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16075$as_echo "no" >&6; }
16076
16077fi
16078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16079
16080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16081$as_echo_n "checking for use_env... " >&6; }
16082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16083/* end confdefs.h. */
16084#include <curses.h>
16085int
16086main ()
16087{
16088
16089#ifndef use_env
16090void *x=use_env
16091#endif
16092
16093 ;
16094 return 0;
16095}
16096_ACEOF
16097if ac_fn_c_try_compile "$LINENO"; then :
16098
16099$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16100
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16102$as_echo "yes" >&6; }
16103else
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16105$as_echo "no" >&6; }
16106
16107fi
16108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016109# last curses configure check
16110CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16113$as_echo "$as_me: checking for device files" >&6;}
16114
16115if test "x$cross_compiling" = xyes; then
16116 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16118$as_echo_n "checking for /dev/ptmx... " >&6; }
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16120$as_echo "not set" >&6; }
16121 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16122 fi
16123 if test "${ac_cv_file__dev_ptc+set}" != set; then
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16125$as_echo_n "checking for /dev/ptc... " >&6; }
16126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16127$as_echo "not set" >&6; }
16128 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16129 fi
16130fi
16131
Matthias Kloseb9621712010-04-24 17:59:49 +000016132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16133$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016134if ${ac_cv_file__dev_ptmx+:} false; then :
16135 $as_echo_n "(cached) " >&6
16136else
16137 test "$cross_compiling" = yes &&
16138 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16139if test -r "/dev/ptmx"; then
16140 ac_cv_file__dev_ptmx=yes
16141else
16142 ac_cv_file__dev_ptmx=no
16143fi
16144fi
16145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16146$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16147if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016148
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016149fi
16150
16151if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016152
Matthias Kloseb9621712010-04-24 17:59:49 +000016153$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016154
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16157$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016158if ${ac_cv_file__dev_ptc+:} false; then :
16159 $as_echo_n "(cached) " >&6
16160else
16161 test "$cross_compiling" = yes &&
16162 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16163if test -r "/dev/ptc"; then
16164 ac_cv_file__dev_ptc=yes
16165else
16166 ac_cv_file__dev_ptc=no
16167fi
16168fi
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16170$as_echo "$ac_cv_file__dev_ptc" >&6; }
16171if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016172
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016173fi
16174
16175if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016176
Matthias Kloseb9621712010-04-24 17:59:49 +000016177$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016178
Neal Norwitz865400f2003-03-21 01:42:58 +000016179fi
16180
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016181if test $ac_sys_system = Darwin
16182then
16183 LIBS="$LIBS -framework CoreFoundation"
16184fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016185
Matthias Kloseb9621712010-04-24 17:59:49 +000016186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16187$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016188if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016190else
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016192 ac_cv_have_size_t_format="cross -- assuming yes"
16193
Thomas Wouters477c8d52006-05-27 19:21:47 +000016194else
Matthias Kloseb9621712010-04-24 17:59:49 +000016195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016196/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016197
Thomas Wouters477c8d52006-05-27 19:21:47 +000016198#include <stdio.h>
16199#include <stddef.h>
16200#include <string.h>
16201
Christian Heimes2c181612007-12-17 20:04:13 +000016202#ifdef HAVE_SYS_TYPES_H
16203#include <sys/types.h>
16204#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016205
16206#ifdef HAVE_SSIZE_T
16207typedef ssize_t Py_ssize_t;
16208#elif SIZEOF_VOID_P == SIZEOF_LONG
16209typedef long Py_ssize_t;
16210#else
16211typedef int Py_ssize_t;
16212#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016213
Christian Heimes2c181612007-12-17 20:04:13 +000016214int main()
16215{
16216 char buffer[256];
16217
Thomas Wouters477c8d52006-05-27 19:21:47 +000016218 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16219 return 1;
16220
Thomas Wouters89f507f2006-12-13 04:49:30 +000016221 if (strcmp(buffer, "123"))
16222 return 1;
16223
16224 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16225 return 1;
16226
16227 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016228 return 1;
16229
16230 return 0;
16231}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016232
Thomas Wouters477c8d52006-05-27 19:21:47 +000016233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016234if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016235 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016236else
Matthias Kloseb9621712010-04-24 17:59:49 +000016237 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16240 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016241fi
16242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16245$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016246if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016249
16250fi
16251
Matthias Kloseb9621712010-04-24 17:59:49 +000016252ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016253#ifdef HAVE_SYS_TYPES_H
16254#include <sys/types.h>
16255#endif
16256#ifdef HAVE_SYS_SOCKET_H
16257#include <sys/socket.h>
16258#endif
16259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260"
Victor Stinnere0be4232011-10-25 13:06:09 +020016261if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016262
Martin v. Löwis11437992002-04-12 09:54:03 +000016263else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016266
16267fi
16268
Michael W. Hudson54241132001-12-07 15:38:26 +000016269
Matthias Kloseb9621712010-04-24 17:59:49 +000016270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16271$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016272if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016274else
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016276 ac_cv_broken_mbstowcs=no
16277else
Matthias Kloseb9621712010-04-24 17:59:49 +000016278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016279/* end confdefs.h. */
16280
Stefan Krah19c21392012-11-22 23:47:32 +010016281#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016282#include<stdlib.h>
16283int main() {
16284 size_t len = -1;
16285 const char *str = "text";
16286 len = mbstowcs(NULL, str, 0);
16287 return (len != 4);
16288}
16289
16290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016291if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016292 ac_cv_broken_mbstowcs=no
16293else
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016298fi
16299
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016300fi
16301
Matthias Kloseb9621712010-04-24 17:59:49 +000016302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16303$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016304if test "$ac_cv_broken_mbstowcs" = yes
16305then
16306
Matthias Kloseb9621712010-04-24 17:59:49 +000016307$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016308
16309fi
16310
Antoine Pitroub52ec782009-01-25 16:34:23 +000016311# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16313$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016314
16315# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016316if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016317 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016318if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016319then
16320
Matthias Kloseb9621712010-04-24 17:59:49 +000016321$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016322
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16324$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016325fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016326if test "$withval" = no
16327then
16328
16329$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16330
Matthias Kloseb9621712010-04-24 17:59:49 +000016331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16332$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016333fi
16334
Antoine Pitrou042b1282010-08-13 21:15:58 +000016335else
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16337$as_echo "no value specified" >&6; }
16338fi
16339
Antoine Pitroub52ec782009-01-25 16:34:23 +000016340
Matthias Kloseb17289e2012-03-15 19:51:34 +010016341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16342$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16343if ${ac_cv_computed_gotos+:} false; then :
16344 $as_echo_n "(cached) " >&6
16345else
16346 if test "$cross_compiling" = yes; then :
16347 if test "${with_computed_gotos+set}" = set; then
16348 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16349 else
16350 ac_cv_computed_gotos=no
16351 fi
16352else
16353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16354/* end confdefs.h. */
16355
16356int main(int argc, char **argv)
16357{
16358 static void *targets[1] = { &&LABEL1 };
16359 goto LABEL2;
16360LABEL1:
16361 return 0;
16362LABEL2:
16363 goto *targets[0];
16364 return 1;
16365}
16366
16367_ACEOF
16368if ac_fn_c_try_run "$LINENO"; then :
16369 ac_cv_computed_gotos=yes
16370else
16371 ac_cv_computed_gotos=no
16372fi
16373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16374 conftest.$ac_objext conftest.beam conftest.$ac_ext
16375fi
16376
16377fi
16378
16379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16380$as_echo "$ac_cv_computed_gotos" >&6; }
16381case "$ac_cv_computed_gotos" in yes*)
16382
16383$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16384
16385esac
16386
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016387case $ac_sys_system in
16388AIX*)
16389
16390$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16391 ;;
16392esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016393
Michael W. Hudson54241132001-12-07 15:38:26 +000016394
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016395
16396
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016397for h in `(cd $srcdir;echo Python/thread_*.h)`
16398do
16399 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16400done
16401
Michael W. Hudson54241132001-12-07 15:38:26 +000016402
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016403SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16405$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016406for dir in $SRCDIRS; do
16407 if test ! -d $dir; then
16408 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016409 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016410done
Matthias Kloseb9621712010-04-24 17:59:49 +000016411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16412$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016413
Stefan Krah1919b7e2012-03-21 18:25:23 +010016414# Availability of -O2:
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16416$as_echo_n "checking for -O2... " >&6; }
16417saved_cflags="$CFLAGS"
16418CFLAGS="-O2"
16419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16420/* end confdefs.h. */
16421
16422int
16423main ()
16424{
16425
16426
16427 ;
16428 return 0;
16429}
16430_ACEOF
16431if ac_fn_c_try_compile "$LINENO"; then :
16432 have_O2=yes
16433else
16434 have_O2=no
16435fi
16436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16438$as_echo "$have_O2" >&6; }
16439CFLAGS="$saved_cflags"
16440
16441# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16442# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16444$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16445saved_cflags="$CFLAGS"
16446CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16447if test "$have_O2" = no; then
16448 CFLAGS=""
16449fi
16450if test "$cross_compiling" = yes; then :
16451 have_glibc_memmove_bug=undefined
16452else
16453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16454/* end confdefs.h. */
16455
16456#include <stdio.h>
16457#include <stdlib.h>
16458#include <string.h>
16459void foo(void *p, void *q) { memmove(p, q, 19); }
16460int main() {
16461 char a[32] = "123456789000000000";
16462 foo(&a[9], a);
16463 if (strcmp(a, "123456789123456789000000000") != 0)
16464 return 1;
16465 foo(a, &a[9]);
16466 if (strcmp(a, "123456789000000000") != 0)
16467 return 1;
16468 return 0;
16469}
16470
16471_ACEOF
16472if ac_fn_c_try_run "$LINENO"; then :
16473 have_glibc_memmove_bug=no
16474else
16475 have_glibc_memmove_bug=yes
16476fi
16477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16478 conftest.$ac_objext conftest.beam conftest.$ac_ext
16479fi
16480
16481CFLAGS="$saved_cflags"
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16483$as_echo "$have_glibc_memmove_bug" >&6; }
16484if test "$have_glibc_memmove_bug" = yes; then
16485
16486$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16487
16488fi
16489
16490if test "$have_gcc_asm_for_x87" = yes; then
16491 # Some versions of gcc miscompile inline asm:
16492 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16493 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16494 case $CC in
16495 *gcc*)
16496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16497$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16498 saved_cflags="$CFLAGS"
16499 CFLAGS="-O2"
16500 if test "$cross_compiling" = yes; then :
16501 have_ipa_pure_const_bug=undefined
16502else
16503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16504/* end confdefs.h. */
16505
16506 __attribute__((noinline)) int
16507 foo(int *p) {
16508 int r;
16509 asm ( "movl \$6, (%1)\n\t"
16510 "xorl %0, %0\n\t"
16511 : "=r" (r) : "r" (p) : "memory"
16512 );
16513 return r;
16514 }
16515 int main() {
16516 int p = 8;
16517 if ((foo(&p) ? : p) != 6)
16518 return 1;
16519 return 0;
16520 }
16521
16522_ACEOF
16523if ac_fn_c_try_run "$LINENO"; then :
16524 have_ipa_pure_const_bug=no
16525else
16526 have_ipa_pure_const_bug=yes
16527fi
16528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16529 conftest.$ac_objext conftest.beam conftest.$ac_ext
16530fi
16531
16532 CFLAGS="$saved_cflags"
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16534$as_echo "$have_ipa_pure_const_bug" >&6; }
16535 if test "$have_ipa_pure_const_bug" = yes; then
16536
16537$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16538
16539 fi
16540 ;;
16541 esac
16542fi
16543
Victor Stinner4f5366e2015-01-09 02:13:19 +010016544# Check for stdatomic.h
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16546$as_echo_n "checking for stdatomic.h... " >&6; }
16547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16548/* end confdefs.h. */
16549
16550
16551 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016552 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016553 int main() {
16554 int loaded_value = atomic_load(&value);
16555 return 0;
16556 }
16557
16558
16559_ACEOF
16560if ac_fn_c_try_link "$LINENO"; then :
16561 have_stdatomic_h=yes
16562else
16563 have_stdatomic_h=no
16564fi
16565rm -f core conftest.err conftest.$ac_objext \
16566 conftest$ac_exeext conftest.$ac_ext
16567
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16569$as_echo "$have_stdatomic_h" >&6; }
16570
16571if test "$have_stdatomic_h" = yes; then
16572
16573$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16574
16575fi
16576
16577# Check for GCC >= 4.7 __atomic builtins
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16579$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16581/* end confdefs.h. */
16582
16583
16584 volatile int val = 1;
16585 int main() {
16586 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16587 return 0;
16588 }
16589
16590
16591_ACEOF
16592if ac_fn_c_try_link "$LINENO"; then :
16593 have_builtin_atomic=yes
16594else
16595 have_builtin_atomic=no
16596fi
16597rm -f core conftest.err conftest.$ac_objext \
16598 conftest$ac_exeext conftest.$ac_ext
16599
16600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16601$as_echo "$have_builtin_atomic" >&6; }
16602
16603if test "$have_builtin_atomic" = yes; then
16604
16605$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16606
16607fi
16608
Ned Deily322f5ba2013-11-21 23:01:59 -080016609# ensurepip option
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16611$as_echo_n "checking for ensurepip... " >&6; }
16612
16613# Check whether --with-ensurepip was given.
16614if test "${with_ensurepip+set}" = set; then :
16615 withval=$with_ensurepip;
16616else
16617 with_ensurepip=upgrade
16618fi
16619
16620case $with_ensurepip in #(
16621 yes|upgrade) :
16622 ENSUREPIP=upgrade ;; #(
16623 install) :
16624 ENSUREPIP=install ;; #(
16625 no) :
16626 ENSUREPIP=no ;; #(
16627 *) :
16628 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16629esac
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16631$as_echo "$ENSUREPIP" >&6; }
16632
16633
Victor Stinner35a97c02015-03-08 02:59:09 +010016634# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16636$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638/* end confdefs.h. */
16639
16640
16641 #include <dirent.h>
16642
16643 int main() {
16644 struct dirent entry;
16645 return entry.d_type == DT_UNKNOWN;
16646 }
16647
16648
16649_ACEOF
16650if ac_fn_c_try_link "$LINENO"; then :
16651 have_dirent_d_type=yes
16652else
16653 have_dirent_d_type=no
16654fi
16655rm -f core conftest.err conftest.$ac_objext \
16656 conftest$ac_exeext conftest.$ac_ext
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16658$as_echo "$have_dirent_d_type" >&6; }
16659
16660if test "$have_dirent_d_type" = yes; then
16661
16662$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16663
16664fi
16665
Victor Stinner9eb57c52015-03-19 22:21:49 +010016666# check if the Linux getrandom() syscall is available
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16668$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16670/* end confdefs.h. */
16671
16672
Victor Stinner1b80b242016-04-12 22:34:58 +020016673 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016674 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016675 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016676
16677 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016678 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016679 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016680 const int flags = GRND_NONBLOCK;
16681 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016682 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016683 return 0;
16684 }
16685
16686
16687_ACEOF
16688if ac_fn_c_try_link "$LINENO"; then :
16689 have_getrandom_syscall=yes
16690else
16691 have_getrandom_syscall=no
16692fi
16693rm -f core conftest.err conftest.$ac_objext \
16694 conftest$ac_exeext conftest.$ac_ext
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16696$as_echo "$have_getrandom_syscall" >&6; }
16697
16698if test "$have_getrandom_syscall" = yes; then
16699
16700$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16701
16702fi
16703
Victor Stinner3abf44e2015-09-18 15:38:37 +020016704# check if the getrandom() function is available
16705# the test was written for the Solaris function of <sys/random.h>
16706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16707$as_echo_n "checking for the getrandom() function... " >&6; }
16708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16709/* end confdefs.h. */
16710
16711
16712 #include <sys/random.h>
16713
16714 int main() {
16715 char buffer[1];
16716 const size_t buflen = sizeof(buffer);
16717 const int flags = 0;
16718 /* ignore the result, Python checks for ENOSYS at runtime */
16719 (void)getrandom(buffer, buflen, flags);
16720 return 0;
16721 }
16722
16723
16724_ACEOF
16725if ac_fn_c_try_link "$LINENO"; then :
16726 have_getrandom=yes
16727else
16728 have_getrandom=no
16729fi
16730rm -f core conftest.err conftest.$ac_objext \
16731 conftest$ac_exeext conftest.$ac_ext
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16733$as_echo "$have_getrandom" >&6; }
16734
16735if test "$have_getrandom" = yes; then
16736
16737$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16738
16739fi
16740
Christian Heimesff5be6e2018-01-20 13:19:21 +010016741# Check for usable OpenSSL
16742
16743 found=false
16744
16745# Check whether --with-openssl was given.
16746if test "${with_openssl+set}" = set; then :
16747 withval=$with_openssl;
16748 case "$withval" in
16749 "" | y | ye | yes | n | no)
16750 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16751 ;;
16752 *) ssldirs="$withval"
16753 ;;
16754 esac
16755
16756else
16757
16758 # if pkg-config is installed and openssl has installed a .pc file,
16759 # then use that information and don't search ssldirs
16760 if test -n "$ac_tool_prefix"; then
16761 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16762set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16764$as_echo_n "checking for $ac_word... " >&6; }
16765if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16766 $as_echo_n "(cached) " >&6
16767else
16768 if test -n "$PKG_CONFIG"; then
16769 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16770else
16771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16772for as_dir in $PATH
16773do
16774 IFS=$as_save_IFS
16775 test -z "$as_dir" && as_dir=.
16776 for ac_exec_ext in '' $ac_executable_extensions; do
16777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16778 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16780 break 2
16781 fi
16782done
16783 done
16784IFS=$as_save_IFS
16785
16786fi
16787fi
16788PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16789if test -n "$PKG_CONFIG"; then
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16791$as_echo "$PKG_CONFIG" >&6; }
16792else
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16794$as_echo "no" >&6; }
16795fi
16796
16797
16798fi
16799if test -z "$ac_cv_prog_PKG_CONFIG"; then
16800 ac_ct_PKG_CONFIG=$PKG_CONFIG
16801 # Extract the first word of "pkg-config", so it can be a program name with args.
16802set dummy pkg-config; ac_word=$2
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16804$as_echo_n "checking for $ac_word... " >&6; }
16805if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16806 $as_echo_n "(cached) " >&6
16807else
16808 if test -n "$ac_ct_PKG_CONFIG"; then
16809 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16810else
16811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16812for as_dir in $PATH
16813do
16814 IFS=$as_save_IFS
16815 test -z "$as_dir" && as_dir=.
16816 for ac_exec_ext in '' $ac_executable_extensions; do
16817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16818 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16820 break 2
16821 fi
16822done
16823 done
16824IFS=$as_save_IFS
16825
16826fi
16827fi
16828ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16829if test -n "$ac_ct_PKG_CONFIG"; then
16830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16831$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16832else
16833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16834$as_echo "no" >&6; }
16835fi
16836
16837 if test "x$ac_ct_PKG_CONFIG" = x; then
16838 PKG_CONFIG=""
16839 else
16840 case $cross_compiling:$ac_tool_warned in
16841yes:)
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16844ac_tool_warned=yes ;;
16845esac
16846 PKG_CONFIG=$ac_ct_PKG_CONFIG
16847 fi
16848else
16849 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16850fi
16851
16852 if test x"$PKG_CONFIG" != x""; then
16853 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16854 if test $? = 0; then
16855 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16856 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16857 found=true
16858 fi
16859 fi
16860
16861 # no such luck; use some default ssldirs
16862 if ! $found; then
16863 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16864 fi
16865
16866
16867fi
16868
16869
16870
16871 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16872 # an 'openssl' subdirectory
16873
16874 if ! $found; then
16875 OPENSSL_INCLUDES=
16876 for ssldir in $ssldirs; do
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16878$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16879 if test -f "$ssldir/include/openssl/ssl.h"; then
16880 OPENSSL_INCLUDES="-I$ssldir/include"
16881 OPENSSL_LDFLAGS="-L$ssldir/lib"
16882 OPENSSL_LIBS="-lssl -lcrypto"
16883 found=true
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16885$as_echo "yes" >&6; }
16886 break
16887 else
16888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16889$as_echo "no" >&6; }
16890 fi
16891 done
16892
16893 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16894 # it will just work!
16895 fi
16896
16897 # try the preprocessor and linker with our new flags,
16898 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16899
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16901$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16902 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16903 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16904
16905 save_LIBS="$LIBS"
16906 save_LDFLAGS="$LDFLAGS"
16907 save_CPPFLAGS="$CPPFLAGS"
16908 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16909 LIBS="$OPENSSL_LIBS $LIBS"
16910 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16912/* end confdefs.h. */
16913#include <openssl/ssl.h>
16914int
16915main ()
16916{
16917SSL_new(NULL)
16918 ;
16919 return 0;
16920}
16921_ACEOF
16922if ac_fn_c_try_link "$LINENO"; then :
16923
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16925$as_echo "yes" >&6; }
16926 have_openssl=yes
16927
16928else
16929
16930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16931$as_echo "no" >&6; }
16932 have_openssl=no
16933
16934fi
16935rm -f core conftest.err conftest.$ac_objext \
16936 conftest$ac_exeext conftest.$ac_ext
16937 CPPFLAGS="$save_CPPFLAGS"
16938 LDFLAGS="$save_LDFLAGS"
16939 LIBS="$save_LIBS"
16940
16941
16942
16943
16944
16945
16946if test "$have_openssl" = yes; then
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16948$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16949
16950 save_LIBS="$LIBS"
16951 save_LDFLAGS="$LDFLAGS"
16952 save_CPPFLAGS="$CPPFLAGS"
16953 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16954 LIBS="$OPENSSL_LIBS $LIBS"
16955 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16956
16957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958/* end confdefs.h. */
16959
16960 #include <openssl/x509_vfy.h>
16961
16962int
16963main ()
16964{
16965
16966 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16967 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16968 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16969 X509_VERIFY_PARAM_set_hostflags(p, 0);
16970
16971 ;
16972 return 0;
16973}
16974
16975_ACEOF
16976if ac_fn_c_try_link "$LINENO"; then :
16977
16978 ac_cv_has_x509_verify_param_set1_host=yes
16979
16980else
16981
16982 ac_cv_has_x509_verify_param_set1_host=no
16983
16984fi
16985rm -f core conftest.err conftest.$ac_objext \
16986 conftest$ac_exeext conftest.$ac_ext
16987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16988$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16989 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16990
16991$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16992
16993 fi
16994
16995 CPPFLAGS="$save_CPPFLAGS"
16996 LDFLAGS="$save_LDFLAGS"
16997 LIBS="$save_LIBS"
16998fi
16999
Christian Heimes892d66e2018-01-29 14:10:18 +010017000# ssl module default cipher suite string
17001
17002
17003
17004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17005$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17006
17007# Check whether --with-ssl-default-suites was given.
17008if test "${with_ssl_default_suites+set}" = set; then :
17009 withval=$with_ssl_default_suites;
17010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17011$as_echo "$withval" >&6; }
17012case "$withval" in
17013 python)
17014 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17015
17016 ;;
17017 openssl)
17018 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17019
17020 ;;
17021 *)
17022 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17023
17024 cat >>confdefs.h <<_ACEOF
17025#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17026_ACEOF
17027
17028 ;;
17029esac
17030
17031else
17032
17033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17034$as_echo "python" >&6; }
17035$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17036
17037
17038fi
17039
17040
17041
Guido van Rossum627b2d71993-12-24 10:39:16 +000017042# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017043ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017044
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017045ac_config_files="$ac_config_files Modules/ld_so_aix"
17046
Martin v. Löwis11437992002-04-12 09:54:03 +000017047cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017048# This file is a shell script that caches the results of configure
17049# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017050# scripts and configure runs, see configure's option --config-cache.
17051# It is not useful on other systems. If it contains results you don't
17052# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017053#
Martin v. Löwis11437992002-04-12 09:54:03 +000017054# config.status only pays attention to the cache file if you give it
17055# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017056#
Skip Montanaro6dead952003-09-25 14:50:04 +000017057# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017058# loading this file, other *unset* `ac_cv_foo' will be assigned the
17059# following values.
17060
17061_ACEOF
17062
Guido van Rossumf78abae1997-01-21 22:02:36 +000017063# The following way of writing the cache mishandles newlines in values,
17064# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017066# Ultrix sh set writes to stderr and can't be redirected directly,
17067# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068(
17069 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17070 eval ac_val=\$$ac_var
17071 case $ac_val in #(
17072 *${as_nl}*)
17073 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17075$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076 esac
17077 case $ac_var in #(
17078 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017079 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17080 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 esac ;;
17082 esac
17083 done
17084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17087 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 # `set' does not quote correctly, so add quotes: double-quote
17089 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017090 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017091 "s/'/'\\\\''/g;
17092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 *)
17095 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098 esac |
17099 sort
17100) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17106 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17108 :end' >>confcache
17109if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17110 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017111 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017112 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17113$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017114 if test ! -f "$cache_file" || test -h "$cache_file"; then
17115 cat confcache >"$cache_file"
17116 else
17117 case $cache_file in #(
17118 */* | ?:*)
17119 mv -f confcache "$cache_file"$$ &&
17120 mv -f "$cache_file"$$ "$cache_file" ;; #(
17121 *)
17122 mv -f confcache "$cache_file" ;;
17123 esac
17124 fi
17125 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017126 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017127 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17128$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017129 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017130fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017131rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017133test "x$prefix" = xNONE && prefix=$ac_default_prefix
17134# Let make expand exec_prefix.
17135test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017136
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017137DEFS=-DHAVE_CONFIG_H
17138
Skip Montanaro6dead952003-09-25 14:50:04 +000017139ac_libobjs=
17140ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017141U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017142for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17143 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17147 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17149 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017150done
17151LIBOBJS=$ac_libobjs
17152
17153LTLIBOBJS=$ac_ltlibobjs
17154
17155
Martin v. Löwis11437992002-04-12 09:54:03 +000017156
Matthias Kloseb9621712010-04-24 17:59:49 +000017157
Victor Stinnere0be4232011-10-25 13:06:09 +020017158: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017159ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017160ac_clean_files_save=$ac_clean_files
17161ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017162{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17163$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17164as_write_fail=0
17165cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017166#! $SHELL
17167# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017168# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017169# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017170# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017171
Martin v. Löwis11437992002-04-12 09:54:03 +000017172debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017173ac_cs_recheck=false
17174ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017175
Matthias Kloseb9621712010-04-24 17:59:49 +000017176SHELL=\${CONFIG_SHELL-$SHELL}
17177export SHELL
17178_ASEOF
17179cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17180## -------------------- ##
17181## M4sh Initialization. ##
17182## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184# Be more Bourne compatible
17185DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017186if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 emulate sh
17188 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017189 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017190 # is contrary to our usage. Disable this feature.
17191 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017193else
Matthias Kloseb9621712010-04-24 17:59:49 +000017194 case `(set -o) 2>/dev/null` in #(
17195 *posix*) :
17196 set -o posix ;; #(
17197 *) :
17198 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017200fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017201
17202
Matthias Kloseb9621712010-04-24 17:59:49 +000017203as_nl='
17204'
17205export as_nl
17206# Printing a long string crashes Solaris 7 /usr/bin/printf.
17207as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17208as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17209as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17210# Prefer a ksh shell builtin over an external printf program on Solaris,
17211# but without wasting forks for bash or zsh.
17212if test -z "$BASH_VERSION$ZSH_VERSION" \
17213 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17214 as_echo='print -r --'
17215 as_echo_n='print -rn --'
17216elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17217 as_echo='printf %s\n'
17218 as_echo_n='printf %s'
17219else
17220 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17221 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17222 as_echo_n='/usr/ucb/echo -n'
17223 else
17224 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17225 as_echo_n_body='eval
17226 arg=$1;
17227 case $arg in #(
17228 *"$as_nl"*)
17229 expr "X$arg" : "X\\(.*\\)$as_nl";
17230 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17231 esac;
17232 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17233 '
17234 export as_echo_n_body
17235 as_echo_n='sh -c $as_echo_n_body as_echo'
17236 fi
17237 export as_echo_body
17238 as_echo='sh -c $as_echo_body as_echo'
17239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017240
17241# The user is always right.
17242if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017243 PATH_SEPARATOR=:
17244 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17245 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17246 PATH_SEPARATOR=';'
17247 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250
17251# IFS
17252# We need space, tab and new line, in precisely that order. Quoting is
17253# there to prevent editors from complaining about space-tab.
17254# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17255# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256IFS=" "" $as_nl"
17257
17258# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017259as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017260case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261 *[\\/]* ) as_myself=$0 ;;
17262 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017263for as_dir in $PATH
17264do
17265 IFS=$as_save_IFS
17266 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17268 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017269IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 ;;
17272esac
17273# We did not find ourselves, most probably we were run as `sh COMMAND'
17274# in which case we are not to be found in the path.
17275if test "x$as_myself" = x; then
17276 as_myself=$0
17277fi
17278if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017279 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17280 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281fi
17282
Matthias Kloseb9621712010-04-24 17:59:49 +000017283# Unset variables that we do not need and which cause bugs (e.g. in
17284# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17285# suppresses any "Segmentation fault" message there. '((' could
17286# trigger a bug in pdksh 5.2.14.
17287for as_var in BASH_ENV ENV MAIL MAILPATH
17288do eval test x\${$as_var+set} = xset \
17289 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290done
17291PS1='$ '
17292PS2='> '
17293PS4='+ '
17294
17295# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017296LC_ALL=C
17297export LC_ALL
17298LANGUAGE=C
17299export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300
Matthias Kloseb9621712010-04-24 17:59:49 +000017301# CDPATH.
17302(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17303
17304
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017305# as_fn_error STATUS ERROR [LINENO LOG_FD]
17306# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017307# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17308# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017309# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017310as_fn_error ()
17311{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017312 as_status=$1; test $as_status -eq 0 && as_status=1
17313 if test "$4"; then
17314 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17315 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017316 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017317 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017318 as_fn_exit $as_status
17319} # as_fn_error
17320
17321
17322# as_fn_set_status STATUS
17323# -----------------------
17324# Set $? to STATUS, without forking.
17325as_fn_set_status ()
17326{
17327 return $1
17328} # as_fn_set_status
17329
17330# as_fn_exit STATUS
17331# -----------------
17332# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17333as_fn_exit ()
17334{
17335 set +e
17336 as_fn_set_status $1
17337 exit $1
17338} # as_fn_exit
17339
17340# as_fn_unset VAR
17341# ---------------
17342# Portably unset VAR.
17343as_fn_unset ()
17344{
17345 { eval $1=; unset $1;}
17346}
17347as_unset=as_fn_unset
17348# as_fn_append VAR VALUE
17349# ----------------------
17350# Append the text in VALUE to the end of the definition contained in VAR. Take
17351# advantage of any shell optimizations that allow amortized linear growth over
17352# repeated appends, instead of the typical quadratic growth present in naive
17353# implementations.
17354if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17355 eval 'as_fn_append ()
17356 {
17357 eval $1+=\$2
17358 }'
17359else
17360 as_fn_append ()
17361 {
17362 eval $1=\$$1\$2
17363 }
17364fi # as_fn_append
17365
17366# as_fn_arith ARG...
17367# ------------------
17368# Perform arithmetic evaluation on the ARGs, and store the result in the
17369# global $as_val. Take advantage of shells that can avoid forks. The arguments
17370# must be portable across $(()) and expr.
17371if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17372 eval 'as_fn_arith ()
17373 {
17374 as_val=$(( $* ))
17375 }'
17376else
17377 as_fn_arith ()
17378 {
17379 as_val=`expr "$@" || test $? -eq 1`
17380 }
17381fi # as_fn_arith
17382
17383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384if expr a : '\(a\)' >/dev/null 2>&1 &&
17385 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17386 as_expr=expr
17387else
17388 as_expr=false
17389fi
17390
17391if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17392 as_basename=basename
17393else
17394 as_basename=false
17395fi
17396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17398 as_dirname=dirname
17399else
17400 as_dirname=false
17401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403as_me=`$as_basename -- "$0" ||
17404$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17405 X"$0" : 'X\(//\)$' \| \
17406 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017407$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 sed '/^.*\/\([^/][^/]*\)\/*$/{
17409 s//\1/
17410 q
17411 }
17412 /^X\/\(\/\/\)$/{
17413 s//\1/
17414 q
17415 }
17416 /^X\/\(\/\).*/{
17417 s//\1/
17418 q
17419 }
17420 s/.*/./; q'`
17421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422# Avoid depending upon Character Ranges.
17423as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17424as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17425as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17426as_cr_digits='0123456789'
17427as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428
17429ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017430case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 xy) ECHO_C='\c';;
17435 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17436 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 esac;;
17438*)
17439 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017441
Martin v. Löwis11437992002-04-12 09:54:03 +000017442rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443if test -d conf$$.dir; then
17444 rm -f conf$$.dir/conf$$.file
17445else
17446 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017449if (echo >conf$$.file) 2>/dev/null; then
17450 if ln -s conf$$.file conf$$ 2>/dev/null; then
17451 as_ln_s='ln -s'
17452 # ... but there are two gotchas:
17453 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17454 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017455 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017456 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017457 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 elif ln conf$$.file conf$$ 2>/dev/null; then
17459 as_ln_s=ln
17460 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017461 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017463else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017464 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17467rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017468
Matthias Kloseb9621712010-04-24 17:59:49 +000017469
17470# as_fn_mkdir_p
17471# -------------
17472# Create "$as_dir" as a directory, including parents if necessary.
17473as_fn_mkdir_p ()
17474{
17475
17476 case $as_dir in #(
17477 -*) as_dir=./$as_dir;;
17478 esac
17479 test -d "$as_dir" || eval $as_mkdir_p || {
17480 as_dirs=
17481 while :; do
17482 case $as_dir in #(
17483 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17484 *) as_qdir=$as_dir;;
17485 esac
17486 as_dirs="'$as_qdir' $as_dirs"
17487 as_dir=`$as_dirname -- "$as_dir" ||
17488$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17489 X"$as_dir" : 'X\(//\)[^/]' \| \
17490 X"$as_dir" : 'X\(//\)$' \| \
17491 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17492$as_echo X"$as_dir" |
17493 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17494 s//\1/
17495 q
17496 }
17497 /^X\(\/\/\)[^/].*/{
17498 s//\1/
17499 q
17500 }
17501 /^X\(\/\/\)$/{
17502 s//\1/
17503 q
17504 }
17505 /^X\(\/\).*/{
17506 s//\1/
17507 q
17508 }
17509 s/.*/./; q'`
17510 test -d "$as_dir" && break
17511 done
17512 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017513 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017514
17515
17516} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017517if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017519else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017521 as_mkdir_p=false
17522fi
17523
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017524
17525# as_fn_executable_p FILE
17526# -----------------------
17527# Test if FILE is an executable regular file.
17528as_fn_executable_p ()
17529{
17530 test -f "$1" && test -x "$1"
17531} # as_fn_executable_p
17532as_test_x='test -x'
17533as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017534
17535# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017536as_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 +000017537
17538# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017539as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017540
17541
Martin v. Löwis11437992002-04-12 09:54:03 +000017542exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017543## ----------------------------------- ##
17544## Main body of $CONFIG_STATUS script. ##
17545## ----------------------------------- ##
17546_ASEOF
17547test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017548
Matthias Kloseb9621712010-04-24 17:59:49 +000017549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17550# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017551# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552# values after options handling.
17553ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017554This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017555generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017556
17557 CONFIG_FILES = $CONFIG_FILES
17558 CONFIG_HEADERS = $CONFIG_HEADERS
17559 CONFIG_LINKS = $CONFIG_LINKS
17560 CONFIG_COMMANDS = $CONFIG_COMMANDS
17561 $ $0 $@
17562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563on `(hostname || uname -n) 2>/dev/null | sed 1q`
17564"
17565
Martin v. Löwis11437992002-04-12 09:54:03 +000017566_ACEOF
17567
Matthias Kloseb9621712010-04-24 17:59:49 +000017568case $ac_config_files in *"
17569"*) set x $ac_config_files; shift; ac_config_files=$*;;
17570esac
17571
17572case $ac_config_headers in *"
17573"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17574esac
17575
17576
17577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017578# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017579config_files="$ac_config_files"
17580config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017583
Matthias Kloseb9621712010-04-24 17:59:49 +000017584cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017585ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017586\`$as_me' instantiates files and other configuration actions
17587from templates according to the current configuration. Unless the files
17588and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017589
Matthias Kloseb9621712010-04-24 17:59:49 +000017590Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017591
17592 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017593 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017594 --config print configuration, then exit
17595 -q, --quiet, --silent
17596 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 -d, --debug don't remove temporary files
17598 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017599 --file=FILE[:TEMPLATE]
17600 instantiate the configuration file FILE
17601 --header=FILE[:TEMPLATE]
17602 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017603
17604Configuration files:
17605$config_files
17606
17607Configuration headers:
17608$config_headers
17609
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017610Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17614ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017615ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017616python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017617configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017620Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017621This config.status script is free software; the Free Software Foundation
17622gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623
17624ac_pwd='$ac_pwd'
17625srcdir='$srcdir'
17626INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017627MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017628test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017629_ACEOF
17630
Matthias Kloseb9621712010-04-24 17:59:49 +000017631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17632# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017633ac_need_defaults=:
17634while test $# != 0
17635do
17636 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17639 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017640 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017642 --*=)
17643 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17644 ac_optarg=
17645 ac_shift=:
17646 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017648 ac_option=$1
17649 ac_optarg=$2
17650 ac_shift=shift
17651 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 esac
17653
Skip Montanaro6dead952003-09-25 14:50:04 +000017654 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017656 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17657 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017659 $as_echo "$ac_cs_version"; exit ;;
17660 --config | --confi | --conf | --con | --co | --c )
17661 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 debug=: ;;
17664 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017665 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 case $ac_optarg in
17667 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017668 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017669 esac
17670 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017671 ac_need_defaults=false;;
17672 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017673 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017674 case $ac_optarg in
17675 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17676 esac
17677 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 --he | --h)
17680 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017681 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017682Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017684 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17686 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17687 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017688
17689 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017690 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017691Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017692
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017695
17696 esac
17697 shift
17698done
17699
Skip Montanaro6dead952003-09-25 14:50:04 +000017700ac_configure_extra_args=
17701
17702if $ac_cs_silent; then
17703 exec 6>/dev/null
17704 ac_configure_extra_args="$ac_configure_extra_args --silent"
17705fi
17706
17707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017709if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017710 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 shift
17712 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17713 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017716fi
17717
Martin v. Löwis11437992002-04-12 09:54:03 +000017718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720exec 5>>config.log
17721{
17722 echo
17723 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17724## Running $as_me. ##
17725_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017726 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734
17735# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017736for ac_config_target in $ac_config_targets
17737do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 case $ac_config_target in
17739 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17740 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17741 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017742 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17743 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017745 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017746 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017747 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748
Victor Stinnere0be4232011-10-25 13:06:09 +020017749 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 esac
17751done
17752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753
Martin v. Löwis11437992002-04-12 09:54:03 +000017754# If the user did not use the arguments to specify the items to instantiate,
17755# then the envvar interface is used. Set only those that are not.
17756# We use the long form for the default assignment because of an extremely
17757# bizarre bug on SunOS 4.1.3.
17758if $ac_need_defaults; then
17759 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17760 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17761fi
17762
Skip Montanaro6dead952003-09-25 14:50:04 +000017763# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017765# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766# Hook for its removal unless debugging.
17767# Note that there is a small window in which the directory will not be cleaned:
17768# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017769$debug ||
17770{
Victor Stinnere0be4232011-10-25 13:06:09 +020017771 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017773 : "${ac_tmp:=$tmp}"
17774 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017777}
Martin v. Löwis11437992002-04-12 09:54:03 +000017778# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017779
Martin v. Löwis11437992002-04-12 09:54:03 +000017780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017782 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017783} ||
17784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785 tmp=./conf$$-$RANDOM
17786 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017787} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017788ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017789
Matthias Kloseb9621712010-04-24 17:59:49 +000017790# Set up the scripts for CONFIG_FILES section.
17791# No need to generate them if there are no CONFIG_FILES.
17792# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
Matthias Kloseb9621712010-04-24 17:59:49 +000017795
17796ac_cr=`echo X | tr X '\015'`
17797# On cygwin, bash can eat \r inside `` if the user requested igncr.
17798# But we know of no other shell where ac_cr would be empty at this
17799# point, so we can use a bashism as a fallback.
17800if test "x$ac_cr" = x; then
17801 eval ac_cr=\$\'\\r\'
17802fi
17803ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17804if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017805 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017806else
17807 ac_cs_awk_cr=$ac_cr
17808fi
17809
Victor Stinnere0be4232011-10-25 13:06:09 +020017810echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017811_ACEOF
17812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813
Matthias Kloseb9621712010-04-24 17:59:49 +000017814{
17815 echo "cat >conf$$subs.awk <<_ACEOF" &&
17816 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17817 echo "_ACEOF"
17818} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017819 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17820ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821ac_delim='%!_!# '
17822for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017823 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017824 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825
Matthias Kloseb9621712010-04-24 17:59:49 +000017826 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17827 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828 break
17829 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017830 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 else
17832 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017833 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834done
Matthias Kloseb9621712010-04-24 17:59:49 +000017835rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836
Matthias Kloseb9621712010-04-24 17:59:49 +000017837cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017838cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017840sed -n '
17841h
17842s/^/S["/; s/!.*/"]=/
17843p
17844g
17845s/^[^!]*!//
17846:repl
17847t repl
17848s/'"$ac_delim"'$//
17849t delim
17850:nl
17851h
17852s/\(.\{148\}\)..*/\1/
17853t more1
17854s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17855p
17856n
17857b repl
17858:more1
17859s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17860p
17861g
17862s/.\{148\}//
17863t nl
17864:delim
17865h
17866s/\(.\{148\}\)..*/\1/
17867t more2
17868s/["\\]/\\&/g; s/^/"/; s/$/"/
17869p
17870b
17871:more2
17872s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17873p
17874g
17875s/.\{148\}//
17876t delim
17877' <conf$$subs.awk | sed '
17878/^[^""]/{
17879 N
17880 s/\n//
17881}
17882' >>$CONFIG_STATUS || ac_write_fail=1
17883rm -f conf$$subs.awk
17884cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17885_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017886cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017887 for (key in S) S_is_set[key] = 1
17888 FS = ""
17889
17890}
17891{
17892 line = $ 0
17893 nfields = split(line, field, "@")
17894 substed = 0
17895 len = length(field[1])
17896 for (i = 2; i < nfields; i++) {
17897 key = field[i]
17898 keylen = length(key)
17899 if (S_is_set[key]) {
17900 value = S[key]
17901 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17902 len += length(value) + length(field[++i])
17903 substed = 1
17904 } else
17905 len += 1 + keylen
17906 }
17907
17908 print line
17909}
17910
17911_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17914if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17915 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17916else
17917 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017918fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017919 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017920_ACEOF
17921
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017922# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17923# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924# trailing colons and then remove the whole line if VPATH becomes empty
17925# (actually we leave an empty line to preserve line numbers).
17926if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017927 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17928h
17929s///
17930s/^/:/
17931s/[ ]*$/:/
17932s/:\$(srcdir):/:/g
17933s/:\${srcdir}:/:/g
17934s/:@srcdir@:/:/g
17935s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017937x
17938s/\(=[ ]*\).*/\1/
17939G
17940s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941s/^[^=]*=[ ]*$//
17942}'
17943fi
17944
Matthias Kloseb9621712010-04-24 17:59:49 +000017945cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017946fi # test -n "$CONFIG_FILES"
17947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948# Set up the scripts for CONFIG_HEADERS section.
17949# No need to generate them if there are no CONFIG_HEADERS.
17950# This happens for instance with `./config.status Makefile'.
17951if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017952cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017953BEGIN {
17954_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955
Matthias Kloseb9621712010-04-24 17:59:49 +000017956# Transform confdefs.h into an awk script `defines.awk', embedded as
17957# here-document in config.status, that substitutes the proper values into
17958# config.h.in to produce config.h.
17959
17960# Create a delimiter string that does not exist in confdefs.h, to ease
17961# handling of long lines.
17962ac_delim='%!_!# '
17963for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017964 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17965 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017966 break
17967 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017968 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017969 else
17970 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17971 fi
17972done
17973
17974# For the awk script, D is an array of macro values keyed by name,
17975# likewise P contains macro parameters if any. Preserve backslash
17976# newline sequences.
17977
17978ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17979sed -n '
17980s/.\{148\}/&'"$ac_delim"'/g
17981t rset
17982:rset
17983s/^[ ]*#[ ]*define[ ][ ]*/ /
17984t def
17985d
17986:def
17987s/\\$//
17988t bsnl
17989s/["\\]/\\&/g
17990s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17991D["\1"]=" \3"/p
17992s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17993d
17994:bsnl
17995s/["\\]/\\&/g
17996s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17997D["\1"]=" \3\\\\\\n"\\/p
17998t cont
17999s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18000t cont
18001d
18002:cont
18003n
18004s/.\{148\}/&'"$ac_delim"'/g
18005t clear
18006:clear
18007s/\\$//
18008t bsnlc
18009s/["\\]/\\&/g; s/^/"/; s/$/"/p
18010d
18011:bsnlc
18012s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18013b cont
18014' <confdefs.h | sed '
18015s/'"$ac_delim"'/"\\\
18016"/g' >>$CONFIG_STATUS || ac_write_fail=1
18017
18018cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18019 for (key in D) D_is_set[key] = 1
18020 FS = ""
18021}
18022/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18023 line = \$ 0
18024 split(line, arg, " ")
18025 if (arg[1] == "#") {
18026 defundef = arg[2]
18027 mac1 = arg[3]
18028 } else {
18029 defundef = substr(arg[1], 2)
18030 mac1 = arg[2]
18031 }
18032 split(mac1, mac2, "(") #)
18033 macro = mac2[1]
18034 prefix = substr(line, 1, index(line, defundef) - 1)
18035 if (D_is_set[macro]) {
18036 # Preserve the white space surrounding the "#".
18037 print prefix "define", macro P[macro] D[macro]
18038 next
18039 } else {
18040 # Replace #undef with comments. This is necessary, for example,
18041 # in the case of _POSIX_SOURCE, which is predefined and required
18042 # on some systems where configure will not decide to define it.
18043 if (defundef == "undef") {
18044 print "/*", prefix defundef, macro, "*/"
18045 next
18046 }
18047 }
18048}
18049{ print }
18050_ACAWK
18051_ACEOF
18052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018053 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018054fi # test -n "$CONFIG_HEADERS"
18055
18056
18057eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18058shift
18059for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060do
18061 case $ac_tag in
18062 :[FHLC]) ac_mode=$ac_tag; continue;;
18063 esac
18064 case $ac_mode$ac_tag in
18065 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018066 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 :[FH]-) ac_tag=-:-;;
18068 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18069 esac
18070 ac_save_IFS=$IFS
18071 IFS=:
18072 set x $ac_tag
18073 IFS=$ac_save_IFS
18074 shift
18075 ac_file=$1
18076 shift
18077
18078 case $ac_mode in
18079 :L) ac_source=$1;;
18080 :[FH])
18081 ac_file_inputs=
18082 for ac_f
18083 do
18084 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018085 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 *) # Look for the file first in the build tree, then in the source tree
18087 # (if the path is not absolute). The absolute path cannot be DOS-style,
18088 # because $ac_f cannot contain `:'.
18089 test -f "$ac_f" ||
18090 case $ac_f in
18091 [\\/$]*) false;;
18092 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18093 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018094 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018096 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18097 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 done
18099
18100 # Let's still pretend it is `configure' which instantiates (i.e., don't
18101 # use $as_me), people would be surprised to read:
18102 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018103 configure_input='Generated from '`
18104 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18105 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 if test x"$ac_file" != x-; then
18107 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18109$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 # Neutralize special characters interpreted by sed in replacement strings.
18112 case $configure_input in #(
18113 *\&* | *\|* | *\\* )
18114 ac_sed_conf_input=`$as_echo "$configure_input" |
18115 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18116 *) ac_sed_conf_input=$configure_input;;
18117 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118
18119 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018120 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18121 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122 esac
18123 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 esac
18125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018127$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018128 X"$ac_file" : 'X\(//\)[^/]' \| \
18129 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018131$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18133 s//\1/
18134 q
18135 }
18136 /^X\(\/\/\)[^/].*/{
18137 s//\1/
18138 q
18139 }
18140 /^X\(\/\/\)$/{
18141 s//\1/
18142 q
18143 }
18144 /^X\(\/\).*/{
18145 s//\1/
18146 q
18147 }
18148 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018149 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 ac_builddir=.
18151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152case "$ac_dir" in
18153.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18154*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018155 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018157 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 case $ac_top_builddir_sub in
18159 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18160 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18161 esac ;;
18162esac
18163ac_abs_top_builddir=$ac_pwd
18164ac_abs_builddir=$ac_pwd$ac_dir_suffix
18165# for backward compatibility:
18166ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
18168case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018170 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 ac_top_srcdir=$ac_top_builddir_sub
18172 ac_abs_top_srcdir=$ac_pwd ;;
18173 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018174 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175 ac_top_srcdir=$srcdir
18176 ac_abs_top_srcdir=$srcdir ;;
18177 *) # Relative name.
18178 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18179 ac_top_srcdir=$ac_top_build_prefix$srcdir
18180 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018181esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185 case $ac_mode in
18186 :F)
18187 #
18188 # CONFIG_FILE
18189 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018190
18191 case $INSTALL in
18192 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018193 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018195 ac_MKDIR_P=$MKDIR_P
18196 case $MKDIR_P in
18197 [\\/$]* | ?:[\\/]* ) ;;
18198 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18199 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018200_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
Matthias Kloseb9621712010-04-24 17:59:49 +000018202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203# If the template does not know about datarootdir, expand it.
18204# FIXME: This hack should be removed a few years after 2.60.
18205ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018206ac_sed_dataroot='
18207/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208 p
18209 q
18210}
18211/@datadir@/p
18212/@docdir@/p
18213/@infodir@/p
18214/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018215/@mandir@/p'
18216case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217*datarootdir*) ac_datarootdir_seen=yes;;
18218*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018219 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18220$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 ac_datarootdir_hack='
18224 s&@datadir@&$datadir&g
18225 s&@docdir@&$docdir&g
18226 s&@infodir@&$infodir&g
18227 s&@localedir@&$localedir&g
18228 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018229 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230esac
18231_ACEOF
18232
18233# Neutralize VPATH when `$srcdir' = `.'.
18234# Shell code in configure.ac might set extrasub.
18235# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018236cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18237ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018238$extrasub
18239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018241:t
18242/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018243s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018245s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246s&@srcdir@&$ac_srcdir&;t t
18247s&@abs_srcdir@&$ac_abs_srcdir&;t t
18248s&@top_srcdir@&$ac_top_srcdir&;t t
18249s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18250s&@builddir@&$ac_builddir&;t t
18251s&@abs_builddir@&$ac_abs_builddir&;t t
18252s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18253s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018254s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018256"
Victor Stinnere0be4232011-10-25 13:06:09 +020018257eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18258 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018261 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18262 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18263 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018265which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018266$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018267which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018268
Victor Stinnere0be4232011-10-25 13:06:09 +020018269 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018270 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018271 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18272 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018273 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275 ;;
18276 :H)
18277 #
18278 # CONFIG_HEADER
18279 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 {
18282 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018283 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18284 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018285 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018286 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018287 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18288$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018290 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018291 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018292 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018293 fi
18294 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018295 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018296 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018297 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018298 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301
18302 esac
18303
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018304
18305 case $ac_file$ac_mode in
18306 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18307
18308 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309done # for ac_tag
18310
Guido van Rossum627b2d71993-12-24 10:39:16 +000018311
Matthias Kloseb9621712010-04-24 17:59:49 +000018312as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018313_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018314ac_clean_files=$ac_clean_files_save
18315
Matthias Kloseb9621712010-04-24 17:59:49 +000018316test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018317 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018318
Martin v. Löwis11437992002-04-12 09:54:03 +000018319
18320# configure is writing to config.log, and then calls config.status.
18321# config.status does its own redirection, appending to config.log.
18322# Unfortunately, on DOS this fails, as config.log is still kept open
18323# by configure, so config.status won't be able to write to it; its
18324# output is simply discarded. So we exec the FD to /dev/null,
18325# effectively closing config.log, so it can be properly (re)opened and
18326# appended to by config.status. When coming back to configure, we
18327# need to make the FD available again.
18328if test "$no_create" != yes; then
18329 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018330 ac_config_status_args=
18331 test "$silent" = yes &&
18332 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018333 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018334 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018335 exec 5>>config.log
18336 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18337 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018338 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018339fi
18340if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18342$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018343fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018344
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018345
Christian Heimes75ed8902013-11-20 01:11:18 +010018346echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018347if test ! -f Modules/Setup.local
18348then
18349 echo "# Edit this file for local setup changes" >Modules/Setup.local
18350fi
18351
Christian Heimes75ed8902013-11-20 01:11:18 +010018352echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018353$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018354 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018355 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018356mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018357
18358if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18359 echo "" >&6
18360 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018361 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 +000018362 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018363 echo "" >&6
18364 echo "" >&6
18365fi
18366