blob: c5ea5cbc75665c1b30ff5e5fa9e7b1b517c5c061 [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
Benjamin Peterson15c7b2a2018-07-15 17:01:42 -0700784runstatedir
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'
Benjamin Peterson15c7b2a2018-07-15 17:01:42 -0700894runstatedir='${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
Benjamin Peterson15c7b2a2018-07-15 17:01:42 -07001147 -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 \
Benjamin Peterson15c7b2a2018-07-15 17:01:42 -07001293 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]
Benjamin Peterson15c7b2a2018-07-15 17:01:42 -07001446 --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
Ned Deily554626a2017-03-20 23:41:52 -04002760 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2761 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITBRANCH="git -C \$(srcdir) 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 \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011257 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011258 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011259 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011260 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011261 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011262 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011263 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011264 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011265 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011266 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011267 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011268 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11269 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011270 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011271 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011272 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011273 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011274 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011275do :
11276 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11277ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011278if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011282
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011283fi
11284done
11285
Michael W. Hudson54241132001-12-07 15:38:26 +000011286
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011287ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11288 #include <dirent.h>
11289"
11290if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11291
11292$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11293
11294fi
11295
11296
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297# For some functions, having a definition is not sufficient, since
11298# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11300$as_echo_n "checking for chroot... " >&6; }
11301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304int
11305main ()
11306{
11307void *x=chroot
11308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318else
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321
11322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11325$as_echo_n "checking for link... " >&6; }
11326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329int
11330main ()
11331{
11332void *x=link
11333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340
Matthias Kloseb159a552010-04-25 21:00:44 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343else
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346
11347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11350$as_echo_n "checking for symlink... " >&6; }
11351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011354int
11355main ()
11356{
11357void *x=symlink
11358 ;
11359 return 0;
11360}
11361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365
Matthias Kloseb159a552010-04-25 21:00:44 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368else
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11370$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371
11372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11375$as_echo_n "checking for fchdir... " >&6; }
11376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011377/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011378#include <unistd.h>
11379int
11380main ()
11381{
11382void *x=fchdir
11383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390
Matthias Kloseb159a552010-04-25 21:00:44 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011392$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393else
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11395$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396
11397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11400$as_echo_n "checking for fsync... " >&6; }
11401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403#include <unistd.h>
11404int
11405main ()
11406{
11407void *x=fsync
11408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415
Matthias Kloseb159a552010-04-25 21:00:44 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011417$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421
11422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11425$as_echo_n "checking for fdatasync... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428#include <unistd.h>
11429int
11430main ()
11431{
11432void *x=fdatasync
11433 ;
11434 return 0;
11435}
11436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440
Matthias Kloseb159a552010-04-25 21:00:44 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011442$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443else
Matthias Kloseb9621712010-04-24 17:59:49 +000011444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011446
11447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11450$as_echo_n "checking for epoll... " >&6; }
11451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011452/* end confdefs.h. */
11453#include <sys/epoll.h>
11454int
11455main ()
11456{
11457void *x=epoll_create
11458 ;
11459 return 0;
11460}
11461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465
Matthias Kloseb159a552010-04-25 21:00:44 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011467$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468else
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471
11472fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11475$as_echo_n "checking for epoll_create1... " >&6; }
11476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478#include <sys/epoll.h>
11479int
11480main ()
11481{
11482void *x=epoll_create1
11483 ;
11484 return 0;
11485}
11486_ACEOF
11487if ac_fn_c_try_compile "$LINENO"; then :
11488
11489$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11490
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11492$as_echo "yes" >&6; }
11493else
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11495$as_echo "no" >&6; }
11496
11497fi
11498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11500$as_echo_n "checking for kqueue... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011502/* end confdefs.h. */
11503
11504#include <sys/types.h>
11505#include <sys/event.h>
11506
11507int
11508main ()
11509{
11510int x=kqueue()
11511 ;
11512 return 0;
11513}
11514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011516
Matthias Kloseb9621712010-04-24 17:59:49 +000011517$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011518
Matthias Kloseb159a552010-04-25 21:00:44 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011521else
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011524
11525fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11528$as_echo_n "checking for prlimit... " >&6; }
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11530/* end confdefs.h. */
11531
11532#include <sys/time.h>
11533#include <sys/resource.h>
11534
11535int
11536main ()
11537{
11538void *x=prlimit
11539 ;
11540 return 0;
11541}
11542_ACEOF
11543if ac_fn_c_try_compile "$LINENO"; then :
11544
11545$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11546
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11548$as_echo "yes" >&6; }
11549else
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
11552
11553fi
11554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11555
Martin v. Löwisd5843682002-11-21 20:41:28 +000011556# On some systems (eg. FreeBSD 5), we would find a definition of the
11557# functions ctermid_r, setgroups in the library, but no prototype
11558# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11559# address to avoid compiler warnings and potential miscompilations
11560# because of the missing prototypes.
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11563$as_echo_n "checking for ctermid_r... " >&6; }
11564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011565/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011566
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567#include <stdio.h>
11568
Martin v. Löwisd5843682002-11-21 20:41:28 +000011569int
11570main ()
11571{
11572void* p = ctermid_r
11573 ;
11574 return 0;
11575}
11576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011580
Matthias Kloseb159a552010-04-25 21:00:44 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011582$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11585$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011586
11587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11589
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11591$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011593 $as_echo_n "(cached) " >&6
11594else
11595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011597#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011598int
11599main ()
11600{
11601void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603 ;
11604 return 0;
11605}
11606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011607if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608 ac_cv_flock_decl=yes
11609else
11610 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011611
11612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011614
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011615fi
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11617$as_echo "$ac_cv_flock_decl" >&6; }
11618if test "x${ac_cv_flock_decl}" = xyes; then
11619 for ac_func in flock
11620do :
11621 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011623 cat >>confdefs.h <<_ACEOF
11624#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011625_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011626
Antoine Pitroua3000072010-09-07 14:52:42 +000011627else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011629$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011631 $as_echo_n "(cached) " >&6
11632else
11633 ac_check_lib_save_LIBS=$LIBS
11634LIBS="-lbsd $LIBS"
11635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11636/* end confdefs.h. */
11637
11638/* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
11641#ifdef __cplusplus
11642extern "C"
11643#endif
11644char flock ();
11645int
11646main ()
11647{
11648return flock ();
11649 ;
11650 return 0;
11651}
11652_ACEOF
11653if ac_fn_c_try_link "$LINENO"; then :
11654 ac_cv_lib_bsd_flock=yes
11655else
11656 ac_cv_lib_bsd_flock=no
11657fi
11658rm -f core conftest.err conftest.$ac_objext \
11659 conftest$ac_exeext conftest.$ac_ext
11660LIBS=$ac_check_lib_save_LIBS
11661fi
11662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11663$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011664if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011665 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011666
11667
11668$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11669
11670
11671fi
11672
11673
11674fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011675done
11676
Antoine Pitroua3000072010-09-07 14:52:42 +000011677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11680$as_echo_n "checking for getpagesize... " >&6; }
11681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011683
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684#include <unistd.h>
11685
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011686int
11687main ()
11688{
11689void* p = getpagesize
11690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011697
Matthias Kloseb159a552010-04-25 21:00:44 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11702$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011703
11704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011706
Victor Stinner984890f2011-11-24 13:53:38 +010011707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11708$as_echo_n "checking for broken unsetenv... " >&6; }
11709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11710/* end confdefs.h. */
11711
11712#include <stdlib.h>
11713
11714int
11715main ()
11716{
11717int res = unsetenv("DUMMY")
11718 ;
11719 return 0;
11720}
11721_ACEOF
11722if ac_fn_c_try_compile "$LINENO"; then :
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
11725else
11726
11727$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11728
11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11730$as_echo "yes" >&6; }
11731
11732fi
11733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11734
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011735for ac_prog in true
11736do
11737 # Extract the first word of "$ac_prog", so it can be a program name with args.
11738set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011741if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011743else
11744 if test -n "$TRUE"; then
11745 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11746else
11747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748for as_dir in $PATH
11749do
11750 IFS=$as_save_IFS
11751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011754 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 $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 +000011756 break 2
11757 fi
11758done
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011761
11762fi
11763fi
11764TRUE=$ac_cv_prog_TRUE
11765if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11767$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771fi
11772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011774 test -n "$TRUE" && break
11775done
11776test -n "$TRUE" || TRUE="/bin/true"
11777
11778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11780$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783else
11784 ac_check_lib_save_LIBS=$LIBS
11785LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789/* Override any GCC internal prototype to avoid an error.
11790 Use char because int might match the return type of a GCC
11791 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792#ifdef __cplusplus
11793extern "C"
11794#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796int
11797main ()
11798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800 ;
11801 return 0;
11802}
11803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805 ac_cv_lib_c_inet_aton=yes
11806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809rm -f core conftest.err conftest.$ac_objext \
11810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811LIBS=$ac_check_lib_save_LIBS
11812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11814$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011815if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011816 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11819$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011820if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011822else
11823 ac_check_lib_save_LIBS=$LIBS
11824LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828/* Override any GCC internal prototype to avoid an error.
11829 Use char because int might match the return type of a GCC
11830 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831#ifdef __cplusplus
11832extern "C"
11833#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835int
11836main ()
11837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839 ;
11840 return 0;
11841}
11842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844 ac_cv_lib_resolv_inet_aton=yes
11845else
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011848rm -f core conftest.err conftest.$ac_objext \
11849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011850LIBS=$ac_check_lib_save_LIBS
11851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11853$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011854if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011855 cat >>confdefs.h <<_ACEOF
11856#define HAVE_LIBRESOLV 1
11857_ACEOF
11858
11859 LIBS="-lresolv $LIBS"
11860
11861fi
11862
11863
11864fi
11865
11866
Christian Heimesd0764e22007-12-04 15:00:33 +000011867# On Tru64, chflags seems to be present, but calling it will
11868# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11870$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011875 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011878/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011879
Christian Heimesd0764e22007-12-04 15:00:33 +000011880#include <sys/stat.h>
11881#include <unistd.h>
11882int main(int argc, char*argv[])
11883{
11884 if(chflags(argv[0], 0) != 0)
11885 return 1;
11886 return 0;
11887}
Ned Deily3eb67d52011-06-28 00:00:28 -070011888
Christian Heimesd0764e22007-12-04 15:00:33 +000011889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011890if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011891 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011897fi
11898
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11902$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011903if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011905if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011906 ac_cv_have_chflags="yes"
11907else
11908 ac_cv_have_chflags="no"
11909fi
11910
11911fi
11912if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011915
11916fi
11917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11919$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011924 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011927/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011928
Christian Heimesd0764e22007-12-04 15:00:33 +000011929#include <sys/stat.h>
11930#include <unistd.h>
11931int main(int argc, char*argv[])
11932{
11933 if(lchflags(argv[0], 0) != 0)
11934 return 1;
11935 return 0;
11936}
Ned Deily3eb67d52011-06-28 00:00:28 -070011937
Christian Heimesd0764e22007-12-04 15:00:33 +000011938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011939if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011940 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011941else
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11945 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011946fi
11947
11948
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11951$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011952if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011954if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011955 ac_cv_have_lchflags="yes"
11956else
11957 ac_cv_have_lchflags="no"
11958fi
11959
11960fi
11961if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964
11965fi
11966
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011967case $ac_sys_system/$ac_sys_release in
11968Darwin/*)
11969 _CUR_CFLAGS="${CFLAGS}"
11970 _CUR_LDFLAGS="${LDFLAGS}"
11971 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11972 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11973 ;;
11974esac
11975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11977$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011978if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011980else
11981 ac_check_lib_save_LIBS=$LIBS
11982LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011984/* end confdefs.h. */
11985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986/* Override any GCC internal prototype to avoid an error.
11987 Use char because int might match the return type of a GCC
11988 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989#ifdef __cplusplus
11990extern "C"
11991#endif
11992char inflateCopy ();
11993int
11994main ()
11995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011997 ;
11998 return 0;
11999}
12000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002 ac_cv_lib_z_inflateCopy=yes
12003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012006rm -f core conftest.err conftest.$ac_objext \
12007 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012008LIBS=$ac_check_lib_save_LIBS
12009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12011$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012012if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012015
12016fi
12017
12018
12019case $ac_sys_system/$ac_sys_release in
12020Darwin/*)
12021 CFLAGS="${_CUR_CFLAGS}"
12022 LDFLAGS="${_CUR_LDFLAGS}"
12023 ;;
12024esac
12025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12027$as_echo_n "checking for hstrerror... " >&6; }
12028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012029/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012030
Martin v. Löwise9416172003-05-03 10:12:45 +000012031#include <netdb.h>
12032
Martin v. Löwise9416172003-05-03 10:12:45 +000012033int
12034main ()
12035{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012036void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012037 ;
12038 return 0;
12039}
12040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012044
Matthias Kloseb159a552010-04-25 21:00:44 +000012045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12049$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012050
12051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012052rm -f core conftest.err conftest.$ac_objext \
12053 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12056$as_echo_n "checking for inet_aton... " >&6; }
12057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
Martin v. Löwis86d66262006-02-17 08:40:11 +000012060#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012061#include <sys/socket.h>
12062#include <netinet/in.h>
12063#include <arpa/inet.h>
12064
Martin v. Löwise9416172003-05-03 10:12:45 +000012065int
12066main ()
12067{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012068void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012076
Matthias Kloseb159a552010-04-25 21:00:44 +000012077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012078$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12081$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
12083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012084rm -f core conftest.err conftest.$ac_objext \
12085 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12088$as_echo_n "checking for inet_pton... " >&6; }
12089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012091
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012092#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012093#include <sys/socket.h>
12094#include <netinet/in.h>
12095#include <arpa/inet.h>
12096
Martin v. Löwise9416172003-05-03 10:12:45 +000012097int
12098main ()
12099{
12100void* p = inet_pton
12101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012108
Matthias Kloseb159a552010-04-25 21:00:44 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012110$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012114
12115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012117
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012118# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12120$as_echo_n "checking for setgroups... " >&6; }
12121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012123
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012124#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012125#ifdef HAVE_GRP_H
12126#include <grp.h>
12127#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012128
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129int
12130main ()
12131{
12132void* p = setgroups
12133 ;
12134 return 0;
12135}
12136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012140
Matthias Kloseb159a552010-04-25 21:00:44 +000012141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012142$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12145$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
12147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012150# check for openpty and forkpty
12151
12152for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012153do :
12154 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012157#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012158_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012160else
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12162$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012163if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012165else
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171/* Override any GCC internal prototype to avoid an error.
12172 Use char because int might match the return type of a GCC
12173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012174#ifdef __cplusplus
12175extern "C"
12176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012177char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012178int
12179main ()
12180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ;
12183 return 0;
12184}
12185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012191rm -f core conftest.err conftest.$ac_objext \
12192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012193LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12196$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12202$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205else
12206 ac_check_lib_save_LIBS=$LIBS
12207LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012209/* end confdefs.h. */
12210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211/* Override any GCC internal prototype to avoid an error.
12212 Use char because int might match the return type of a GCC
12213 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012214#ifdef __cplusplus
12215extern "C"
12216#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217char openpty ();
12218int
12219main ()
12220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012222 ;
12223 return 0;
12224}
12225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227 ac_cv_lib_bsd_openpty=yes
12228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231rm -f core conftest.err conftest.$ac_objext \
12232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233LIBS=$ac_check_lib_save_LIBS
12234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12236$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239 LIBS="$LIBS -lbsd"
12240fi
12241
12242
12243fi
12244
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245
12246fi
12247done
12248
12249for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012250do :
12251 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012255_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12259$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262else
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268/* Override any GCC internal prototype to avoid an error.
12269 Use char because int might match the return type of a GCC
12270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012271#ifdef __cplusplus
12272extern "C"
12273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012274char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012288rm -f core conftest.err conftest.$ac_objext \
12289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012290LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12293$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12299$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012302else
12303 ac_check_lib_save_LIBS=$LIBS
12304LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306/* end confdefs.h. */
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308/* Override any GCC internal prototype to avoid an error.
12309 Use char because int might match the return type of a GCC
12310 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311#ifdef __cplusplus
12312extern "C"
12313#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314char forkpty ();
12315int
12316main ()
12317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324 ac_cv_lib_bsd_forkpty=yes
12325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012328rm -f core conftest.err conftest.$ac_objext \
12329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012330LIBS=$ac_check_lib_save_LIBS
12331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12333$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336 LIBS="$LIBS -lbsd"
12337fi
12338
12339
12340fi
12341
Fred Drake8cef4cf2000-06-28 16:40:38 +000012342
12343fi
12344done
12345
Jack Jansendd19cf82001-12-06 22:36:17 +000012346
Michael W. Hudson54241132001-12-07 15:38:26 +000012347# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012348for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012349do :
12350 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12351ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012352if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012354#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012355_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358done
12359
Michael W. Hudson54241132001-12-07 15:38:26 +000012360
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012361ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012362if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012363 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012364
Martin v. Löwis1142de32002-03-29 16:28:31 +000012365else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012367 *" dup2.$ac_objext "* ) ;;
12368 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012370esac
12371
Martin v. Löwis1142de32002-03-29 16:28:31 +000012372fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012373
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012374ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012375if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012376 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12377
12378else
12379 case " $LIBOBJS " in
12380 *" strdup.$ac_objext "* ) ;;
12381 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12382 ;;
12383esac
12384
12385fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012386
12387
12388for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012389do :
12390 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012409
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012412
Guido van Rossum627b2d71993-12-24 10:39:16 +000012413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012414done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012415
Jack Jansen150753c2003-03-29 22:07:47 +000012416for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012417do :
12418 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012425#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012426int
12427main ()
12428{
12429setpgrp(0,0);
12430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012437
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012440
12441fi
12442done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012443
Thomas Wouters3a584202000-08-05 23:28:51 +000012444for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012445do :
12446 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012447if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012452/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012453#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 ;
12459 return 0;
12460}
12461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012462if ac_fn_c_try_compile "$LINENO"; then :
12463
Guido van Rossum627b2d71993-12-24 10:39:16 +000012464else
Skip Montanaro6dead952003-09-25 14:50:04 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012473done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474
Michael W. Hudson54241132001-12-07 15:38:26 +000012475
Victor Stinnere0be4232011-10-25 13:06:09 +020012476for ac_func in clock_gettime
12477do :
12478 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12479if test "x$ac_cv_func_clock_gettime" = xyes; then :
12480 cat >>confdefs.h <<_ACEOF
12481#define HAVE_CLOCK_GETTIME 1
12482_ACEOF
12483
12484else
12485
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12487$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12488if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12489 $as_echo_n "(cached) " >&6
12490else
12491 ac_check_lib_save_LIBS=$LIBS
12492LIBS="-lrt $LIBS"
12493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12494/* end confdefs.h. */
12495
12496/* Override any GCC internal prototype to avoid an error.
12497 Use char because int might match the return type of a GCC
12498 builtin and then its argument prototype would still apply. */
12499#ifdef __cplusplus
12500extern "C"
12501#endif
12502char clock_gettime ();
12503int
12504main ()
12505{
12506return clock_gettime ();
12507 ;
12508 return 0;
12509}
12510_ACEOF
12511if ac_fn_c_try_link "$LINENO"; then :
12512 ac_cv_lib_rt_clock_gettime=yes
12513else
12514 ac_cv_lib_rt_clock_gettime=no
12515fi
12516rm -f core conftest.err conftest.$ac_objext \
12517 conftest$ac_exeext conftest.$ac_ext
12518LIBS=$ac_check_lib_save_LIBS
12519fi
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12521$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12522if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12523
Victor Stinner7efb8332014-08-29 15:41:08 +020012524 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012525 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12526
12527
12528$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12529
12530
12531fi
12532
12533
12534fi
12535done
12536
12537
12538for ac_func in clock_getres
12539do :
12540 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12541if test "x$ac_cv_func_clock_getres" = xyes; then :
12542 cat >>confdefs.h <<_ACEOF
12543#define HAVE_CLOCK_GETRES 1
12544_ACEOF
12545
12546else
12547
12548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12549$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12550if ${ac_cv_lib_rt_clock_getres+:} false; then :
12551 $as_echo_n "(cached) " >&6
12552else
12553 ac_check_lib_save_LIBS=$LIBS
12554LIBS="-lrt $LIBS"
12555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12556/* end confdefs.h. */
12557
12558/* Override any GCC internal prototype to avoid an error.
12559 Use char because int might match the return type of a GCC
12560 builtin and then its argument prototype would still apply. */
12561#ifdef __cplusplus
12562extern "C"
12563#endif
12564char clock_getres ();
12565int
12566main ()
12567{
12568return clock_getres ();
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573if ac_fn_c_try_link "$LINENO"; then :
12574 ac_cv_lib_rt_clock_getres=yes
12575else
12576 ac_cv_lib_rt_clock_getres=no
12577fi
12578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
12580LIBS=$ac_check_lib_save_LIBS
12581fi
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12583$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12584if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12585
12586 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12587
12588
12589fi
12590
12591
12592fi
12593done
12594
12595
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012596for ac_func in clock_settime
12597do :
12598 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12599if test "x$ac_cv_func_clock_settime" = xyes; then :
12600 cat >>confdefs.h <<_ACEOF
12601#define HAVE_CLOCK_SETTIME 1
12602_ACEOF
12603
12604else
12605
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12607$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12608if ${ac_cv_lib_rt_clock_settime+:} false; then :
12609 $as_echo_n "(cached) " >&6
12610else
12611 ac_check_lib_save_LIBS=$LIBS
12612LIBS="-lrt $LIBS"
12613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614/* end confdefs.h. */
12615
12616/* Override any GCC internal prototype to avoid an error.
12617 Use char because int might match the return type of a GCC
12618 builtin and then its argument prototype would still apply. */
12619#ifdef __cplusplus
12620extern "C"
12621#endif
12622char clock_settime ();
12623int
12624main ()
12625{
12626return clock_settime ();
12627 ;
12628 return 0;
12629}
12630_ACEOF
12631if ac_fn_c_try_link "$LINENO"; then :
12632 ac_cv_lib_rt_clock_settime=yes
12633else
12634 ac_cv_lib_rt_clock_settime=no
12635fi
12636rm -f core conftest.err conftest.$ac_objext \
12637 conftest$ac_exeext conftest.$ac_ext
12638LIBS=$ac_check_lib_save_LIBS
12639fi
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12641$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12642if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12643
12644 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12645
12646
12647fi
12648
12649
12650fi
12651done
12652
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12655$as_echo_n "checking for major... " >&6; }
12656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012658
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012659#if defined(MAJOR_IN_MKDEV)
12660#include <sys/mkdev.h>
12661#elif defined(MAJOR_IN_SYSMACROS)
12662#include <sys/sysmacros.h>
12663#else
12664#include <sys/types.h>
12665#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012666
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012667int
12668main ()
12669{
12670
12671 makedev(major(0),minor(0));
12672
12673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
12679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12683$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012684
12685else
Skip Montanaro6dead952003-09-25 14:50:04 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012689
12690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012691rm -f core conftest.err conftest.$ac_objext \
12692 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012693
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012694# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012695# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12697$as_echo_n "checking for getaddrinfo... " >&6; }
12698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012700
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012701#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012702#include <sys/socket.h>
12703#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012704#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012709getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
12712}
12713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012715 have_getaddrinfo=yes
12716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012719rm -f core conftest.err conftest.$ac_objext \
12720 conftest$ac_exeext conftest.$ac_ext
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12722$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012723if test $have_getaddrinfo = yes
12724then
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12726$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012731
12732if test "${enable_ipv6+set}" = set; then
12733 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12734else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012735 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012736fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012740
Stefan Krah19c21392012-11-22 23:47:32 +010012741#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742#include <sys/types.h>
12743#include <netdb.h>
12744#include <string.h>
12745#include <sys/socket.h>
12746#include <netinet/in.h>
12747
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012748int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749{
12750 int passive, gaierr, inet4 = 0, inet6 = 0;
12751 struct addrinfo hints, *ai, *aitop;
12752 char straddr[INET6_ADDRSTRLEN], strport[16];
12753
12754 for (passive = 0; passive <= 1; passive++) {
12755 memset(&hints, 0, sizeof(hints));
12756 hints.ai_family = AF_UNSPEC;
12757 hints.ai_flags = passive ? AI_PASSIVE : 0;
12758 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012759 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12761 (void)gai_strerror(gaierr);
12762 goto bad;
12763 }
12764 for (ai = aitop; ai; ai = ai->ai_next) {
12765 if (ai->ai_addr == NULL ||
12766 ai->ai_addrlen == 0 ||
12767 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12768 straddr, sizeof(straddr), strport, sizeof(strport),
12769 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12770 goto bad;
12771 }
12772 switch (ai->ai_family) {
12773 case AF_INET:
12774 if (strcmp(strport, "54321") != 0) {
12775 goto bad;
12776 }
12777 if (passive) {
12778 if (strcmp(straddr, "0.0.0.0") != 0) {
12779 goto bad;
12780 }
12781 } else {
12782 if (strcmp(straddr, "127.0.0.1") != 0) {
12783 goto bad;
12784 }
12785 }
12786 inet4++;
12787 break;
12788 case AF_INET6:
12789 if (strcmp(strport, "54321") != 0) {
12790 goto bad;
12791 }
12792 if (passive) {
12793 if (strcmp(straddr, "::") != 0) {
12794 goto bad;
12795 }
12796 } else {
12797 if (strcmp(straddr, "::1") != 0) {
12798 goto bad;
12799 }
12800 }
12801 inet6++;
12802 break;
12803 case AF_UNSPEC:
12804 goto bad;
12805 break;
12806 default:
12807 /* another family support? */
12808 break;
12809 }
12810 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012811 freeaddrinfo(aitop);
12812 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813 }
12814
12815 if (!(inet4 == 0 || inet4 == 2))
12816 goto bad;
12817 if (!(inet6 == 0 || inet6 == 2))
12818 goto bad;
12819
12820 if (aitop)
12821 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012822 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823
12824 bad:
12825 if (aitop)
12826 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012827 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012828}
12829
Martin v. Löwis11437992002-04-12 09:54:03 +000012830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012840fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12845$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12846
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012847if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012848then
12849 if test $ipv6 = yes
12850 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012851 echo 'Fatal: You must get working getaddrinfo() function.'
12852 echo ' or you can specify "--disable-ipv6"'.
12853 exit 1
12854 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012855else
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012858
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012859fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012860
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012861for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012862do :
12863 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012864if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012867_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012868
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869fi
12870done
12871
Michael W. Hudson54241132001-12-07 15:38:26 +000012872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12875$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012876if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012880/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012881#include <sys/types.h>
12882#include <sys/time.h>
12883#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Martin v. Löwis11437992002-04-12 09:54:03 +000012885int
12886main ()
12887{
12888if ((struct tm *) 0)
12889return 0;
12890 ;
12891 return 0;
12892}
12893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12902$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012903if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906
12907fi
12908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12910$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012911if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012915/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916#include <sys/types.h>
12917#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919int
12920main ()
12921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922struct tm tm;
12923 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 ;
12926 return 0;
12927}
12928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930 ac_cv_struct_tm=time.h
12931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12937$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012938if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941
12942fi
12943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944ac_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 +000012945#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947"
Victor Stinnere0be4232011-10-25 13:06:09 +020012948if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
12950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_TM_TM_ZONE 1
12952_ACEOF
12953
12954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012956
Martin v. Löwis11437992002-04-12 09:54:03 +000012957if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960
12961else
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12963"
Victor Stinnere0be4232011-10-25 13:06:09 +020012964if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968fi
12969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972_ACEOF
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12975$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012976if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012980/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012981#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982#if !HAVE_DECL_TZNAME
12983extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Martin v. Löwis11437992002-04-12 09:54:03 +000012986int
12987main ()
12988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ;
12991 return 0;
12992}
12993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995 ac_cv_var_tzname=yes
12996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13003$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013004 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013008 fi
13009fi
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011ac_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 +020013012if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
13014cat >>confdefs.h <<_ACEOF
13015#define HAVE_STRUCT_STAT_ST_RDEV 1
13016_ACEOF
13017
13018
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013019fi
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021ac_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 +020013022if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013023
Martin v. Löwis11437992002-04-12 09:54:03 +000013024cat >>confdefs.h <<_ACEOF
13025#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13026_ACEOF
13027
13028
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031ac_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 +020013032if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013033
13034cat >>confdefs.h <<_ACEOF
13035#define HAVE_STRUCT_STAT_ST_FLAGS 1
13036_ACEOF
13037
13038
13039fi
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041ac_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 +020013042if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013043
13044cat >>confdefs.h <<_ACEOF
13045#define HAVE_STRUCT_STAT_ST_GEN 1
13046_ACEOF
13047
13048
13049fi
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051ac_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 +020013052if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013053
13054cat >>confdefs.h <<_ACEOF
13055#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13056_ACEOF
13057
13058
13059fi
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061ac_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 +020013062if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064cat >>confdefs.h <<_ACEOF
13065#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13066_ACEOF
13067
13068
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013069fi
13070
Stefan Krah267b6392016-04-26 01:09:18 +020013071ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13072 #include <sys/types.h>
13073 #include <pwd.h>
13074
13075"
13076if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13077
13078cat >>confdefs.h <<_ACEOF
13079#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13080_ACEOF
13081
13082
13083fi
13084ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13085 #include <sys/types.h>
13086 #include <pwd.h>
13087
13088"
13089if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13090
13091cat >>confdefs.h <<_ACEOF
13092#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13093_ACEOF
13094
13095
13096fi
13097
Zachary Ware6a6967e2016-10-01 00:47:27 -050013098# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13099ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13100"
13101if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13102
13103cat >>confdefs.h <<_ACEOF
13104#define HAVE_SIGINFO_T_SI_BAND 1
13105_ACEOF
13106
13107
13108fi
13109
Michael W. Hudson54241132001-12-07 15:38:26 +000013110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13112$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013113if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115else
Matthias Kloseb159a552010-04-25 21:00:44 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013118/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013119#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013120int
13121main ()
13122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ;
13125 return 0;
13126}
13127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013128if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013129 ac_cv_header_time_altzone=yes
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135fi
13136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13138$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013142
13143fi
13144
Guido van Rossumda88dad1995-01-26 00:46:29 +000013145was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13147$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013150
13151#include <sys/types.h>
13152#include <sys/select.h>
13153#include <sys/time.h>
13154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155int
13156main ()
13157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158;
Martin v. Löwis11437992002-04-12 09:54:03 +000013159 ;
13160 return 0;
13161}
13162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013168 was_it_defined=yes
13169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13173$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13176$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013177if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013182#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013183int
13184main ()
13185{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 ;
13188 return 0;
13189}
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192 ac_cv_struct_addrinfo=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13197fi
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13200$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013201if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204
13205fi
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13208$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013209if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013214
13215# include <sys/types.h>
13216# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226 ac_cv_struct_sockaddr_storage=yes
13227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231fi
13232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13234$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238
13239fi
13240
Christian Heimesdffa3942016-09-05 23:54:41 +020013241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13242$as_echo_n "checking for sockaddr_alg... " >&6; }
13243if ${ac_cv_struct_sockaddr_alg+:} false; then :
13244 $as_echo_n "(cached) " >&6
13245else
13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247/* end confdefs.h. */
13248
13249# include <sys/types.h>
13250# include <sys/socket.h>
13251# include <linux/if_alg.h>
13252int
13253main ()
13254{
13255struct sockaddr_alg s
13256 ;
13257 return 0;
13258}
13259_ACEOF
13260if ac_fn_c_try_compile "$LINENO"; then :
13261 ac_cv_struct_sockaddr_alg=yes
13262else
13263 ac_cv_struct_sockaddr_alg=no
13264fi
13265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13266fi
13267
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13269$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13270if test $ac_cv_struct_sockaddr_alg = yes; then
13271
13272$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13273
13274fi
13275
Guido van Rossum627b2d71993-12-24 10:39:16 +000013276# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13279$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013280if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013285$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013286int
13287main ()
13288{
13289static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013290test_array [0] = 0;
13291return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
13293 ;
13294 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013295}
Martin v. Löwis11437992002-04-12 09:54:03 +000013296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013298 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13305$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308
13309fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13312$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013313if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013317/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013324 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013326 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328 char const *const *pcpcc;
13329 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 /* NEC SVR4.0.2 mips cc rejects this. */
13331 struct point {int x, y;};
13332 static struct point const zero = {0,0};
13333 /* AIX XL C 1.02.0.0 rejects this.
13334 It does not let you subtract one const X* pointer from another in
13335 an arm of an if-expression whose if-part is not a constant
13336 expression */
13337 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340 ++pcpcc;
13341 ppc = (char**) pcpcc;
13342 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013343 { /* SCO 3.2v4 cc rejects this sort of thing. */
13344 char tx;
13345 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 }
13351 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13352 int x[] = {25, 17};
13353 const int *foo = &x[0];
13354 ++foo;
13355 }
13356 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13357 typedef const int *iptr;
13358 iptr p = 0;
13359 ++p;
13360 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013361 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013363 struct s { int j; const int *ap[3]; } bx;
13364 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 }
13366 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13367 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013371#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ;
13374 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013375}
Martin v. Löwis11437992002-04-12 09:54:03 +000013376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378 ac_cv_c_const=yes
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13385$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013386if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389
13390fi
13391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Guido van Rossumda88dad1995-01-26 00:46:29 +000013393works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13395$as_echo_n "checking for working signed char... " >&6; }
13396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399int
13400main ()
13401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 ;
13404 return 0;
13405}
13406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013408 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013409else
Skip Montanaro6dead952003-09-25 14:50:04 +000013410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013413
Guido van Rossum7f43da71994-08-01 12:15:30 +000013414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13417$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013418
Guido van Rossumda88dad1995-01-26 00:46:29 +000013419have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13421$as_echo_n "checking for prototypes... " >&6; }
13422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013423/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013424int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013425int
13426main ()
13427{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 ;
13430 return 0;
13431}
13432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Matthias Kloseb159a552010-04-25 21:00:44 +000013437 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13441$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442
Guido van Rossumda88dad1995-01-26 00:46:29 +000013443works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13445$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013447/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013448
13449#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013450int foo(int x, ...) {
13451 va_list va;
13452 va_start(va, x);
13453 va_arg(va, int);
13454 va_arg(va, char *);
13455 va_arg(va, double);
13456 return 0;
13457}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Guido van Rossum90eea071996-08-30 20:58:57 +000013462return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
13465}
13466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
13469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013472 works=yes
13473
Guido van Rossum627b2d71993-12-24 10:39:16 +000013474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13477$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478
Martin v. Löwisd6320502004-08-12 13:45:08 +000013479# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13481$as_echo_n "checking for socketpair... " >&6; }
13482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013483/* end confdefs.h. */
13484
13485#include <sys/types.h>
13486#include <sys/socket.h>
13487
13488int
13489main ()
13490{
13491void *x=socketpair
13492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013499
Matthias Kloseb159a552010-04-25 21:00:44 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013501$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013505
13506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013508
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013509# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13511$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013514#include <sys/types.h>
13515#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013516int
13517main ()
13518{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013519struct sockaddr x;
13520x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 ;
13522 return 0;
13523}
13524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if ac_fn_c_try_compile "$LINENO"; then :
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13527$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013530
13531else
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13533$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013534
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013538# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013542if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13547$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548 OLD_CFLAGS=$CFLAGS
13549 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013552
13553# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555int
13556main ()
13557{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013558
13559 char *name;
13560 struct hostent *he, *res;
13561 char buffer[2048];
13562 int buflen = 2048;
13563 int h_errnop;
13564
13565 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
13567 ;
13568 return 0;
13569}
13570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013574
Martin v. Löwis11437992002-04-12 09:54:03 +000013575
Matthias Kloseb9621712010-04-24 17:59:49 +000013576$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13579$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013581else
Skip Montanaro6dead952003-09-25 14:50:04 +000013582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13584$as_echo "no" >&6; }
13585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13586$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013588/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013590# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013595
13596 char *name;
13597 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013598 char buffer[2048];
13599 int buflen = 2048;
13600 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013601
Matthias Kloseb159a552010-04-25 21:00:44 +000013602 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
13604 ;
13605 return 0;
13606}
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb159a552010-04-25 21:00:44 +000013613$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13616$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013618else
Skip Montanaro6dead952003-09-25 14:50:04 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13621$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13623$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625/* end confdefs.h. */
13626
13627# include <netdb.h>
13628
13629int
13630main ()
13631{
13632
13633 char *name;
13634 struct hostent *he;
13635 struct hostent_data data;
13636
13637 (void) gethostbyname_r(name, he, &data);
13638
13639 ;
13640 return 0;
13641}
13642_ACEOF
13643if ac_fn_c_try_compile "$LINENO"; then :
13644
13645 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13646
13647
13648$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13649
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13651$as_echo "yes" >&6; }
13652
13653else
13654
13655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013666 CFLAGS=$OLD_CFLAGS
13667
13668else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013669
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 for ac_func in gethostbyname
13671do :
13672 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013673if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013675#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013676_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013679done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013680
Michael W. Hudson54241132001-12-07 15:38:26 +000013681
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013682fi
13683
Michael W. Hudson54241132001-12-07 15:38:26 +000013684
13685
13686
13687
13688
13689
Guido van Rossum627b2d71993-12-24 10:39:16 +000013690# checks for system services
13691# (none yet)
13692
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013694ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013695if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013696
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13699$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013700if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013704LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708/* Override any GCC internal prototype to avoid an error.
13709 Use char because int might match the return type of a GCC
13710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013711#ifdef __cplusplus
13712extern "C"
13713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013714char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013715int
13716main ()
13717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 ;
13720 return 0;
13721}
13722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725else
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013728rm -f core conftest.err conftest.$ac_objext \
13729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13733$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013734if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 cat >>confdefs.h <<_ACEOF
13736#define HAVE_LIBIEEE 1
13737_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013739 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740
Guido van Rossum627b2d71993-12-24 10:39:16 +000013741fi
13742
Michael W. Hudson54241132001-12-07 15:38:26 +000013743
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013744fi
13745
Michael W. Hudson54241132001-12-07 15:38:26 +000013746
Guido van Rossum7f43da71994-08-01 12:15:30 +000013747# check for --with-libm=...
13748
Guido van Rossum563e7081996-09-10 18:20:48 +000013749case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013750Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013751*) LIBM=-lm
13752esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13754$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013757if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013759if test "$withval" = no
13760then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13762$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013763elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013764then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13766$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013767else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13771$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772fi
13773
Guido van Rossum7f43da71994-08-01 12:15:30 +000013774
13775# check for --with-libc=...
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13778$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013783if test "$withval" = no
13784then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13786$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013787elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013788then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13790$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013791else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013793else
Matthias Kloseb9621712010-04-24 17:59:49 +000013794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13795$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796fi
13797
Guido van Rossum7f43da71994-08-01 12:15:30 +000013798
Stefan Krah1919b7e2012-03-21 18:25:23 +010013799# **************************************
13800# * Check for gcc x64 inline assembler *
13801# **************************************
13802
13803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13804$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806/* end confdefs.h. */
13807
13808int
13809main ()
13810{
13811
13812 __asm__ __volatile__ ("movq %rcx, %rax");
13813
13814 ;
13815 return 0;
13816}
13817_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013818if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013819 have_gcc_asm_for_x64=yes
13820else
13821 have_gcc_asm_for_x64=no
13822fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013823rm -f core conftest.err conftest.$ac_objext \
13824 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13826$as_echo "$have_gcc_asm_for_x64" >&6; }
13827if test "$have_gcc_asm_for_x64" = yes
13828then
13829
13830$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13831
13832fi
13833
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834# **************************************************
13835# * Check for various properties of floating point *
13836# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13839$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013840if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842else
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845 ac_cv_little_endian_double=no
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848/* end confdefs.h. */
13849
13850#include <string.h>
13851int main() {
13852 double x = 9006104071832581.0;
13853 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13854 return 0;
13855 else
13856 return 1;
13857}
13858
13859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861 ac_cv_little_endian_double=yes
13862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867fi
13868
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13872$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873if test "$ac_cv_little_endian_double" = yes
13874then
13875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013877
13878fi
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13881$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013882if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884else
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013887 ac_cv_big_endian_double=no
13888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013890/* end confdefs.h. */
13891
13892#include <string.h>
13893int main() {
13894 double x = 9006104071832581.0;
13895 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13896 return 0;
13897 else
13898 return 1;
13899}
13900
13901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903 ac_cv_big_endian_double=yes
13904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909fi
13910
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911fi
13912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13914$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013915if test "$ac_cv_big_endian_double" = yes
13916then
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013919
13920fi
13921
13922# Some ARM platforms use a mixed-endian representation for doubles.
13923# While Python doesn't currently have full support for these platforms
13924# (see e.g., issue 1762561), we can at least make sure that float <-> string
13925# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13927$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013928if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930else
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933 ac_cv_mixed_endian_double=no
13934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013936/* end confdefs.h. */
13937
13938#include <string.h>
13939int main() {
13940 double x = 9006104071832581.0;
13941 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13942 return 0;
13943 else
13944 return 1;
13945}
13946
13947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013948if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949 ac_cv_mixed_endian_double=yes
13950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13954 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955fi
13956
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957fi
13958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13960$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961if test "$ac_cv_mixed_endian_double" = yes
13962then
13963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965
13966fi
13967
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013968# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013969# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013970# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013971# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013972# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013973# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013974
13975# This inline assembler syntax may also work for suncc and icc,
13976# so we try it on all platforms.
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13979$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981/* end confdefs.h. */
13982
13983int
13984main ()
13985{
13986
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013987 unsigned short cw;
13988 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13989 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990
13991 ;
13992 return 0;
13993}
13994_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013995if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996 have_gcc_asm_for_x87=yes
13997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013999fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014000rm -f core conftest.err conftest.$ac_objext \
14001 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14003$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014004if test "$have_gcc_asm_for_x87" = yes
14005then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006
Matthias Kloseb9621712010-04-24 17:59:49 +000014007$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14012$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14014/* end confdefs.h. */
14015
14016int
14017main ()
14018{
14019
14020 unsigned int fpcr;
14021 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14022 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14023
14024 ;
14025 return 0;
14026}
14027_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014028if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014029 have_gcc_asm_for_mc68881=yes
14030else
14031 have_gcc_asm_for_mc68881=no
14032fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014033rm -f core conftest.err conftest.$ac_objext \
14034 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14036$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14037if test "$have_gcc_asm_for_mc68881" = yes
14038then
14039
14040$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14041
14042fi
14043
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014044# Detect whether system arithmetic is subject to x87-style double
14045# rounding issues. The result of this test has little meaning on non
14046# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14047# mode is round-to-nearest and double rounding issues are present, and
14048# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14050$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051# $BASECFLAGS may affect the result
14052ac_save_cc="$CC"
14053CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014054if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014055 ac_cv_x87_double_rounding=no
14056else
Matthias Kloseb9621712010-04-24 17:59:49 +000014057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014058/* end confdefs.h. */
14059
14060#include <stdlib.h>
14061#include <math.h>
14062int main() {
14063 volatile double x, y, z;
14064 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14065 x = 0.99999999999999989; /* 1-2**-53 */
14066 y = 1./x;
14067 if (y != 1.)
14068 exit(0);
14069 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14070 x = 1e16;
14071 y = 2.99999;
14072 z = x + y;
14073 if (z != 1e16+4.)
14074 exit(0);
14075 /* both tests show evidence of double rounding */
14076 exit(1);
14077}
14078
14079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014080if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014081 ac_cv_x87_double_rounding=no
14082else
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14086 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014087fi
14088
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014089CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14091$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014092if test "$ac_cv_x87_double_rounding" = yes
14093then
14094
Matthias Kloseb9621712010-04-24 17:59:49 +000014095$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096
14097fi
14098
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014099# ************************************
14100# * Check for mathematical functions *
14101# ************************************
14102
14103LIBS_SAVE=$LIBS
14104LIBS="$LIBS $LIBM"
14105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014106for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14107do :
14108 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14109ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014110if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014111 cat >>confdefs.h <<_ACEOF
14112#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14113_ACEOF
14114
14115fi
14116done
14117
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014118for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014119do :
14120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14121ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014122if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014123 cat >>confdefs.h <<_ACEOF
14124#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14125_ACEOF
14126
14127fi
14128done
14129
14130ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14131"
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014133 ac_have_decl=1
14134else
14135 ac_have_decl=0
14136fi
14137
14138cat >>confdefs.h <<_ACEOF
14139#define HAVE_DECL_ISINF $ac_have_decl
14140_ACEOF
14141ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14142"
Victor Stinnere0be4232011-10-25 13:06:09 +020014143if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014144 ac_have_decl=1
14145else
14146 ac_have_decl=0
14147fi
14148
14149cat >>confdefs.h <<_ACEOF
14150#define HAVE_DECL_ISNAN $ac_have_decl
14151_ACEOF
14152ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14153"
Victor Stinnere0be4232011-10-25 13:06:09 +020014154if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014155 ac_have_decl=1
14156else
14157 ac_have_decl=0
14158fi
14159
14160cat >>confdefs.h <<_ACEOF
14161#define HAVE_DECL_ISFINITE $ac_have_decl
14162_ACEOF
14163
14164
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14166# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14168$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014171else
14172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014174 ac_cv_tanh_preserves_zero_sign=no
14175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014177/* end confdefs.h. */
14178
14179#include <math.h>
14180#include <stdlib.h>
14181int main() {
14182 /* return 0 if either negative zeros don't exist
14183 on this platform or if negative zeros exist
14184 and tanh(-0.) == -0. */
14185 if (atan2(0., -1.) == atan2(-0., -1.) ||
14186 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14187 else exit(1);
14188}
14189
14190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192 ac_cv_tanh_preserves_zero_sign=yes
14193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014198fi
14199
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014200fi
14201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14203$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014204if test "$ac_cv_tanh_preserves_zero_sign" = yes
14205then
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014208
14209fi
14210
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014211if test "$ac_cv_func_log1p" = yes
14212then
14213 # On some versions of AIX, log1p(-0.) returns 0. instead of
14214 # -0. See issue #9920.
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14216$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014217 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014220
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014221 if test "$cross_compiling" = yes; then :
14222 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014223else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14225/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014226
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014227 #include <math.h>
14228 #include <stdlib.h>
14229 int main() {
14230 /* Fail if the signs of log1p(-0.) and -0. can be
14231 distinguished. */
14232 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14233 return 0;
14234 else
14235 return 1;
14236 }
14237
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239if ac_fn_c_try_run "$LINENO"; then :
14240 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014241else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242 ac_cv_log1p_drops_zero_sign=yes
14243fi
14244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014246fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014247
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014248fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014249
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14251$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14252fi
14253if test "$ac_cv_log1p_drops_zero_sign" = yes
14254then
14255
14256$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14257
14258fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014259
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014260LIBS=$LIBS_SAVE
14261
Mark Dickinsona614f042009-11-28 12:48:43 +000014262# For multiprocessing module, check that sem_open
14263# actually works. For FreeBSD versions <= 7.2,
14264# the kernel module that provides POSIX semaphores
14265# isn't loaded by default, so an attempt to call
14266# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14268$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014269if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014273 ac_cv_posix_semaphores_enabled=yes
14274else
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014276/* end confdefs.h. */
14277
14278#include <unistd.h>
14279#include <fcntl.h>
14280#include <stdio.h>
14281#include <semaphore.h>
14282#include <sys/stat.h>
14283
14284int main(void) {
14285 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14286 if (a == SEM_FAILED) {
14287 perror("sem_open");
14288 return 1;
14289 }
14290 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014291 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014292 return 0;
14293}
14294
14295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014297 ac_cv_posix_semaphores_enabled=yes
14298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14302 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014303fi
14304
14305
Mark Dickinsona614f042009-11-28 12:48:43 +000014306fi
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14309$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014310if test $ac_cv_posix_semaphores_enabled = no
14311then
14312
Matthias Kloseb9621712010-04-24 17:59:49 +000014313$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014314
14315fi
14316
Mark Dickinson10683072009-04-18 21:18:19 +000014317# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14319$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014320if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014324 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014327/* end confdefs.h. */
14328
14329#include <unistd.h>
14330#include <fcntl.h>
14331#include <stdio.h>
14332#include <semaphore.h>
14333#include <sys/stat.h>
14334
14335int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014336 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014337 int count;
14338 int res;
14339 if(a==SEM_FAILED){
14340 perror("sem_open");
14341 return 1;
14342
14343 }
14344 res = sem_getvalue(a, &count);
14345 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014346 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014347 return res==-1 ? 1 : 0;
14348}
14349
Mark Dickinson10683072009-04-18 21:18:19 +000014350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014352 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014358fi
14359
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014361fi
14362
Matthias Kloseb9621712010-04-24 17:59:49 +000014363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14364$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014365if test $ac_cv_broken_sem_getvalue = yes
14366then
14367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014369
14370fi
14371
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014372ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14373"
14374if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14375 ac_have_decl=1
14376else
14377 ac_have_decl=0
14378fi
14379
14380cat >>confdefs.h <<_ACEOF
14381#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14382_ACEOF
14383ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14384"
14385if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14386 ac_have_decl=1
14387else
14388 ac_have_decl=0
14389fi
14390
14391cat >>confdefs.h <<_ACEOF
14392#define HAVE_DECL_RTLD_NOW $ac_have_decl
14393_ACEOF
14394ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14395"
14396if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14397 ac_have_decl=1
14398else
14399 ac_have_decl=0
14400fi
14401
14402cat >>confdefs.h <<_ACEOF
14403#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14404_ACEOF
14405ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14406"
14407if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14408 ac_have_decl=1
14409else
14410 ac_have_decl=0
14411fi
14412
14413cat >>confdefs.h <<_ACEOF
14414#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14415_ACEOF
14416ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14417"
14418if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14419 ac_have_decl=1
14420else
14421 ac_have_decl=0
14422fi
14423
14424cat >>confdefs.h <<_ACEOF
14425#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14426_ACEOF
14427ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14428"
14429if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14430 ac_have_decl=1
14431else
14432 ac_have_decl=0
14433fi
14434
14435cat >>confdefs.h <<_ACEOF
14436#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14437_ACEOF
14438ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14439"
14440if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14441 ac_have_decl=1
14442else
14443 ac_have_decl=0
14444fi
14445
14446cat >>confdefs.h <<_ACEOF
14447#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14448_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014449ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14450"
14451if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14452 ac_have_decl=1
14453else
14454 ac_have_decl=0
14455fi
14456
14457cat >>confdefs.h <<_ACEOF
14458#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14459_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014460
14461
Mark Dickinsonbd792642009-03-18 20:06:12 +000014462# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14464$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014465# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014466if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014467 enableval=$enable_big_digits; case $enable_big_digits in
14468yes)
14469 enable_big_digits=30 ;;
14470no)
14471 enable_big_digits=15 ;;
1447215|30)
14473 ;;
14474*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014475 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 +000014476esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14478$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014479
14480cat >>confdefs.h <<_ACEOF
14481#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14482_ACEOF
14483
14484
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14487$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014488fi
14489
14490
Guido van Rossumef2255b2000-03-10 22:30:29 +000014491# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014492ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
14495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014498 wchar_h="yes"
14499
Guido van Rossumef2255b2000-03-10 22:30:29 +000014500else
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014502
14503fi
14504
Michael W. Hudson54241132001-12-07 15:38:26 +000014505
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014507# determine wchar_t size
14508if test "$wchar_h" = yes
14509then
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14512# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14513# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14515$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014518else
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14520"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 if test "$ac_cv_type_wchar_t" = yes; then
14524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014526as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014527See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 else
14529 ac_cv_sizeof_wchar_t=0
14530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14535$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
14537
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014540#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014541_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014542
Michael W. Hudson54241132001-12-07 15:38:26 +000014543
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014544fi
14545
Matthias Kloseb9621712010-04-24 17:59:49 +000014546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14547$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014548have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014550/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014551
14552#include <tcl.h>
14553#if TCL_UTF_MAX != 6
14554# error "NOT UCS4_TCL"
14555#endif
14556int
14557main ()
14558{
14559
14560 ;
14561 return 0;
14562}
14563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014565
14566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014568
14569 have_ucs4_tcl=yes
14570
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14574$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014575
Skip Montanaro6dead952003-09-25 14:50:04 +000014576# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014577if test "$wchar_h" = yes
14578then
14579 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14581$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014582 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014584else
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014587 ac_cv_wchar_t_signed=yes
14588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014590/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014591
14592 #include <wchar.h>
14593 int main()
14594 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014595 /* Success: exit code 0 */
14596 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014597 }
14598
14599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014600if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014601 ac_cv_wchar_t_signed=yes
14602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014607fi
14608
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014609fi
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14612$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613fi
14614
Georg Brandl52d168a2008-01-07 18:10:24 +000014615# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014616if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014617 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014618then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014619 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Georg Brandl52d168a2008-01-07 18:10:24 +000014623else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014624 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014625fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14627$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014628
14629# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14631$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014632if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014634else
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 ac_cv_c_bigendian=unknown
14636 # See if we're dealing with a universal compiler.
14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638/* end confdefs.h. */
14639#ifndef __APPLE_CC__
14640 not a universal capable compiler
14641 #endif
14642 typedef int dummy;
14643
Skip Montanaro6dead952003-09-25 14:50:04 +000014644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014645if ac_fn_c_try_compile "$LINENO"; then :
14646
14647 # Check for potential -arch flags. It is not universal unless
14648 # there are at least two -arch flags with different values.
14649 ac_arch=
14650 ac_prev=
14651 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14652 if test -n "$ac_prev"; then
14653 case $ac_word in
14654 i?86 | x86_64 | ppc | ppc64)
14655 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14656 ac_arch=$ac_word
14657 else
14658 ac_cv_c_bigendian=universal
14659 break
14660 fi
14661 ;;
14662 esac
14663 ac_prev=
14664 elif test "x$ac_word" = "x-arch"; then
14665 ac_prev=arch
14666 fi
14667 done
14668fi
14669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14670 if test $ac_cv_c_bigendian = unknown; then
14671 # See if sys/param.h defines the BYTE_ORDER macro.
14672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014673/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014674#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677int
14678main ()
14679{
Matthias Kloseb9621712010-04-24 17:59:49 +000014680#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14681 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14682 && LITTLE_ENDIAN)
14683 bogus endian macros
14684 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
14686 ;
14687 return 0;
14688}
14689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014690if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014693/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014694#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014696
Martin v. Löwis11437992002-04-12 09:54:03 +000014697int
14698main ()
14699{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014700#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 not big endian
14702 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
14704 ;
14705 return 0;
14706}
14707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014708if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014709 ac_cv_c_bigendian=yes
14710else
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014714fi
14715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14716 fi
14717 if test $ac_cv_c_bigendian = unknown; then
14718 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014720/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014721#include <limits.h>
14722
Martin v. Löwis11437992002-04-12 09:54:03 +000014723int
14724main ()
14725{
Matthias Kloseb9621712010-04-24 17:59:49 +000014726#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14727 bogus endian macros
14728 #endif
14729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 ;
14731 return 0;
14732}
14733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014734if ac_fn_c_try_compile "$LINENO"; then :
14735 # It does; now see whether it defined to _BIG_ENDIAN or not.
14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737/* end confdefs.h. */
14738#include <limits.h>
14739
14740int
14741main ()
14742{
14743#ifndef _BIG_ENDIAN
14744 not big endian
14745 #endif
14746
14747 ;
14748 return 0;
14749}
14750_ACEOF
14751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14757fi
14758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14759 fi
14760 if test $ac_cv_c_bigendian = unknown; then
14761 # Compile a test program.
14762 if test "$cross_compiling" = yes; then :
14763 # Try to guess by grepping values from an object file.
14764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14765/* end confdefs.h. */
14766short int ascii_mm[] =
14767 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14768 short int ascii_ii[] =
14769 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14770 int use_ascii (int i) {
14771 return ascii_mm[i] + ascii_ii[i];
14772 }
14773 short int ebcdic_ii[] =
14774 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14775 short int ebcdic_mm[] =
14776 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14777 int use_ebcdic (int i) {
14778 return ebcdic_mm[i] + ebcdic_ii[i];
14779 }
14780 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782int
14783main ()
14784{
14785return use_ascii (foo) == use_ebcdic (foo);
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790if ac_fn_c_try_compile "$LINENO"; then :
14791 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14792 ac_cv_c_bigendian=yes
14793 fi
14794 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14795 if test "$ac_cv_c_bigendian" = unknown; then
14796 ac_cv_c_bigendian=no
14797 else
14798 # finding both strings is unlikely to happen, but who knows?
14799 ac_cv_c_bigendian=unknown
14800 fi
14801 fi
14802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014806/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014808int
14809main ()
14810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 /* Are we little or big endian? From Harbison&Steele. */
14813 union
14814 {
14815 long int l;
14816 char c[sizeof (long int)];
14817 } u;
14818 u.l = 1;
14819 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820
14821 ;
14822 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014823}
Martin v. Löwis11437992002-04-12 09:54:03 +000014824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014826 ac_cv_c_bigendian=no
14827else
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14837$as_echo "$ac_cv_c_bigendian" >&6; }
14838 case $ac_cv_c_bigendian in #(
14839 yes)
14840 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14841;; #(
14842 no)
14843 ;; #(
14844 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ;; #(
14849 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014850 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014851 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014855# ABI version string for Python extension modules. This appears between the
14856# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14857# from the following attributes which affect the ABI of this Python build (in
14858# this order):
14859#
14860# * The Python implementation (always 'cpython-' for us)
14861# * The major and minor version numbers
14862# * --with-pydebug (adds a 'd')
14863# * --with-pymalloc (adds a 'm')
14864# * --with-wide-unicode (adds a 'u')
14865#
14866# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014867# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14868# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014869
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14871$as_echo_n "checking ABIFLAGS... " >&6; }
14872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14873$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14875$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014876SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14878$as_echo "$SOABI" >&6; }
14879
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014880
14881case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014882 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014883 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14884 *)
14885 EXT_SUFFIX=${SHLIB_SUFFIX};;
14886esac
14887
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14889$as_echo_n "checking LDVERSION... " >&6; }
14890LDVERSION='$(VERSION)$(ABIFLAGS)'
14891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14892$as_echo "$LDVERSION" >&6; }
14893
doko@python.org87421192013-01-26 11:39:31 +010014894
doko@ubuntu.com55532312016-06-14 08:55:19 +020014895if test x$PLATFORM_TRIPLET = x; then
14896 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14897else
14898 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14899fi
doko@python.org87421192013-01-26 11:39:31 +010014900
14901
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014902# Check whether right shifting a negative integer extends the sign bit
14903# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14905$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014906if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014908else
Martin v. Löwis11437992002-04-12 09:54:03 +000014909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014911 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014912else
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014914/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014915
14916int main()
14917{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014918 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014919}
14920
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014922if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014923 ac_cv_rshift_extends_sign=yes
14924else
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014929fi
14930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931fi
14932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14934$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014935if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014936then
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014939
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014940fi
14941
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014942# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14944$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014945if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014947else
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014950/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014951#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014952int
14953main ()
14954{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014955
14956 FILE *f = fopen("/dev/null", "r");
14957 flockfile(f);
14958 getc_unlocked(f);
14959 funlockfile(f);
14960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ;
14962 return 0;
14963}
14964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014965if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014966 ac_cv_have_getc_unlocked=yes
14967else
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 ac_cv_have_getc_unlocked=no
14969fi
14970rm -f core conftest.err conftest.$ac_objext \
14971 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14975$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014976if test "$ac_cv_have_getc_unlocked" = yes
14977then
Martin v. Löwis11437992002-04-12 09:54:03 +000014978
Matthias Kloseb9621712010-04-24 17:59:49 +000014979$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014980
14981fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014982
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014983# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014984# save the value of LIBS so we don't actually link Python with readline
14985LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014986
Gregory P. Smith18820942008-09-07 06:24:49 +000014987# On some systems we need to link readline to a termcap compatible
14988# library. NOTE: Keep the precedence of listed libraries synchronised
14989# with setup.py.
14990py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14992$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014993for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014994 if test -z "$py_libtermcap"; then
14995 READLINE_LIBS="-lreadline"
14996 else
14997 READLINE_LIBS="-lreadline -l$py_libtermcap"
14998 fi
14999 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015001/* end confdefs.h. */
15002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003/* Override any GCC internal prototype to avoid an error.
15004 Use char because int might match the return type of a GCC
15005 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015006#ifdef __cplusplus
15007extern "C"
15008#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015009char readline ();
15010int
15011main ()
15012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015014 ;
15015 return 0;
15016}
15017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015018if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015019 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015021rm -f core conftest.err conftest.$ac_objext \
15022 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015023 if test $py_cv_lib_readline = yes; then
15024 break
15025 fi
15026done
15027# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15028#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015029if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15031$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015032else
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15034$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015037
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015038fi
15039
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015040# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015043#include <readline/readline.h>
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015046 have_readline=yes
15047else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015048 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015049
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015050fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015051rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015052if test $have_readline = yes
15053then
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015055/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015056#include <readline/readline.h>
15057
15058_ACEOF
15059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015063
15064fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015065rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015068/* end confdefs.h. */
15069#include <readline/readline.h>
15070
15071_ACEOF
15072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015076
15077fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015078rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015079
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015080fi
15081
Martin v. Löwis0daad592001-09-30 21:09:59 +000015082# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15084$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015085if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015087else
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015089LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093/* Override any GCC internal prototype to avoid an error.
15094 Use char because int might match the return type of a GCC
15095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef __cplusplus
15097extern "C"
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100int
15101main ()
15102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ;
15105 return 0;
15106}
15107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015113rm -f core conftest.err conftest.$ac_objext \
15114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015115LIBS=$ac_check_lib_save_LIBS
15116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15118$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015119if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015122
Martin v. Löwis0daad592001-09-30 21:09:59 +000015123fi
15124
Michael W. Hudson54241132001-12-07 15:38:26 +000015125
Thomas Wouters89d996e2007-09-08 17:39:28 +000015126# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15128$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015129if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015131else
15132 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015133LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015135/* end confdefs.h. */
15136
15137/* Override any GCC internal prototype to avoid an error.
15138 Use char because int might match the return type of a GCC
15139 builtin and then its argument prototype would still apply. */
15140#ifdef __cplusplus
15141extern "C"
15142#endif
15143char rl_completion_display_matches_hook ();
15144int
15145main ()
15146{
15147return rl_completion_display_matches_hook ();
15148 ;
15149 return 0;
15150}
15151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015152if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015153 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015157rm -f core conftest.err conftest.$ac_objext \
15158 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015159LIBS=$ac_check_lib_save_LIBS
15160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15162$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015163if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015166
15167fi
15168
15169
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015170# also in 4.0, but not in editline
15171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15172$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15173if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15174 $as_echo_n "(cached) " >&6
15175else
15176 ac_check_lib_save_LIBS=$LIBS
15177LIBS="-lreadline $READLINE_LIBS $LIBS"
15178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15179/* end confdefs.h. */
15180
15181/* Override any GCC internal prototype to avoid an error.
15182 Use char because int might match the return type of a GCC
15183 builtin and then its argument prototype would still apply. */
15184#ifdef __cplusplus
15185extern "C"
15186#endif
15187char rl_resize_terminal ();
15188int
15189main ()
15190{
15191return rl_resize_terminal ();
15192 ;
15193 return 0;
15194}
15195_ACEOF
15196if ac_fn_c_try_link "$LINENO"; then :
15197 ac_cv_lib_readline_rl_resize_terminal=yes
15198else
15199 ac_cv_lib_readline_rl_resize_terminal=no
15200fi
15201rm -f core conftest.err conftest.$ac_objext \
15202 conftest$ac_exeext conftest.$ac_ext
15203LIBS=$ac_check_lib_save_LIBS
15204fi
15205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15206$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15207if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15208
15209$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15210
15211fi
15212
15213
Martin v. Löwis0daad592001-09-30 21:09:59 +000015214# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15216$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015219else
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015221LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225/* Override any GCC internal prototype to avoid an error.
15226 Use char because int might match the return type of a GCC
15227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015228#ifdef __cplusplus
15229extern "C"
15230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015231char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015232int
15233main ()
15234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ;
15237 return 0;
15238}
15239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015240if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015242else
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015245rm -f core conftest.err conftest.$ac_objext \
15246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015247LIBS=$ac_check_lib_save_LIBS
15248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15250$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015251if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015254
Guido van Rossum353ae582001-07-10 16:45:32 +000015255fi
15256
Jack Jansendd19cf82001-12-06 22:36:17 +000015257
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015258# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015260/* end confdefs.h. */
15261#include <readline/readline.h>
15262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015263if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015264 have_readline=yes
15265else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015266 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015267
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015268fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015269rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015270if test $have_readline = yes
15271then
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015273/* end confdefs.h. */
15274#include <readline/readline.h>
15275
15276_ACEOF
15277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015281
15282fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015283rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015284
15285fi
15286
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15288$as_echo_n "checking for append_history in -lreadline... " >&6; }
15289if ${ac_cv_lib_readline_append_history+:} false; then :
15290 $as_echo_n "(cached) " >&6
15291else
15292 ac_check_lib_save_LIBS=$LIBS
15293LIBS="-lreadline $READLINE_LIBS $LIBS"
15294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295/* end confdefs.h. */
15296
15297/* Override any GCC internal prototype to avoid an error.
15298 Use char because int might match the return type of a GCC
15299 builtin and then its argument prototype would still apply. */
15300#ifdef __cplusplus
15301extern "C"
15302#endif
15303char append_history ();
15304int
15305main ()
15306{
15307return append_history ();
15308 ;
15309 return 0;
15310}
15311_ACEOF
15312if ac_fn_c_try_link "$LINENO"; then :
15313 ac_cv_lib_readline_append_history=yes
15314else
15315 ac_cv_lib_readline_append_history=no
15316fi
15317rm -f core conftest.err conftest.$ac_objext \
15318 conftest$ac_exeext conftest.$ac_ext
15319LIBS=$ac_check_lib_save_LIBS
15320fi
15321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15322$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15323if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15324
15325$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15326
15327fi
15328
15329
Martin v. Löwis82bca632006-02-10 20:49:30 +000015330# End of readline checks: restore LIBS
15331LIBS=$LIBS_no_readline
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15334$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015335if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015337else
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015340 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015341else
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015343/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015344
15345int main()
15346{
15347 int val1 = nice(1);
15348 if (val1 != -1 && val1 == nice(2))
15349 exit(0);
15350 exit(1);
15351}
15352
Martin v. Löwis11437992002-04-12 09:54:03 +000015353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015354if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015355 ac_cv_broken_nice=yes
15356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15360 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015361fi
15362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363fi
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15366$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015367if test "$ac_cv_broken_nice" = yes
15368then
Martin v. Löwis11437992002-04-12 09:54:03 +000015369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015371
15372fi
15373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15375$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015376if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015378else
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015380 ac_cv_broken_poll=no
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015383/* end confdefs.h. */
15384
15385#include <poll.h>
15386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015387int main()
15388{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015389 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015390 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015391
15392 close (42);
15393
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015394 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015395 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015396 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015397 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015398 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015399 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015400 return 1;
15401}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015402
15403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015404if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015405 ac_cv_broken_poll=yes
15406else
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015413fi
15414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15416$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015417if test "$ac_cv_broken_poll" = yes
15418then
15419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015421
15422fi
15423
Brett Cannon43802422005-02-10 20:48:03 +000015424# 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 +000015425# (which is not required by ISO C or UNIX spec) and/or if we support
15426# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015427ac_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 +000015428#include <$ac_cv_struct_tm>
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430"
Victor Stinnere0be4232011-10-25 13:06:09 +020015431if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015432
15433cat >>confdefs.h <<_ACEOF
15434#define HAVE_STRUCT_TM_TM_ZONE 1
15435_ACEOF
15436
15437
15438fi
15439
15440if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015443
15444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15446"
Victor Stinnere0be4232011-10-25 13:06:09 +020015447if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449else
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451fi
15452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015454#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455_ACEOF
15456
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15458$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015459if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461else
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015463/* end confdefs.h. */
15464#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465#if !HAVE_DECL_TZNAME
15466extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015467#endif
15468
15469int
15470main ()
15471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015473 ;
15474 return 0;
15475}
15476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015477if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015478 ac_cv_var_tzname=yes
15479else
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015482rm -f core conftest.err conftest.$ac_objext \
15483 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15486$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015487 if test $ac_cv_var_tzname = yes; then
15488
Matthias Kloseb9621712010-04-24 17:59:49 +000015489$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015490
15491 fi
15492fi
15493
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015494
Martin v. Löwis1d459062005-03-14 21:23:33 +000015495# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15497$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015498if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015500else
15501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015503 ac_cv_working_tzset=no
15504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015506/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507
15508#include <stdlib.h>
15509#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015510#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015511
15512#if HAVE_TZNAME
15513extern char *tzname[];
15514#endif
15515
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516int main()
15517{
Brett Cannon18367812003-09-19 00:59:16 +000015518 /* Note that we need to ensure that not only does tzset(3)
15519 do 'something' with localtime, but it works as documented
15520 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015521 This includes making sure that tzname is set properly if
15522 tm->tm_zone does not exist since it is the alternative way
15523 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015524
15525 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015526 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015527 */
15528
Martin v. Löwis1d459062005-03-14 21:23:33 +000015529 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015530 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15531
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015532 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015533 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015534 if (localtime(&groundhogday)->tm_hour != 0)
15535 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015536#if HAVE_TZNAME
15537 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15538 if (strcmp(tzname[0], "UTC") ||
15539 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15540 exit(1);
15541#endif
Brett Cannon18367812003-09-19 00:59:16 +000015542
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015543 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015544 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015545 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015546 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015547#if HAVE_TZNAME
15548 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15549 exit(1);
15550#endif
Brett Cannon18367812003-09-19 00:59:16 +000015551
15552 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15553 tzset();
15554 if (localtime(&groundhogday)->tm_hour != 11)
15555 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015556#if HAVE_TZNAME
15557 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15558 exit(1);
15559#endif
15560
15561#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015562 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15563 exit(1);
15564 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15565 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015566#endif
Brett Cannon18367812003-09-19 00:59:16 +000015567
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015568 exit(0);
15569}
15570
15571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015572if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015573 ac_cv_working_tzset=yes
15574else
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015579fi
15580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581fi
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15584$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015585if test "$ac_cv_working_tzset" = yes
15586then
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015589
15590fi
15591
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015592# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15594$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015595if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015599/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015600#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015601int
15602main ()
15603{
15604
15605struct stat st;
15606st.st_mtim.tv_nsec = 1;
15607
15608 ;
15609 return 0;
15610}
15611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015613 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15618fi
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15621$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015622if test "$ac_cv_stat_tv_nsec" = yes
15623then
15624
Matthias Kloseb9621712010-04-24 17:59:49 +000015625$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015626
15627fi
15628
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015629# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15631$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015632if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015636/* end confdefs.h. */
15637#include <sys/stat.h>
15638int
15639main ()
15640{
15641
15642struct stat st;
15643st.st_mtimespec.tv_nsec = 1;
15644
15645 ;
15646 return 0;
15647}
15648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015650 ac_cv_stat_tv_nsec2=yes
15651else
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15655fi
15656
Matthias Kloseb9621712010-04-24 17:59:49 +000015657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15658$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015659if test "$ac_cv_stat_tv_nsec2" = yes
15660then
15661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015663
15664fi
15665
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015666# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015667ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015668if test "$cross_compiling" = no; then
15669 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15670fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015671
15672for ac_header in curses.h ncurses.h
15673do :
15674 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15675ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15676if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15677 cat >>confdefs.h <<_ACEOF
15678#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15679_ACEOF
15680
15681fi
15682
15683done
15684
15685
15686# On Solaris, term.h requires curses.h
15687for ac_header in term.h
15688do :
15689 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15690#ifdef HAVE_CURSES_H
15691#include <curses.h>
15692#endif
15693
15694"
15695if test "x$ac_cv_header_term_h" = xyes; then :
15696 cat >>confdefs.h <<_ACEOF
15697#define HAVE_TERM_H 1
15698_ACEOF
15699
15700fi
15701
15702done
15703
15704
Jack Jansen666b1e72001-10-31 12:11:48 +000015705# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15707$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015708if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015709 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015712/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015713#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015714int
15715main ()
15716{
Jack Jansen666b1e72001-10-31 12:11:48 +000015717
15718 int rtn;
15719 rtn = mvwdelch(0,0,0);
15720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 ;
15722 return 0;
15723}
15724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015725if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015726 ac_cv_mvwdelch_is_expression=yes
15727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15731fi
15732
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15734$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015735
15736if test "$ac_cv_mvwdelch_is_expression" = yes
15737then
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015740
15741fi
15742
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015743# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15744# structs since version 5.7. If the macro is defined as zero before including
15745# [n]curses.h, ncurses will expose fields of the structs regardless of the
15746# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15748$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015749if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015751else
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015753/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015754
15755 #define NCURSES_OPAQUE 0
15756 #include <curses.h>
15757
Martin v. Löwis11437992002-04-12 09:54:03 +000015758int
15759main ()
15760{
Jack Jansen666b1e72001-10-31 12:11:48 +000015761
15762 WINDOW *w;
15763 w->_flags = 0;
15764
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 ;
15766 return 0;
15767}
15768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015769if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015770 ac_cv_window_has_flags=yes
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15775fi
15776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15778$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015779
Jack Jansen666b1e72001-10-31 12:11:48 +000015780
15781if test "$ac_cv_window_has_flags" = yes
15782then
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Matthias Kloseb9621712010-04-24 17:59:49 +000015784$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015785
15786fi
15787
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15789$as_echo_n "checking for is_pad... " >&6; }
15790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791/* end confdefs.h. */
15792#include <curses.h>
15793int
15794main ()
15795{
15796
15797#ifndef is_pad
15798void *x=is_pad
15799#endif
15800
15801 ;
15802 return 0;
15803}
15804_ACEOF
15805if ac_fn_c_try_compile "$LINENO"; then :
15806
15807$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15808
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15810$as_echo "yes" >&6; }
15811else
15812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15813$as_echo "no" >&6; }
15814
15815fi
15816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15819$as_echo_n "checking for is_term_resized... " >&6; }
15820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015821/* end confdefs.h. */
15822#include <curses.h>
15823int
15824main ()
15825{
15826void *x=is_term_resized
15827 ;
15828 return 0;
15829}
15830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015834
Matthias Kloseb159a552010-04-25 21:00:44 +000015835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015836$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15839$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015840
15841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15845$as_echo_n "checking for resize_term... " >&6; }
15846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015847/* end confdefs.h. */
15848#include <curses.h>
15849int
15850main ()
15851{
15852void *x=resize_term
15853 ;
15854 return 0;
15855}
15856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015857if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015860
Matthias Kloseb159a552010-04-25 21:00:44 +000015861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015862$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015863else
Matthias Kloseb9621712010-04-24 17:59:49 +000015864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15865$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015866
15867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15871$as_echo_n "checking for resizeterm... " >&6; }
15872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015873/* end confdefs.h. */
15874#include <curses.h>
15875int
15876main ()
15877{
15878void *x=resizeterm
15879 ;
15880 return 0;
15881}
15882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015883if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015886
Matthias Kloseb159a552010-04-25 21:00:44 +000015887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015888$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015889else
Matthias Kloseb9621712010-04-24 17:59:49 +000015890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15891$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015892
15893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015895
15896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15897$as_echo_n "checking for immedok... " >&6; }
15898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15899/* end confdefs.h. */
15900#include <curses.h>
15901int
15902main ()
15903{
15904
15905#ifndef immedok
15906void *x=immedok
15907#endif
15908
15909 ;
15910 return 0;
15911}
15912_ACEOF
15913if ac_fn_c_try_compile "$LINENO"; then :
15914
15915$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15916
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15918$as_echo "yes" >&6; }
15919else
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921$as_echo "no" >&6; }
15922
15923fi
15924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15925
15926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15927$as_echo_n "checking for syncok... " >&6; }
15928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929/* end confdefs.h. */
15930#include <curses.h>
15931int
15932main ()
15933{
15934
15935#ifndef syncok
15936void *x=syncok
15937#endif
15938
15939 ;
15940 return 0;
15941}
15942_ACEOF
15943if ac_fn_c_try_compile "$LINENO"; then :
15944
15945$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15946
15947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15948$as_echo "yes" >&6; }
15949else
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15951$as_echo "no" >&6; }
15952
15953fi
15954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15955
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15957$as_echo_n "checking for wchgat... " >&6; }
15958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959/* end confdefs.h. */
15960#include <curses.h>
15961int
15962main ()
15963{
15964
15965#ifndef wchgat
15966void *x=wchgat
15967#endif
15968
15969 ;
15970 return 0;
15971}
15972_ACEOF
15973if ac_fn_c_try_compile "$LINENO"; then :
15974
15975$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15976
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15978$as_echo "yes" >&6; }
15979else
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981$as_echo "no" >&6; }
15982
15983fi
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15987$as_echo_n "checking for filter... " >&6; }
15988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15989/* end confdefs.h. */
15990#include <curses.h>
15991int
15992main ()
15993{
15994
15995#ifndef filter
15996void *x=filter
15997#endif
15998
15999 ;
16000 return 0;
16001}
16002_ACEOF
16003if ac_fn_c_try_compile "$LINENO"; then :
16004
16005$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16006
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16008$as_echo "yes" >&6; }
16009else
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16011$as_echo "no" >&6; }
16012
16013fi
16014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16015
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16017$as_echo_n "checking for has_key... " >&6; }
16018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16019/* end confdefs.h. */
16020#include <curses.h>
16021int
16022main ()
16023{
16024
16025#ifndef has_key
16026void *x=has_key
16027#endif
16028
16029 ;
16030 return 0;
16031}
16032_ACEOF
16033if ac_fn_c_try_compile "$LINENO"; then :
16034
16035$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16036
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16038$as_echo "yes" >&6; }
16039else
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16041$as_echo "no" >&6; }
16042
16043fi
16044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16045
16046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16047$as_echo_n "checking for typeahead... " >&6; }
16048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16049/* end confdefs.h. */
16050#include <curses.h>
16051int
16052main ()
16053{
16054
16055#ifndef typeahead
16056void *x=typeahead
16057#endif
16058
16059 ;
16060 return 0;
16061}
16062_ACEOF
16063if ac_fn_c_try_compile "$LINENO"; then :
16064
16065$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16066
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16068$as_echo "yes" >&6; }
16069else
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16071$as_echo "no" >&6; }
16072
16073fi
16074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16075
16076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16077$as_echo_n "checking for use_env... " >&6; }
16078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16079/* end confdefs.h. */
16080#include <curses.h>
16081int
16082main ()
16083{
16084
16085#ifndef use_env
16086void *x=use_env
16087#endif
16088
16089 ;
16090 return 0;
16091}
16092_ACEOF
16093if ac_fn_c_try_compile "$LINENO"; then :
16094
16095$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16096
16097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16098$as_echo "yes" >&6; }
16099else
16100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16101$as_echo "no" >&6; }
16102
16103fi
16104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016105# last curses configure check
16106CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16109$as_echo "$as_me: checking for device files" >&6;}
16110
16111if test "x$cross_compiling" = xyes; then
16112 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16114$as_echo_n "checking for /dev/ptmx... " >&6; }
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16116$as_echo "not set" >&6; }
16117 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16118 fi
16119 if test "${ac_cv_file__dev_ptc+set}" != set; then
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16121$as_echo_n "checking for /dev/ptc... " >&6; }
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16123$as_echo "not set" >&6; }
16124 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16125 fi
16126fi
16127
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16129$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016130if ${ac_cv_file__dev_ptmx+:} false; then :
16131 $as_echo_n "(cached) " >&6
16132else
16133 test "$cross_compiling" = yes &&
16134 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16135if test -r "/dev/ptmx"; then
16136 ac_cv_file__dev_ptmx=yes
16137else
16138 ac_cv_file__dev_ptmx=no
16139fi
16140fi
16141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16142$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16143if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016144
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016145fi
16146
16147if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016150
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16153$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016154if ${ac_cv_file__dev_ptc+:} false; then :
16155 $as_echo_n "(cached) " >&6
16156else
16157 test "$cross_compiling" = yes &&
16158 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16159if test -r "/dev/ptc"; then
16160 ac_cv_file__dev_ptc=yes
16161else
16162 ac_cv_file__dev_ptc=no
16163fi
16164fi
16165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16166$as_echo "$ac_cv_file__dev_ptc" >&6; }
16167if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016168
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016169fi
16170
16171if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016172
Matthias Kloseb9621712010-04-24 17:59:49 +000016173$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016174
Neal Norwitz865400f2003-03-21 01:42:58 +000016175fi
16176
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016177if test $ac_sys_system = Darwin
16178then
16179 LIBS="$LIBS -framework CoreFoundation"
16180fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016181
Matthias Kloseb9621712010-04-24 17:59:49 +000016182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16183$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016184if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016186else
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016188 ac_cv_have_size_t_format="cross -- assuming yes"
16189
Thomas Wouters477c8d52006-05-27 19:21:47 +000016190else
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016192/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016193
Thomas Wouters477c8d52006-05-27 19:21:47 +000016194#include <stdio.h>
16195#include <stddef.h>
16196#include <string.h>
16197
Christian Heimes2c181612007-12-17 20:04:13 +000016198#ifdef HAVE_SYS_TYPES_H
16199#include <sys/types.h>
16200#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016201
16202#ifdef HAVE_SSIZE_T
16203typedef ssize_t Py_ssize_t;
16204#elif SIZEOF_VOID_P == SIZEOF_LONG
16205typedef long Py_ssize_t;
16206#else
16207typedef int Py_ssize_t;
16208#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016209
Christian Heimes2c181612007-12-17 20:04:13 +000016210int main()
16211{
16212 char buffer[256];
16213
Thomas Wouters477c8d52006-05-27 19:21:47 +000016214 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16215 return 1;
16216
Thomas Wouters89f507f2006-12-13 04:49:30 +000016217 if (strcmp(buffer, "123"))
16218 return 1;
16219
16220 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16221 return 1;
16222
16223 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016224 return 1;
16225
16226 return 0;
16227}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016228
Thomas Wouters477c8d52006-05-27 19:21:47 +000016229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016230if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016231 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016232else
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016237fi
16238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16241$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016242if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016245
16246fi
16247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016249#ifdef HAVE_SYS_TYPES_H
16250#include <sys/types.h>
16251#endif
16252#ifdef HAVE_SYS_SOCKET_H
16253#include <sys/socket.h>
16254#endif
16255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256"
Victor Stinnere0be4232011-10-25 13:06:09 +020016257if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016258
Martin v. Löwis11437992002-04-12 09:54:03 +000016259else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016260
Matthias Kloseb9621712010-04-24 17:59:49 +000016261$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016262
16263fi
16264
Michael W. Hudson54241132001-12-07 15:38:26 +000016265
Matthias Kloseb9621712010-04-24 17:59:49 +000016266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16267$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016268if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016269 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016270else
Matthias Kloseb9621712010-04-24 17:59:49 +000016271 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016272 ac_cv_broken_mbstowcs=no
16273else
Matthias Kloseb9621712010-04-24 17:59:49 +000016274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016275/* end confdefs.h. */
16276
Stefan Krah19c21392012-11-22 23:47:32 +010016277#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016278#include<stdlib.h>
16279int main() {
16280 size_t len = -1;
16281 const char *str = "text";
16282 len = mbstowcs(NULL, str, 0);
16283 return (len != 4);
16284}
16285
16286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016287if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016288 ac_cv_broken_mbstowcs=no
16289else
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16293 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016294fi
16295
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016296fi
16297
Matthias Kloseb9621712010-04-24 17:59:49 +000016298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16299$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016300if test "$ac_cv_broken_mbstowcs" = yes
16301then
16302
Matthias Kloseb9621712010-04-24 17:59:49 +000016303$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016304
16305fi
16306
Antoine Pitroub52ec782009-01-25 16:34:23 +000016307# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16309$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016310
16311# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016312if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016313 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016314if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016315then
16316
Matthias Kloseb9621712010-04-24 17:59:49 +000016317$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016318
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16320$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016321fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016322if test "$withval" = no
16323then
16324
16325$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16326
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16328$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016329fi
16330
Antoine Pitrou042b1282010-08-13 21:15:58 +000016331else
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16333$as_echo "no value specified" >&6; }
16334fi
16335
Antoine Pitroub52ec782009-01-25 16:34:23 +000016336
Matthias Kloseb17289e2012-03-15 19:51:34 +010016337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16338$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16339if ${ac_cv_computed_gotos+:} false; then :
16340 $as_echo_n "(cached) " >&6
16341else
16342 if test "$cross_compiling" = yes; then :
16343 if test "${with_computed_gotos+set}" = set; then
16344 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16345 else
16346 ac_cv_computed_gotos=no
16347 fi
16348else
16349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16350/* end confdefs.h. */
16351
16352int main(int argc, char **argv)
16353{
16354 static void *targets[1] = { &&LABEL1 };
16355 goto LABEL2;
16356LABEL1:
16357 return 0;
16358LABEL2:
16359 goto *targets[0];
16360 return 1;
16361}
16362
16363_ACEOF
16364if ac_fn_c_try_run "$LINENO"; then :
16365 ac_cv_computed_gotos=yes
16366else
16367 ac_cv_computed_gotos=no
16368fi
16369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16370 conftest.$ac_objext conftest.beam conftest.$ac_ext
16371fi
16372
16373fi
16374
16375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16376$as_echo "$ac_cv_computed_gotos" >&6; }
16377case "$ac_cv_computed_gotos" in yes*)
16378
16379$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16380
16381esac
16382
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016383case $ac_sys_system in
16384AIX*)
16385
16386$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16387 ;;
16388esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016389
Michael W. Hudson54241132001-12-07 15:38:26 +000016390
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016391
16392
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016393for h in `(cd $srcdir;echo Python/thread_*.h)`
16394do
16395 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16396done
16397
Michael W. Hudson54241132001-12-07 15:38:26 +000016398
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016399SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16401$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016402for dir in $SRCDIRS; do
16403 if test ! -d $dir; then
16404 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016405 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016406done
Matthias Kloseb9621712010-04-24 17:59:49 +000016407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16408$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016409
Stefan Krah1919b7e2012-03-21 18:25:23 +010016410# Availability of -O2:
16411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16412$as_echo_n "checking for -O2... " >&6; }
16413saved_cflags="$CFLAGS"
16414CFLAGS="-O2"
16415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16416/* end confdefs.h. */
16417
16418int
16419main ()
16420{
16421
16422
16423 ;
16424 return 0;
16425}
16426_ACEOF
16427if ac_fn_c_try_compile "$LINENO"; then :
16428 have_O2=yes
16429else
16430 have_O2=no
16431fi
16432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16434$as_echo "$have_O2" >&6; }
16435CFLAGS="$saved_cflags"
16436
16437# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16438# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16440$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16441saved_cflags="$CFLAGS"
16442CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16443if test "$have_O2" = no; then
16444 CFLAGS=""
16445fi
16446if test "$cross_compiling" = yes; then :
16447 have_glibc_memmove_bug=undefined
16448else
16449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450/* end confdefs.h. */
16451
16452#include <stdio.h>
16453#include <stdlib.h>
16454#include <string.h>
16455void foo(void *p, void *q) { memmove(p, q, 19); }
16456int main() {
16457 char a[32] = "123456789000000000";
16458 foo(&a[9], a);
16459 if (strcmp(a, "123456789123456789000000000") != 0)
16460 return 1;
16461 foo(a, &a[9]);
16462 if (strcmp(a, "123456789000000000") != 0)
16463 return 1;
16464 return 0;
16465}
16466
16467_ACEOF
16468if ac_fn_c_try_run "$LINENO"; then :
16469 have_glibc_memmove_bug=no
16470else
16471 have_glibc_memmove_bug=yes
16472fi
16473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16474 conftest.$ac_objext conftest.beam conftest.$ac_ext
16475fi
16476
16477CFLAGS="$saved_cflags"
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16479$as_echo "$have_glibc_memmove_bug" >&6; }
16480if test "$have_glibc_memmove_bug" = yes; then
16481
16482$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16483
16484fi
16485
16486if test "$have_gcc_asm_for_x87" = yes; then
16487 # Some versions of gcc miscompile inline asm:
16488 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16489 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16490 case $CC in
16491 *gcc*)
16492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16493$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16494 saved_cflags="$CFLAGS"
16495 CFLAGS="-O2"
16496 if test "$cross_compiling" = yes; then :
16497 have_ipa_pure_const_bug=undefined
16498else
16499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500/* end confdefs.h. */
16501
16502 __attribute__((noinline)) int
16503 foo(int *p) {
16504 int r;
16505 asm ( "movl \$6, (%1)\n\t"
16506 "xorl %0, %0\n\t"
16507 : "=r" (r) : "r" (p) : "memory"
16508 );
16509 return r;
16510 }
16511 int main() {
16512 int p = 8;
16513 if ((foo(&p) ? : p) != 6)
16514 return 1;
16515 return 0;
16516 }
16517
16518_ACEOF
16519if ac_fn_c_try_run "$LINENO"; then :
16520 have_ipa_pure_const_bug=no
16521else
16522 have_ipa_pure_const_bug=yes
16523fi
16524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16525 conftest.$ac_objext conftest.beam conftest.$ac_ext
16526fi
16527
16528 CFLAGS="$saved_cflags"
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16530$as_echo "$have_ipa_pure_const_bug" >&6; }
16531 if test "$have_ipa_pure_const_bug" = yes; then
16532
16533$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16534
16535 fi
16536 ;;
16537 esac
16538fi
16539
Victor Stinner4f5366e2015-01-09 02:13:19 +010016540# Check for stdatomic.h
16541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16542$as_echo_n "checking for stdatomic.h... " >&6; }
16543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16544/* end confdefs.h. */
16545
16546
16547 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016548 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016549 int main() {
16550 int loaded_value = atomic_load(&value);
16551 return 0;
16552 }
16553
16554
16555_ACEOF
16556if ac_fn_c_try_link "$LINENO"; then :
16557 have_stdatomic_h=yes
16558else
16559 have_stdatomic_h=no
16560fi
16561rm -f core conftest.err conftest.$ac_objext \
16562 conftest$ac_exeext conftest.$ac_ext
16563
16564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16565$as_echo "$have_stdatomic_h" >&6; }
16566
16567if test "$have_stdatomic_h" = yes; then
16568
16569$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16570
16571fi
16572
16573# Check for GCC >= 4.7 __atomic builtins
16574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16575$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16577/* end confdefs.h. */
16578
16579
16580 volatile int val = 1;
16581 int main() {
16582 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16583 return 0;
16584 }
16585
16586
16587_ACEOF
16588if ac_fn_c_try_link "$LINENO"; then :
16589 have_builtin_atomic=yes
16590else
16591 have_builtin_atomic=no
16592fi
16593rm -f core conftest.err conftest.$ac_objext \
16594 conftest$ac_exeext conftest.$ac_ext
16595
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16597$as_echo "$have_builtin_atomic" >&6; }
16598
16599if test "$have_builtin_atomic" = yes; then
16600
16601$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16602
16603fi
16604
Ned Deily322f5ba2013-11-21 23:01:59 -080016605# ensurepip option
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16607$as_echo_n "checking for ensurepip... " >&6; }
16608
16609# Check whether --with-ensurepip was given.
16610if test "${with_ensurepip+set}" = set; then :
16611 withval=$with_ensurepip;
16612else
16613 with_ensurepip=upgrade
16614fi
16615
16616case $with_ensurepip in #(
16617 yes|upgrade) :
16618 ENSUREPIP=upgrade ;; #(
16619 install) :
16620 ENSUREPIP=install ;; #(
16621 no) :
16622 ENSUREPIP=no ;; #(
16623 *) :
16624 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16625esac
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16627$as_echo "$ENSUREPIP" >&6; }
16628
16629
Victor Stinner35a97c02015-03-08 02:59:09 +010016630# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16632$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16634/* end confdefs.h. */
16635
16636
16637 #include <dirent.h>
16638
16639 int main() {
16640 struct dirent entry;
16641 return entry.d_type == DT_UNKNOWN;
16642 }
16643
16644
16645_ACEOF
16646if ac_fn_c_try_link "$LINENO"; then :
16647 have_dirent_d_type=yes
16648else
16649 have_dirent_d_type=no
16650fi
16651rm -f core conftest.err conftest.$ac_objext \
16652 conftest$ac_exeext conftest.$ac_ext
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16654$as_echo "$have_dirent_d_type" >&6; }
16655
16656if test "$have_dirent_d_type" = yes; then
16657
16658$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16659
16660fi
16661
Victor Stinner9eb57c52015-03-19 22:21:49 +010016662# check if the Linux getrandom() syscall is available
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16664$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666/* end confdefs.h. */
16667
16668
Victor Stinner1b80b242016-04-12 22:34:58 +020016669 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016670 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016671 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016672
16673 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016674 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016675 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016676 const int flags = GRND_NONBLOCK;
16677 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016678 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016679 return 0;
16680 }
16681
16682
16683_ACEOF
16684if ac_fn_c_try_link "$LINENO"; then :
16685 have_getrandom_syscall=yes
16686else
16687 have_getrandom_syscall=no
16688fi
16689rm -f core conftest.err conftest.$ac_objext \
16690 conftest$ac_exeext conftest.$ac_ext
16691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16692$as_echo "$have_getrandom_syscall" >&6; }
16693
16694if test "$have_getrandom_syscall" = yes; then
16695
16696$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16697
16698fi
16699
Victor Stinner3abf44e2015-09-18 15:38:37 +020016700# check if the getrandom() function is available
16701# the test was written for the Solaris function of <sys/random.h>
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16703$as_echo_n "checking for the getrandom() function... " >&6; }
16704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16705/* end confdefs.h. */
16706
16707
16708 #include <sys/random.h>
16709
16710 int main() {
16711 char buffer[1];
16712 const size_t buflen = sizeof(buffer);
16713 const int flags = 0;
16714 /* ignore the result, Python checks for ENOSYS at runtime */
16715 (void)getrandom(buffer, buflen, flags);
16716 return 0;
16717 }
16718
16719
16720_ACEOF
16721if ac_fn_c_try_link "$LINENO"; then :
16722 have_getrandom=yes
16723else
16724 have_getrandom=no
16725fi
16726rm -f core conftest.err conftest.$ac_objext \
16727 conftest$ac_exeext conftest.$ac_ext
16728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16729$as_echo "$have_getrandom" >&6; }
16730
16731if test "$have_getrandom" = yes; then
16732
16733$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16734
16735fi
16736
Christian Heimesff5be6e2018-01-20 13:19:21 +010016737# Check for usable OpenSSL
16738
16739 found=false
16740
16741# Check whether --with-openssl was given.
16742if test "${with_openssl+set}" = set; then :
16743 withval=$with_openssl;
16744 case "$withval" in
16745 "" | y | ye | yes | n | no)
16746 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16747 ;;
16748 *) ssldirs="$withval"
16749 ;;
16750 esac
16751
16752else
16753
16754 # if pkg-config is installed and openssl has installed a .pc file,
16755 # then use that information and don't search ssldirs
16756 if test -n "$ac_tool_prefix"; then
16757 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16758set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16760$as_echo_n "checking for $ac_word... " >&6; }
16761if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16762 $as_echo_n "(cached) " >&6
16763else
16764 if test -n "$PKG_CONFIG"; then
16765 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16766else
16767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16768for as_dir in $PATH
16769do
16770 IFS=$as_save_IFS
16771 test -z "$as_dir" && as_dir=.
16772 for ac_exec_ext in '' $ac_executable_extensions; do
16773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16774 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16776 break 2
16777 fi
16778done
16779 done
16780IFS=$as_save_IFS
16781
16782fi
16783fi
16784PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16785if test -n "$PKG_CONFIG"; then
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16787$as_echo "$PKG_CONFIG" >&6; }
16788else
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16790$as_echo "no" >&6; }
16791fi
16792
16793
16794fi
16795if test -z "$ac_cv_prog_PKG_CONFIG"; then
16796 ac_ct_PKG_CONFIG=$PKG_CONFIG
16797 # Extract the first word of "pkg-config", so it can be a program name with args.
16798set dummy pkg-config; ac_word=$2
16799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16800$as_echo_n "checking for $ac_word... " >&6; }
16801if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16802 $as_echo_n "(cached) " >&6
16803else
16804 if test -n "$ac_ct_PKG_CONFIG"; then
16805 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16806else
16807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16808for as_dir in $PATH
16809do
16810 IFS=$as_save_IFS
16811 test -z "$as_dir" && as_dir=.
16812 for ac_exec_ext in '' $ac_executable_extensions; do
16813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16814 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16816 break 2
16817 fi
16818done
16819 done
16820IFS=$as_save_IFS
16821
16822fi
16823fi
16824ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16825if test -n "$ac_ct_PKG_CONFIG"; then
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16827$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16828else
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16830$as_echo "no" >&6; }
16831fi
16832
16833 if test "x$ac_ct_PKG_CONFIG" = x; then
16834 PKG_CONFIG=""
16835 else
16836 case $cross_compiling:$ac_tool_warned in
16837yes:)
16838{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16839$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16840ac_tool_warned=yes ;;
16841esac
16842 PKG_CONFIG=$ac_ct_PKG_CONFIG
16843 fi
16844else
16845 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16846fi
16847
16848 if test x"$PKG_CONFIG" != x""; then
16849 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16850 if test $? = 0; then
16851 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16852 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16853 found=true
16854 fi
16855 fi
16856
16857 # no such luck; use some default ssldirs
16858 if ! $found; then
16859 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16860 fi
16861
16862
16863fi
16864
16865
16866
16867 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16868 # an 'openssl' subdirectory
16869
16870 if ! $found; then
16871 OPENSSL_INCLUDES=
16872 for ssldir in $ssldirs; do
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16874$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16875 if test -f "$ssldir/include/openssl/ssl.h"; then
16876 OPENSSL_INCLUDES="-I$ssldir/include"
16877 OPENSSL_LDFLAGS="-L$ssldir/lib"
16878 OPENSSL_LIBS="-lssl -lcrypto"
16879 found=true
16880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16881$as_echo "yes" >&6; }
16882 break
16883 else
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16885$as_echo "no" >&6; }
16886 fi
16887 done
16888
16889 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16890 # it will just work!
16891 fi
16892
16893 # try the preprocessor and linker with our new flags,
16894 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16895
16896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16897$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16898 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16899 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16900
16901 save_LIBS="$LIBS"
16902 save_LDFLAGS="$LDFLAGS"
16903 save_CPPFLAGS="$CPPFLAGS"
16904 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16905 LIBS="$OPENSSL_LIBS $LIBS"
16906 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908/* end confdefs.h. */
16909#include <openssl/ssl.h>
16910int
16911main ()
16912{
16913SSL_new(NULL)
16914 ;
16915 return 0;
16916}
16917_ACEOF
16918if ac_fn_c_try_link "$LINENO"; then :
16919
16920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16921$as_echo "yes" >&6; }
16922 have_openssl=yes
16923
16924else
16925
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16927$as_echo "no" >&6; }
16928 have_openssl=no
16929
16930fi
16931rm -f core conftest.err conftest.$ac_objext \
16932 conftest$ac_exeext conftest.$ac_ext
16933 CPPFLAGS="$save_CPPFLAGS"
16934 LDFLAGS="$save_LDFLAGS"
16935 LIBS="$save_LIBS"
16936
16937
16938
16939
16940
16941
16942if test "$have_openssl" = yes; then
16943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16944$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16945
16946 save_LIBS="$LIBS"
16947 save_LDFLAGS="$LDFLAGS"
16948 save_CPPFLAGS="$CPPFLAGS"
16949 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16950 LIBS="$OPENSSL_LIBS $LIBS"
16951 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16952
16953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16954/* end confdefs.h. */
16955
16956 #include <openssl/x509_vfy.h>
16957
16958int
16959main ()
16960{
16961
16962 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16963 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16964 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16965 X509_VERIFY_PARAM_set_hostflags(p, 0);
16966
16967 ;
16968 return 0;
16969}
16970
16971_ACEOF
16972if ac_fn_c_try_link "$LINENO"; then :
16973
16974 ac_cv_has_x509_verify_param_set1_host=yes
16975
16976else
16977
16978 ac_cv_has_x509_verify_param_set1_host=no
16979
16980fi
16981rm -f core conftest.err conftest.$ac_objext \
16982 conftest$ac_exeext conftest.$ac_ext
16983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16984$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16985 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16986
16987$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16988
16989 fi
16990
16991 CPPFLAGS="$save_CPPFLAGS"
16992 LDFLAGS="$save_LDFLAGS"
16993 LIBS="$save_LIBS"
16994fi
16995
Christian Heimes892d66e2018-01-29 14:10:18 +010016996# ssl module default cipher suite string
16997
16998
16999
17000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17001$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17002
17003# Check whether --with-ssl-default-suites was given.
17004if test "${with_ssl_default_suites+set}" = set; then :
17005 withval=$with_ssl_default_suites;
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17007$as_echo "$withval" >&6; }
17008case "$withval" in
17009 python)
17010 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17011
17012 ;;
17013 openssl)
17014 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17015
17016 ;;
17017 *)
17018 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17019
17020 cat >>confdefs.h <<_ACEOF
17021#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17022_ACEOF
17023
17024 ;;
17025esac
17026
17027else
17028
17029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17030$as_echo "python" >&6; }
17031$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17032
17033
17034fi
17035
17036
17037
Guido van Rossum627b2d71993-12-24 10:39:16 +000017038# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017039ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017040
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017041ac_config_files="$ac_config_files Modules/ld_so_aix"
17042
Martin v. Löwis11437992002-04-12 09:54:03 +000017043cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017044# This file is a shell script that caches the results of configure
17045# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017046# scripts and configure runs, see configure's option --config-cache.
17047# It is not useful on other systems. If it contains results you don't
17048# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017049#
Martin v. Löwis11437992002-04-12 09:54:03 +000017050# config.status only pays attention to the cache file if you give it
17051# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017052#
Skip Montanaro6dead952003-09-25 14:50:04 +000017053# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017054# loading this file, other *unset* `ac_cv_foo' will be assigned the
17055# following values.
17056
17057_ACEOF
17058
Guido van Rossumf78abae1997-01-21 22:02:36 +000017059# The following way of writing the cache mishandles newlines in values,
17060# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017062# Ultrix sh set writes to stderr and can't be redirected directly,
17063# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064(
17065 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17066 eval ac_val=\$$ac_var
17067 case $ac_val in #(
17068 *${as_nl}*)
17069 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17071$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072 esac
17073 case $ac_var in #(
17074 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017075 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17076 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 esac ;;
17078 esac
17079 done
17080
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17083 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017084 # `set' does not quote correctly, so add quotes: double-quote
17085 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017087 "s/'/'\\\\''/g;
17088 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017089 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017090 *)
17091 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 esac |
17095 sort
17096) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017099 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017100 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17102 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17104 :end' >>confcache
17105if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17106 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017107 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017108 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17109$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017110 if test ! -f "$cache_file" || test -h "$cache_file"; then
17111 cat confcache >"$cache_file"
17112 else
17113 case $cache_file in #(
17114 */* | ?:*)
17115 mv -f confcache "$cache_file"$$ &&
17116 mv -f "$cache_file"$$ "$cache_file" ;; #(
17117 *)
17118 mv -f confcache "$cache_file" ;;
17119 esac
17120 fi
17121 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017122 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17124$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017125 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017126fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017127rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017128
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017129test "x$prefix" = xNONE && prefix=$ac_default_prefix
17130# Let make expand exec_prefix.
17131test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017132
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017133DEFS=-DHAVE_CONFIG_H
17134
Skip Montanaro6dead952003-09-25 14:50:04 +000017135ac_libobjs=
17136ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017137U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017138for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17139 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17143 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017144 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17145 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017146done
17147LIBOBJS=$ac_libobjs
17148
17149LTLIBOBJS=$ac_ltlibobjs
17150
17151
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
Matthias Kloseb9621712010-04-24 17:59:49 +000017153
Victor Stinnere0be4232011-10-25 13:06:09 +020017154: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017155ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017156ac_clean_files_save=$ac_clean_files
17157ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017158{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17159$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17160as_write_fail=0
17161cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017162#! $SHELL
17163# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017164# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017165# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017166# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017169ac_cs_recheck=false
17170ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017171
Matthias Kloseb9621712010-04-24 17:59:49 +000017172SHELL=\${CONFIG_SHELL-$SHELL}
17173export SHELL
17174_ASEOF
17175cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17176## -------------------- ##
17177## M4sh Initialization. ##
17178## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180# Be more Bourne compatible
17181DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017182if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017183 emulate sh
17184 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017185 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017186 # is contrary to our usage. Disable this feature.
17187 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017189else
Matthias Kloseb9621712010-04-24 17:59:49 +000017190 case `(set -o) 2>/dev/null` in #(
17191 *posix*) :
17192 set -o posix ;; #(
17193 *) :
17194 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017196fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017197
17198
Matthias Kloseb9621712010-04-24 17:59:49 +000017199as_nl='
17200'
17201export as_nl
17202# Printing a long string crashes Solaris 7 /usr/bin/printf.
17203as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17204as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17205as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17206# Prefer a ksh shell builtin over an external printf program on Solaris,
17207# but without wasting forks for bash or zsh.
17208if test -z "$BASH_VERSION$ZSH_VERSION" \
17209 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17210 as_echo='print -r --'
17211 as_echo_n='print -rn --'
17212elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17213 as_echo='printf %s\n'
17214 as_echo_n='printf %s'
17215else
17216 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17217 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17218 as_echo_n='/usr/ucb/echo -n'
17219 else
17220 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17221 as_echo_n_body='eval
17222 arg=$1;
17223 case $arg in #(
17224 *"$as_nl"*)
17225 expr "X$arg" : "X\\(.*\\)$as_nl";
17226 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17227 esac;
17228 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17229 '
17230 export as_echo_n_body
17231 as_echo_n='sh -c $as_echo_n_body as_echo'
17232 fi
17233 export as_echo_body
17234 as_echo='sh -c $as_echo_body as_echo'
17235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017236
17237# The user is always right.
17238if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017239 PATH_SEPARATOR=:
17240 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17241 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17242 PATH_SEPARATOR=';'
17243 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246
17247# IFS
17248# We need space, tab and new line, in precisely that order. Quoting is
17249# there to prevent editors from complaining about space-tab.
17250# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17251# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252IFS=" "" $as_nl"
17253
17254# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017255as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017256case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 *[\\/]* ) as_myself=$0 ;;
17258 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017259for as_dir in $PATH
17260do
17261 IFS=$as_save_IFS
17262 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17264 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267 ;;
17268esac
17269# We did not find ourselves, most probably we were run as `sh COMMAND'
17270# in which case we are not to be found in the path.
17271if test "x$as_myself" = x; then
17272 as_myself=$0
17273fi
17274if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17276 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277fi
17278
Matthias Kloseb9621712010-04-24 17:59:49 +000017279# Unset variables that we do not need and which cause bugs (e.g. in
17280# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17281# suppresses any "Segmentation fault" message there. '((' could
17282# trigger a bug in pdksh 5.2.14.
17283for as_var in BASH_ENV ENV MAIL MAILPATH
17284do eval test x\${$as_var+set} = xset \
17285 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286done
17287PS1='$ '
17288PS2='> '
17289PS4='+ '
17290
17291# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017292LC_ALL=C
17293export LC_ALL
17294LANGUAGE=C
17295export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296
Matthias Kloseb9621712010-04-24 17:59:49 +000017297# CDPATH.
17298(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17299
17300
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017301# as_fn_error STATUS ERROR [LINENO LOG_FD]
17302# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017303# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17304# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017305# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017306as_fn_error ()
17307{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017308 as_status=$1; test $as_status -eq 0 && as_status=1
17309 if test "$4"; then
17310 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17311 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017312 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017313 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017314 as_fn_exit $as_status
17315} # as_fn_error
17316
17317
17318# as_fn_set_status STATUS
17319# -----------------------
17320# Set $? to STATUS, without forking.
17321as_fn_set_status ()
17322{
17323 return $1
17324} # as_fn_set_status
17325
17326# as_fn_exit STATUS
17327# -----------------
17328# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17329as_fn_exit ()
17330{
17331 set +e
17332 as_fn_set_status $1
17333 exit $1
17334} # as_fn_exit
17335
17336# as_fn_unset VAR
17337# ---------------
17338# Portably unset VAR.
17339as_fn_unset ()
17340{
17341 { eval $1=; unset $1;}
17342}
17343as_unset=as_fn_unset
17344# as_fn_append VAR VALUE
17345# ----------------------
17346# Append the text in VALUE to the end of the definition contained in VAR. Take
17347# advantage of any shell optimizations that allow amortized linear growth over
17348# repeated appends, instead of the typical quadratic growth present in naive
17349# implementations.
17350if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17351 eval 'as_fn_append ()
17352 {
17353 eval $1+=\$2
17354 }'
17355else
17356 as_fn_append ()
17357 {
17358 eval $1=\$$1\$2
17359 }
17360fi # as_fn_append
17361
17362# as_fn_arith ARG...
17363# ------------------
17364# Perform arithmetic evaluation on the ARGs, and store the result in the
17365# global $as_val. Take advantage of shells that can avoid forks. The arguments
17366# must be portable across $(()) and expr.
17367if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17368 eval 'as_fn_arith ()
17369 {
17370 as_val=$(( $* ))
17371 }'
17372else
17373 as_fn_arith ()
17374 {
17375 as_val=`expr "$@" || test $? -eq 1`
17376 }
17377fi # as_fn_arith
17378
17379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380if expr a : '\(a\)' >/dev/null 2>&1 &&
17381 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17382 as_expr=expr
17383else
17384 as_expr=false
17385fi
17386
17387if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17388 as_basename=basename
17389else
17390 as_basename=false
17391fi
17392
Matthias Kloseb9621712010-04-24 17:59:49 +000017393if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17394 as_dirname=dirname
17395else
17396 as_dirname=false
17397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399as_me=`$as_basename -- "$0" ||
17400$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17401 X"$0" : 'X\(//\)$' \| \
17402 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017403$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 sed '/^.*\/\([^/][^/]*\)\/*$/{
17405 s//\1/
17406 q
17407 }
17408 /^X\/\(\/\/\)$/{
17409 s//\1/
17410 q
17411 }
17412 /^X\/\(\/\).*/{
17413 s//\1/
17414 q
17415 }
17416 s/.*/./; q'`
17417
Matthias Kloseb9621712010-04-24 17:59:49 +000017418# Avoid depending upon Character Ranges.
17419as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17420as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17421as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17422as_cr_digits='0123456789'
17423as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424
17425ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017426case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017428 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017430 xy) ECHO_C='\c';;
17431 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17432 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433 esac;;
17434*)
17435 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017436esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017437
Martin v. Löwis11437992002-04-12 09:54:03 +000017438rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439if test -d conf$$.dir; then
17440 rm -f conf$$.dir/conf$$.file
17441else
17442 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017445if (echo >conf$$.file) 2>/dev/null; then
17446 if ln -s conf$$.file conf$$ 2>/dev/null; then
17447 as_ln_s='ln -s'
17448 # ... but there are two gotchas:
17449 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17450 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017451 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017453 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 elif ln conf$$.file conf$$ 2>/dev/null; then
17455 as_ln_s=ln
17456 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017457 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017459else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017460 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17463rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017464
Matthias Kloseb9621712010-04-24 17:59:49 +000017465
17466# as_fn_mkdir_p
17467# -------------
17468# Create "$as_dir" as a directory, including parents if necessary.
17469as_fn_mkdir_p ()
17470{
17471
17472 case $as_dir in #(
17473 -*) as_dir=./$as_dir;;
17474 esac
17475 test -d "$as_dir" || eval $as_mkdir_p || {
17476 as_dirs=
17477 while :; do
17478 case $as_dir in #(
17479 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17480 *) as_qdir=$as_dir;;
17481 esac
17482 as_dirs="'$as_qdir' $as_dirs"
17483 as_dir=`$as_dirname -- "$as_dir" ||
17484$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17485 X"$as_dir" : 'X\(//\)[^/]' \| \
17486 X"$as_dir" : 'X\(//\)$' \| \
17487 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17488$as_echo X"$as_dir" |
17489 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17490 s//\1/
17491 q
17492 }
17493 /^X\(\/\/\)[^/].*/{
17494 s//\1/
17495 q
17496 }
17497 /^X\(\/\/\)$/{
17498 s//\1/
17499 q
17500 }
17501 /^X\(\/\).*/{
17502 s//\1/
17503 q
17504 }
17505 s/.*/./; q'`
17506 test -d "$as_dir" && break
17507 done
17508 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017509 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017510
17511
17512} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017513if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017515else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017516 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017517 as_mkdir_p=false
17518fi
17519
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017520
17521# as_fn_executable_p FILE
17522# -----------------------
17523# Test if FILE is an executable regular file.
17524as_fn_executable_p ()
17525{
17526 test -f "$1" && test -x "$1"
17527} # as_fn_executable_p
17528as_test_x='test -x'
17529as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017530
17531# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017532as_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 +000017533
17534# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017535as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017536
17537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017539## ----------------------------------- ##
17540## Main body of $CONFIG_STATUS script. ##
17541## ----------------------------------- ##
17542_ASEOF
17543test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017544
Matthias Kloseb9621712010-04-24 17:59:49 +000017545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17546# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017547# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548# values after options handling.
17549ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017550This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017551generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017552
17553 CONFIG_FILES = $CONFIG_FILES
17554 CONFIG_HEADERS = $CONFIG_HEADERS
17555 CONFIG_LINKS = $CONFIG_LINKS
17556 CONFIG_COMMANDS = $CONFIG_COMMANDS
17557 $ $0 $@
17558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559on `(hostname || uname -n) 2>/dev/null | sed 1q`
17560"
17561
Martin v. Löwis11437992002-04-12 09:54:03 +000017562_ACEOF
17563
Matthias Kloseb9621712010-04-24 17:59:49 +000017564case $ac_config_files in *"
17565"*) set x $ac_config_files; shift; ac_config_files=$*;;
17566esac
17567
17568case $ac_config_headers in *"
17569"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17570esac
17571
17572
17573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017575config_files="$ac_config_files"
17576config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
Matthias Kloseb9621712010-04-24 17:59:49 +000017580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017581ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017582\`$as_me' instantiates files and other configuration actions
17583from templates according to the current configuration. Unless the files
17584and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017585
Matthias Kloseb9621712010-04-24 17:59:49 +000017586Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017587
17588 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017590 --config print configuration, then exit
17591 -q, --quiet, --silent
17592 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017593 -d, --debug don't remove temporary files
17594 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017595 --file=FILE[:TEMPLATE]
17596 instantiate the configuration file FILE
17597 --header=FILE[:TEMPLATE]
17598 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017599
17600Configuration files:
17601$config_files
17602
17603Configuration headers:
17604$config_headers
17605
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017606Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017609cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17610ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017611ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017612python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017613configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017614 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017615
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017616Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017617This config.status script is free software; the Free Software Foundation
17618gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619
17620ac_pwd='$ac_pwd'
17621srcdir='$srcdir'
17622INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017623MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017624test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017625_ACEOF
17626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17628# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017629ac_need_defaults=:
17630while test $# != 0
17631do
17632 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017633 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17635 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017636 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017638 --*=)
17639 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17640 ac_optarg=
17641 ac_shift=:
17642 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017644 ac_option=$1
17645 ac_optarg=$2
17646 ac_shift=shift
17647 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 esac
17649
Skip Montanaro6dead952003-09-25 14:50:04 +000017650 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017652 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17653 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 $as_echo "$ac_cs_version"; exit ;;
17656 --config | --confi | --conf | --con | --co | --c )
17657 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 debug=: ;;
17660 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017661 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017662 case $ac_optarg in
17663 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017664 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017665 esac
17666 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 ac_need_defaults=false;;
17668 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017669 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017670 case $ac_optarg in
17671 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17672 esac
17673 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 --he | --h)
17676 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017677 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017678Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017680 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017681 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17682 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17683 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017684
17685 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017686 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017687Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017688
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017691
17692 esac
17693 shift
17694done
17695
Skip Montanaro6dead952003-09-25 14:50:04 +000017696ac_configure_extra_args=
17697
17698if $ac_cs_silent; then
17699 exec 6>/dev/null
17700 ac_configure_extra_args="$ac_configure_extra_args --silent"
17701fi
17702
17703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017705if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017706 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 shift
17708 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17709 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017712fi
17713
Martin v. Löwis11437992002-04-12 09:54:03 +000017714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716exec 5>>config.log
17717{
17718 echo
17719 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17720## Running $as_me. ##
17721_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017728
Matthias Kloseb9621712010-04-24 17:59:49 +000017729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730
17731# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017732for ac_config_target in $ac_config_targets
17733do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 case $ac_config_target in
17735 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17736 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17737 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017738 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17739 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017741 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017742 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017743 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744
Victor Stinnere0be4232011-10-25 13:06:09 +020017745 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 esac
17747done
17748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
Martin v. Löwis11437992002-04-12 09:54:03 +000017750# If the user did not use the arguments to specify the items to instantiate,
17751# then the envvar interface is used. Set only those that are not.
17752# We use the long form for the default assignment because of an extremely
17753# bizarre bug on SunOS 4.1.3.
17754if $ac_need_defaults; then
17755 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17756 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17757fi
17758
Skip Montanaro6dead952003-09-25 14:50:04 +000017759# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017761# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762# Hook for its removal unless debugging.
17763# Note that there is a small window in which the directory will not be cleaned:
17764# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017765$debug ||
17766{
Victor Stinnere0be4232011-10-25 13:06:09 +020017767 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017769 : "${ac_tmp:=$tmp}"
17770 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017773}
Martin v. Löwis11437992002-04-12 09:54:03 +000017774# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017778 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017779} ||
17780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781 tmp=./conf$$-$RANDOM
17782 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017783} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017784ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017785
Matthias Kloseb9621712010-04-24 17:59:49 +000017786# Set up the scripts for CONFIG_FILES section.
17787# No need to generate them if there are no CONFIG_FILES.
17788# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
Matthias Kloseb9621712010-04-24 17:59:49 +000017791
17792ac_cr=`echo X | tr X '\015'`
17793# On cygwin, bash can eat \r inside `` if the user requested igncr.
17794# But we know of no other shell where ac_cr would be empty at this
17795# point, so we can use a bashism as a fallback.
17796if test "x$ac_cr" = x; then
17797 eval ac_cr=\$\'\\r\'
17798fi
17799ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17800if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017801 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017802else
17803 ac_cs_awk_cr=$ac_cr
17804fi
17805
Victor Stinnere0be4232011-10-25 13:06:09 +020017806echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017807_ACEOF
17808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809
Matthias Kloseb9621712010-04-24 17:59:49 +000017810{
17811 echo "cat >conf$$subs.awk <<_ACEOF" &&
17812 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17813 echo "_ACEOF"
17814} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017815 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17816ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817ac_delim='%!_!# '
17818for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017820 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17823 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824 break
17825 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 else
17828 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830done
Matthias Kloseb9621712010-04-24 17:59:49 +000017831rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832
Matthias Kloseb9621712010-04-24 17:59:49 +000017833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017834cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017836sed -n '
17837h
17838s/^/S["/; s/!.*/"]=/
17839p
17840g
17841s/^[^!]*!//
17842:repl
17843t repl
17844s/'"$ac_delim"'$//
17845t delim
17846:nl
17847h
17848s/\(.\{148\}\)..*/\1/
17849t more1
17850s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17851p
17852n
17853b repl
17854:more1
17855s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17856p
17857g
17858s/.\{148\}//
17859t nl
17860:delim
17861h
17862s/\(.\{148\}\)..*/\1/
17863t more2
17864s/["\\]/\\&/g; s/^/"/; s/$/"/
17865p
17866b
17867:more2
17868s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17869p
17870g
17871s/.\{148\}//
17872t delim
17873' <conf$$subs.awk | sed '
17874/^[^""]/{
17875 N
17876 s/\n//
17877}
17878' >>$CONFIG_STATUS || ac_write_fail=1
17879rm -f conf$$subs.awk
17880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17881_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017882cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 for (key in S) S_is_set[key] = 1
17884 FS = ""
17885
17886}
17887{
17888 line = $ 0
17889 nfields = split(line, field, "@")
17890 substed = 0
17891 len = length(field[1])
17892 for (i = 2; i < nfields; i++) {
17893 key = field[i]
17894 keylen = length(key)
17895 if (S_is_set[key]) {
17896 value = S[key]
17897 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17898 len += length(value) + length(field[++i])
17899 substed = 1
17900 } else
17901 len += 1 + keylen
17902 }
17903
17904 print line
17905}
17906
17907_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017909cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17910if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17911 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17912else
17913 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017914fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017915 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017916_ACEOF
17917
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017918# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17919# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920# trailing colons and then remove the whole line if VPATH becomes empty
17921# (actually we leave an empty line to preserve line numbers).
17922if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17924h
17925s///
17926s/^/:/
17927s/[ ]*$/:/
17928s/:\$(srcdir):/:/g
17929s/:\${srcdir}:/:/g
17930s/:@srcdir@:/:/g
17931s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933x
17934s/\(=[ ]*\).*/\1/
17935G
17936s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937s/^[^=]*=[ ]*$//
17938}'
17939fi
17940
Matthias Kloseb9621712010-04-24 17:59:49 +000017941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017942fi # test -n "$CONFIG_FILES"
17943
Matthias Kloseb9621712010-04-24 17:59:49 +000017944# Set up the scripts for CONFIG_HEADERS section.
17945# No need to generate them if there are no CONFIG_HEADERS.
17946# This happens for instance with `./config.status Makefile'.
17947if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017948cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017949BEGIN {
17950_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951
Matthias Kloseb9621712010-04-24 17:59:49 +000017952# Transform confdefs.h into an awk script `defines.awk', embedded as
17953# here-document in config.status, that substitutes the proper values into
17954# config.h.in to produce config.h.
17955
17956# Create a delimiter string that does not exist in confdefs.h, to ease
17957# handling of long lines.
17958ac_delim='%!_!# '
17959for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017960 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17961 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 break
17963 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017964 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 else
17966 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17967 fi
17968done
17969
17970# For the awk script, D is an array of macro values keyed by name,
17971# likewise P contains macro parameters if any. Preserve backslash
17972# newline sequences.
17973
17974ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17975sed -n '
17976s/.\{148\}/&'"$ac_delim"'/g
17977t rset
17978:rset
17979s/^[ ]*#[ ]*define[ ][ ]*/ /
17980t def
17981d
17982:def
17983s/\\$//
17984t bsnl
17985s/["\\]/\\&/g
17986s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17987D["\1"]=" \3"/p
17988s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17989d
17990:bsnl
17991s/["\\]/\\&/g
17992s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17993D["\1"]=" \3\\\\\\n"\\/p
17994t cont
17995s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17996t cont
17997d
17998:cont
17999n
18000s/.\{148\}/&'"$ac_delim"'/g
18001t clear
18002:clear
18003s/\\$//
18004t bsnlc
18005s/["\\]/\\&/g; s/^/"/; s/$/"/p
18006d
18007:bsnlc
18008s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18009b cont
18010' <confdefs.h | sed '
18011s/'"$ac_delim"'/"\\\
18012"/g' >>$CONFIG_STATUS || ac_write_fail=1
18013
18014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18015 for (key in D) D_is_set[key] = 1
18016 FS = ""
18017}
18018/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18019 line = \$ 0
18020 split(line, arg, " ")
18021 if (arg[1] == "#") {
18022 defundef = arg[2]
18023 mac1 = arg[3]
18024 } else {
18025 defundef = substr(arg[1], 2)
18026 mac1 = arg[2]
18027 }
18028 split(mac1, mac2, "(") #)
18029 macro = mac2[1]
18030 prefix = substr(line, 1, index(line, defundef) - 1)
18031 if (D_is_set[macro]) {
18032 # Preserve the white space surrounding the "#".
18033 print prefix "define", macro P[macro] D[macro]
18034 next
18035 } else {
18036 # Replace #undef with comments. This is necessary, for example,
18037 # in the case of _POSIX_SOURCE, which is predefined and required
18038 # on some systems where configure will not decide to define it.
18039 if (defundef == "undef") {
18040 print "/*", prefix defundef, macro, "*/"
18041 next
18042 }
18043 }
18044}
18045{ print }
18046_ACAWK
18047_ACEOF
18048cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018049 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018050fi # test -n "$CONFIG_HEADERS"
18051
18052
18053eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18054shift
18055for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056do
18057 case $ac_tag in
18058 :[FHLC]) ac_mode=$ac_tag; continue;;
18059 esac
18060 case $ac_mode$ac_tag in
18061 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018062 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 :[FH]-) ac_tag=-:-;;
18064 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18065 esac
18066 ac_save_IFS=$IFS
18067 IFS=:
18068 set x $ac_tag
18069 IFS=$ac_save_IFS
18070 shift
18071 ac_file=$1
18072 shift
18073
18074 case $ac_mode in
18075 :L) ac_source=$1;;
18076 :[FH])
18077 ac_file_inputs=
18078 for ac_f
18079 do
18080 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018081 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 *) # Look for the file first in the build tree, then in the source tree
18083 # (if the path is not absolute). The absolute path cannot be DOS-style,
18084 # because $ac_f cannot contain `:'.
18085 test -f "$ac_f" ||
18086 case $ac_f in
18087 [\\/$]*) false;;
18088 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18089 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018090 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018092 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18093 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094 done
18095
18096 # Let's still pretend it is `configure' which instantiates (i.e., don't
18097 # use $as_me), people would be surprised to read:
18098 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018099 configure_input='Generated from '`
18100 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18101 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102 if test x"$ac_file" != x-; then
18103 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018104 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18105$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018107 # Neutralize special characters interpreted by sed in replacement strings.
18108 case $configure_input in #(
18109 *\&* | *\|* | *\\* )
18110 ac_sed_conf_input=`$as_echo "$configure_input" |
18111 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18112 *) ac_sed_conf_input=$configure_input;;
18113 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114
18115 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018116 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18117 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118 esac
18119 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 esac
18121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018123$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018124 X"$ac_file" : 'X\(//\)[^/]' \| \
18125 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018127$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18129 s//\1/
18130 q
18131 }
18132 /^X\(\/\/\)[^/].*/{
18133 s//\1/
18134 q
18135 }
18136 /^X\(\/\/\)$/{
18137 s//\1/
18138 q
18139 }
18140 /^X\(\/\).*/{
18141 s//\1/
18142 q
18143 }
18144 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018145 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_builddir=.
18147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148case "$ac_dir" in
18149.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18150*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018151 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018153 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 case $ac_top_builddir_sub in
18155 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18156 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18157 esac ;;
18158esac
18159ac_abs_top_builddir=$ac_pwd
18160ac_abs_builddir=$ac_pwd$ac_dir_suffix
18161# for backward compatibility:
18162ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018163
18164case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167 ac_top_srcdir=$ac_top_builddir_sub
18168 ac_abs_top_srcdir=$ac_pwd ;;
18169 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018170 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 ac_top_srcdir=$srcdir
18172 ac_abs_top_srcdir=$srcdir ;;
18173 *) # Relative name.
18174 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18175 ac_top_srcdir=$ac_top_build_prefix$srcdir
18176 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018177esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018179
Martin v. Löwis11437992002-04-12 09:54:03 +000018180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181 case $ac_mode in
18182 :F)
18183 #
18184 # CONFIG_FILE
18185 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018186
18187 case $INSTALL in
18188 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018191 ac_MKDIR_P=$MKDIR_P
18192 case $MKDIR_P in
18193 [\\/$]* | ?:[\\/]* ) ;;
18194 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18195 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018196_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197
Matthias Kloseb9621712010-04-24 17:59:49 +000018198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199# If the template does not know about datarootdir, expand it.
18200# FIXME: This hack should be removed a few years after 2.60.
18201ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018202ac_sed_dataroot='
18203/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 p
18205 q
18206}
18207/@datadir@/p
18208/@docdir@/p
18209/@infodir@/p
18210/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018211/@mandir@/p'
18212case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213*datarootdir*) ac_datarootdir_seen=yes;;
18214*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18216$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018218cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219 ac_datarootdir_hack='
18220 s&@datadir@&$datadir&g
18221 s&@docdir@&$docdir&g
18222 s&@infodir@&$infodir&g
18223 s&@localedir@&$localedir&g
18224 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226esac
18227_ACEOF
18228
18229# Neutralize VPATH when `$srcdir' = `.'.
18230# Shell code in configure.ac might set extrasub.
18231# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018232cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18233ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018234$extrasub
18235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018237:t
18238/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018239s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018240s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018241s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242s&@srcdir@&$ac_srcdir&;t t
18243s&@abs_srcdir@&$ac_abs_srcdir&;t t
18244s&@top_srcdir@&$ac_top_srcdir&;t t
18245s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18246s&@builddir@&$ac_builddir&;t t
18247s&@abs_builddir@&$ac_abs_builddir&;t t
18248s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18249s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018250s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018252"
Victor Stinnere0be4232011-10-25 13:06:09 +020018253eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18254 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018257 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18258 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18259 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018261which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018262$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018263which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018264
Victor Stinnere0be4232011-10-25 13:06:09 +020018265 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018266 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018267 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18268 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018269 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018270 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271 ;;
18272 :H)
18273 #
18274 # CONFIG_HEADER
18275 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018276 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018277 {
18278 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018279 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18280 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018282 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018283 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18284$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018286 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018287 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018288 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 fi
18290 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018291 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018292 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018293 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018294 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297
18298 esac
18299
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018300
18301 case $ac_file$ac_mode in
18302 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18303
18304 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305done # for ac_tag
18306
Guido van Rossum627b2d71993-12-24 10:39:16 +000018307
Matthias Kloseb9621712010-04-24 17:59:49 +000018308as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018309_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018310ac_clean_files=$ac_clean_files_save
18311
Matthias Kloseb9621712010-04-24 17:59:49 +000018312test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018313 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018314
Martin v. Löwis11437992002-04-12 09:54:03 +000018315
18316# configure is writing to config.log, and then calls config.status.
18317# config.status does its own redirection, appending to config.log.
18318# Unfortunately, on DOS this fails, as config.log is still kept open
18319# by configure, so config.status won't be able to write to it; its
18320# output is simply discarded. So we exec the FD to /dev/null,
18321# effectively closing config.log, so it can be properly (re)opened and
18322# appended to by config.status. When coming back to configure, we
18323# need to make the FD available again.
18324if test "$no_create" != yes; then
18325 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018326 ac_config_status_args=
18327 test "$silent" = yes &&
18328 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018329 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018330 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 exec 5>>config.log
18332 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18333 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018334 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018335fi
18336if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18338$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018340
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018341
Christian Heimes75ed8902013-11-20 01:11:18 +010018342echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018343if test ! -f Modules/Setup.local
18344then
18345 echo "# Edit this file for local setup changes" >Modules/Setup.local
18346fi
18347
Christian Heimes75ed8902013-11-20 01:11:18 +010018348echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018349$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018350 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018351 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018352mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018353
18354if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18355 echo "" >&6
18356 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018357 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 +000018358 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018359 echo "" >&6
18360 echo "" >&6
18361fi
18362