blob: b098bac6472a25ec64de04329d033d6fba0571e9 [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
Benjamin Peterson54016222018-05-14 21:39:22 -0700629PKG_CONFIG
Ned Deily322f5ba2013-11-21 23:01:59 -0800630ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000631SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000632THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100633LIBPL
634PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000636SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000637LIBC
638LIBM
639HAVE_GETHOSTBYNAME
640HAVE_GETHOSTBYNAME_R
641HAVE_GETHOSTBYNAME_R_3_ARG
642HAVE_GETHOSTBYNAME_R_5_ARG
643HAVE_GETHOSTBYNAME_R_6_ARG
644LIBOBJS
645TRUE
646MACHDEP_OBJS
647DYNLOADFILE
648DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700649DTRACE_OBJS
650DTRACE_HEADERS
651DFLAGS
652DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000653LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000657SHLIBS
658CFLAGSFORSHARED
659LINKFORSHARED
660CCSHARED
661BLDSHARED
662LDCXXSHARED
663LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700664SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000665LIBTOOL_CRUFT
666OTHER_LIBTOOL_OPT
667UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700668CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000669BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200670CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700683DEF_MAKE_RULE
684DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000686LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100687MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000688INSTALL_DATA
689INSTALL_SCRIPT
690INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200691ac_ct_READELF
692READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000693ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200694ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000695AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696GNULD
697LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000698LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000699RUNSHARED
700INSTSONAME
701LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000702PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000703BLDLIBRARY
704DLLLIBRARY
705LDLIBRARY
706LIBRARY
707BUILDEXEEXT
708EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200709NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200710MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711PLATFORM_TRIPLET
712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700716SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717GREP
718CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000719OBJEXT
720EXEEXT
721ac_ct_CC
722CPPFLAGS
723LDFLAGS
724CFLAGS
725CC
726EXPORT_MACOSX_DEPLOYMENT_TARGET
727CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200748PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200749PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100750host_os
751host_vendor
752host_cpu
753host
754build_os
755build_vendor
756build_cpu
757build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500758HAS_GIT
759GITBRANCH
760GITTAG
761GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400762BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000763target_alias
764host_alias
765build_alias
766LIBS
767ECHO_T
768ECHO_N
769ECHO_C
770DEFS
771mandir
772localedir
773libdir
774psdir
775pdfdir
776dvidir
777htmldir
778infodir
779docdir
780oldincludedir
781includedir
Matthias Kloseddbe9762018-04-30 19:22:16 +0200782runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000783localstatedir
784sharedstatedir
785sysconfdir
786datadir
787datarootdir
788libexecdir
789sbindir
790bindir
791program_transform_name
792prefix
793exec_prefix
794PACKAGE_URL
795PACKAGE_BUGREPORT
796PACKAGE_STRING
797PACKAGE_VERSION
798PACKAGE_TARNAME
799PACKAGE_NAME
800PATH_SEPARATOR
801SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000802ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000803ac_user_opts='
804enable_option_checking
805enable_universalsdk
806with_universal_archs
807with_framework_name
808enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200814with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000815enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700816with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100817with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100818with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_libs
820with_system_expat
821with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100822with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000823enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700824with_tcltk_includes
825with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000827enable_ipv6
828with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000830with_c_locale_coercion
831with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700833with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100839with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100840with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Benjamin Peterson54016222018-05-14 21:39:22 -0700851CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852
Guido van Rossum627b2d71993-12-24 10:39:16 +0000853
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000855ac_init_help=
856ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000857ac_unrecognized_opts=
858ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# The variables have the same names as the options, with
860# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864no_recursion=
865prefix=NONE
866program_prefix=NONE
867program_suffix=NONE
868program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873x_includes=NONE
874x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876# Installation directory options.
877# These are left unexpanded so users can "make install exec_prefix=/foo"
878# and all the variables that are supposed to be based on exec_prefix
879# by default will actually change.
880# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882bindir='${exec_prefix}/bin'
883sbindir='${exec_prefix}/sbin'
884libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885datarootdir='${prefix}/share'
886datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887sysconfdir='${prefix}/etc'
888sharedstatedir='${prefix}/com'
889localstatedir='${prefix}/var'
Matthias Kloseddbe9762018-04-30 19:22:16 +0200890runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891includedir='${prefix}/include'
892oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
894infodir='${datarootdir}/info'
895htmldir='${docdir}'
896dvidir='${docdir}'
897pdfdir='${docdir}'
898psdir='${docdir}'
899libdir='${exec_prefix}/lib'
900localedir='${datarootdir}/locale'
901mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 # If the previous option needs an argument, assign it.
908 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 ac_prev=
911 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200915 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
916 *=) ac_optarg= ;;
917 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Accept the important Cygnus configure options, so we can diagnose typos.
921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_dashdash$ac_option in
923 --)
924 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 -bindir | --bindir | --bindi | --bind | --bin | --bi)
927 ac_prev=bindir ;;
928 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
931 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 -cache-file | --cache-file | --cache-fil | --cache-fi \
937 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938 ac_prev=cache_file ;;
939 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 cache_file=$ac_optarg ;;
942
943 --config-cache | -C)
944 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952 | --dataroo | --dataro | --datar)
953 ac_prev=datarootdir ;;
954 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956 datarootdir=$ac_optarg ;;
957
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973
974 -docdir | --docdir | --docdi | --doc | --do)
975 ac_prev=docdir ;;
976 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977 docdir=$ac_optarg ;;
978
979 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980 ac_prev=dvidir ;;
981 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200988 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993"enable_$ac_useropt"
994"*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002 | --exec | --exe | --ex)
1003 ac_prev=exec_prefix ;;
1004 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 # Obsolete; use --with-gas.
1011 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 -help | --help | --hel | --he | -h)
1014 ac_init_help=long ;;
1015 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016 ac_init_help=recursive ;;
1017 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001025 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026 ac_prev=htmldir ;;
1027 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028 | --ht=*)
1029 htmldir=$ac_optarg ;;
1030
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031 -includedir | --includedir | --includedi | --included | --include \
1032 | --includ | --inclu | --incl | --inc)
1033 ac_prev=includedir ;;
1034 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -infodir | --infodir | --infodi | --infod | --info | --inf)
1039 ac_prev=infodir ;;
1040 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libdir | --libdir | --libdi | --libd)
1044 ac_prev=libdir ;;
1045 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049 | --libexe | --libex | --libe)
1050 ac_prev=libexecdir ;;
1051 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001055 -localedir | --localedir | --localedi | --localed | --locale)
1056 ac_prev=localedir ;;
1057 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058 localedir=$ac_optarg ;;
1059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 ac_prev=localstatedir ;;
1063 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
1067 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068 ac_prev=mandir ;;
1069 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 # Obsolete; use --without-fp.
1074 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 no_create=yes ;;
1079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086 | --oldin | --oldi | --old | --ol | --o)
1087 ac_prev=oldincludedir ;;
1088 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094 ac_prev=prefix ;;
1095 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099 | --program-pre | --program-pr | --program-p)
1100 ac_prev=program_prefix ;;
1101 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106 | --program-suf | --program-su | --program-s)
1107 ac_prev=program_suffix ;;
1108 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-transform-name | --program-transform-name \
1113 | --program-transform-nam | --program-transform-na \
1114 | --program-transform-n | --program-transform- \
1115 | --program-transform | --program-transfor \
1116 | --program-transfo | --program-transf \
1117 | --program-trans | --program-tran \
1118 | --progr-tra | --program-tr | --program-t)
1119 ac_prev=program_transform_name ;;
1120 -program-transform-name=* | --program-transform-name=* \
1121 | --program-transform-nam=* | --program-transform-na=* \
1122 | --program-transform-n=* | --program-transform-=* \
1123 | --program-transform=* | --program-transfor=* \
1124 | --program-transfo=* | --program-transf=* \
1125 | --program-trans=* | --program-tran=* \
1126 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001129 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130 ac_prev=pdfdir ;;
1131 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132 pdfdir=$ac_optarg ;;
1133
1134 -psdir | --psdir | --psdi | --psd | --ps)
1135 ac_prev=psdir ;;
1136 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137 psdir=$ac_optarg ;;
1138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140 | -silent | --silent | --silen | --sile | --sil)
1141 silent=yes ;;
1142
Matthias Kloseddbe9762018-04-30 19:22:16 +02001143 -runstatedir | --runstatedir | --runstatedi | --runstated \
1144 | --runstate | --runstat | --runsta | --runst | --runs \
1145 | --run | --ru | --r)
1146 ac_prev=runstatedir ;;
1147 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1148 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1149 | --run=* | --ru=* | --r=*)
1150 runstatedir=$ac_optarg ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Matthias Kloseddbe9762018-04-30 19:22:16 +02001289 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001402\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Matthias Kloseddbe9762018-04-30 19:22:16 +02001442 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --libdir=DIR object code libraries [EPREFIX/lib]
1444 --includedir=DIR C header files [PREFIX/include]
1445 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1446 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1447 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1448 --infodir=DIR info documentation [DATAROOTDIR/info]
1449 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1450 --mandir=DIR man documentation [DATAROOTDIR/man]
1451 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1452 --htmldir=DIR html documentation [DOCDIR]
1453 --dvidir=DIR dvi documentation [DOCDIR]
1454 --pdfdir=DIR pdf documentation [DOCDIR]
1455 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
1457
1458 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001459
1460System types:
1461 --build=BUILD configure for building on BUILD [guessed]
1462 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001463 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465fi
1466
1467if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001469 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001470 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 cat <<\_ACEOF
1472
1473Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001477 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001478 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-framework[=INSTALLDIR]
1480 Build (MacOSX|Darwin) framework
1481 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001482 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001483 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1484 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001485 --enable-loadable-sqlite-extensions
1486 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-ipv6 Enable ipv6 (with ipv4) support
1488 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001489 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001490 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001491
1492Optional Packages:
1493 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1494 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001495 --with-universal-archs=ARCH
1496 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001497 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1498 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001499 --with-framework-name=FRAMEWORK
1500 specify an alternate name of the framework built
1501 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-cxx-main=<compiler>
1503 compile main() and link python executable with C++
1504 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-suffix=.exe set executable suffix
1506 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001507 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001508 --with-lto Enable Link Time Optimization in any build. Disabled
1509 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001510 --with-hash-algorithm=[fnv|siphash24]
1511 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001512 --with-address-sanitizer
1513 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001515 --with-system-expat build pyexpat module using an installed expat
1516 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001517 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001518 --with-system-libmpdec build _decimal module using an installed libmpdec
1519 library
Ned Deilyd819b932013-09-06 01:07:05 -07001520 --with-tcltk-includes='-I...'
1521 override search for Tcl and Tk include files
1522 --with-tcltk-libs='-L...'
1523 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001524 --with-dbmliborder=db1:db2:...
1525 order to check db backends for dbm. Valid value is a
1526 colon separated string with the backend names
1527 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001530 --with(out)-c-locale-coercion
1531 disable/enable C locale coercion to a UTF-8 based
1532 locale
1533 --with(out)-c-locale-warning
1534 disable/enable locale compatibility warning in the C
1535 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001536 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001537 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-libm=STRING math library
1539 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001540 --with(out)-computed-gotos
1541 Use computed gotos in evaluation loop (enabled by
1542 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001543 --with(out)-ensurepip=[=upgrade]
1544 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001545 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001546 --with-ssl-default-suites=[python|openssl|STRING]
1547 Override default cipher suites string, python: use
1548 Python's preferred selection (default), openssl:
1549 leave OpenSSL's defaults untouched, STRING: use a
1550 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
1562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001629python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Ned Deily5489bda2018-01-31 17:44:09 -05002338It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Christian Heimesff5be6e2018-01-20 13:19:21 +01002688
2689
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002690if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691 # If we're building out-of-tree, we need to make sure the following
2692 # resources get picked up before their $srcdir counterparts.
2693 # Objects/ -> typeslots.inc
2694 # Include/ -> Python-ast.h, graminit.h
2695 # Python/ -> importlib.h
2696 # (A side effect of this is that these resources will automatically be
2697 # regenerated when building out-of-tree, regardless of whether or not
2698 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2699 # off.)
2700 BASECPPFLAGS="-IObjects -IInclude -IPython"
2701else
2702 BASECPPFLAGS=""
2703fi
2704
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705
2706
2707
2708
Victor Stinner9ed34a82017-05-02 22:35:58 +02002709if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711# Extract the first word of "git", so it can be a program name with args.
2712set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716 $as_echo_n "(cached) " >&6
2717else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 if test -n "$HAS_GIT"; then
2719 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720else
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
2733 done
2734IFS=$as_save_IFS
2735
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737fi
2738fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739HAS_GIT=$ac_cv_prog_HAS_GIT
2740if test -n "$HAS_GIT"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2742$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
2746fi
2747
2748
2749else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753then
Ned Deily554626a2017-03-20 23:41:52 -04002754 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2755 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITVERSION=""
2759 GITTAG=""
2760 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
2762
2763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002767ac_aux_dir=
2768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2769 if test -f "$ac_dir/install-sh"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 break
2773 elif test -f "$ac_dir/install.sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 break
2777 elif test -f "$ac_dir/shtool"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/shtool install -c"
2780 break
2781 fi
2782done
2783if test -z "$ac_aux_dir"; then
2784 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2785fi
2786
2787# These three variables are undocumented and unsupported,
2788# and are intended to be withdrawn in a future Autoconf release.
2789# They can cause serious problems if a builder's source tree is in a directory
2790# whose full name contains unusual characters.
2791ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2792ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2793ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2794
2795
2796# Make sure we can run config.sub.
2797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2798 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2799
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2801$as_echo_n "checking build system type... " >&6; }
2802if ${ac_cv_build+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 ac_build_alias=$build_alias
2806test "x$ac_build_alias" = x &&
2807 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2808test "x$ac_build_alias" = x &&
2809 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2812
2813fi
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2815$as_echo "$ac_cv_build" >&6; }
2816case $ac_cv_build in
2817*-*-*) ;;
2818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2819esac
2820build=$ac_cv_build
2821ac_save_IFS=$IFS; IFS='-'
2822set x $ac_cv_build
2823shift
2824build_cpu=$1
2825build_vendor=$2
2826shift; shift
2827# Remember, the first character of IFS is used to create $*,
2828# except with old shells:
2829build_os=$*
2830IFS=$ac_save_IFS
2831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2832
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2835$as_echo_n "checking host system type... " >&6; }
2836if ${ac_cv_host+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test "x$host_alias" = x; then
2840 ac_cv_host=$ac_cv_build
2841else
2842 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2844fi
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2848$as_echo "$ac_cv_host" >&6; }
2849case $ac_cv_host in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2852esac
2853host=$ac_cv_host
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_host
2856shift
2857host_cpu=$1
2858host_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862host_os=$*
2863IFS=$ac_save_IFS
2864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2865
2866
2867
doko@python.orga10e4a92013-01-25 18:45:12 +01002868
2869
Ned Deilyfcbc2462014-08-22 13:32:49 -07002870# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2871rm -f pybuilddir.txt
2872
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873for ac_prog in python$PACKAGE_VERSION python3 python
2874do
2875 # Extract the first word of "$ac_prog", so it can be a program name with args.
2876set dummy $ac_prog; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002879if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880 $as_echo_n "(cached) " >&6
2881else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 if test -n "$PYTHON_FOR_REGEN"; then
2883 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884else
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896done
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2903if test -n "$PYTHON_FOR_REGEN"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2905$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
2917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python3 python; do
2923 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002924 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 +02002925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002934 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 +02002935 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Benjamin Petersond23f8222009-04-05 19:13:16 +00002944if test "$prefix" != "/"; then
2945 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
2950
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002951# We don't use PACKAGE_ variables, and they cause conflicts
2952# with other autoconf-based packages that include Python.h
2953grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2954rm confdefs.h
2955mv confdefs.h.new confdefs.h
2956
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002957
Ned Deily5489bda2018-01-31 17:44:09 -05002958VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002959
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002960# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002961
2962SOVERSION=1.0
2963
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964# The later defininition of _XOPEN_SOURCE disables certain features
2965# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968
2969
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975
2976
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982
2983
Martin v. Löwisd6320502004-08-12 13:45:08 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003001if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 case $enableval in
3004 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 # Locate the best usable SDK, see Mac/README.txt for more
3006 # information
3007 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003008 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3011 if test ! -d "${enableval}"
3012 then
3013 enableval=/
3014 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 ;;
3017 esac
3018 case $enableval in
3019 no)
3020 UNIVERSALSDK=
3021 enable_universalsdk=
3022 ;;
3023 *)
3024 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 if test ! -d "${UNIVERSALSDK}"
3026 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003027 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033else
3034
3035 UNIVERSALSDK=
3036 enable_universalsdk=
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040if test -n "${UNIVERSALSDK}"
3041then
Matthias Kloseb9621712010-04-24 17:59:49 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3043$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044else
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deily87adb6e2013-10-18 21:09:56 -07003051ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053# For backward compatibility reasons we prefer to select '32-bit' if available,
3054# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056if test "`uname -s`" = "Darwin"
3057then
3058 if test -n "${UNIVERSALSDK}"
3059 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003060 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061 then
3062 UNIVERSAL_ARCHS="intel"
3063 fi
3064 fi
3065fi
3066
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3069$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070
3071# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 UNIVERSAL_ARCHS="$withval"
3075
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076fi
3077
Ned Deily87adb6e2013-10-18 21:09:56 -07003078if test -n "${UNIVERSALSDK}"
3079then
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3081$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3082else
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
3085fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003087
3088# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090 withval=$with_framework_name;
3091 PYTHONFRAMEWORK=${withval}
3092 PYTHONFRAMEWORKDIR=${withval}.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3094
3095else
3096
3097 PYTHONFRAMEWORK=Python
3098 PYTHONFRAMEWORKDIR=Python.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3100
3101fi
3102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003106 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003108 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003109 esac
3110 case $enableval in
3111 no)
3112 PYTHONFRAMEWORK=
3113 PYTHONFRAMEWORKDIR=no-framework
3114 PYTHONFRAMEWORKPREFIX=
3115 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 FRAMEWORKINSTALLFIRST=
3117 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003118 FRAMEWORKALTINSTALLFIRST=
3119 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003120 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003135 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3188
3189 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3190
Jack Jansene578a632001-08-15 01:27:14 +00003191 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum563e7081996-09-10 18:20:48 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORKPREFIX=
3198 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST=
3200 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 FRAMEWORKALTINSTALLFIRST=
3202 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
3215
Michael W. Hudson54241132001-12-07 15:38:26 +00003216
3217
3218
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221
3222
3223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003225
Ned Deilyb8f944f2013-11-21 22:42:25 -08003226
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003227
3228cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003229#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230_ACEOF
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003234## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003235## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003236##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237# Set name for machine-dependent library files
3238
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3240$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241if test -z "$MACHDEP"
3242then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 # avoid using uname for cross builds
3244 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003245 # ac_sys_system and ac_sys_release are used for setting
3246 # a lot of different things including 'define_xopen_source'
3247 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003249 *-*-linux-android*)
3250 ac_sys_system=Linux-android
3251 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 *-*-linux*)
3253 ac_sys_system=Linux
3254 ;;
3255 *-*-cygwin*)
3256 ac_sys_system=Cygwin
3257 ;;
3258 *)
3259 # for now, limit cross builds to known configurations
3260 MACHDEP="unknown"
3261 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3262 esac
3263 ac_sys_release=
3264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003266 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003267 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 fi
3273 ac_md_system=`echo $ac_sys_system |
3274 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3275 ac_md_release=`echo $ac_sys_release |
3276 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3277 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003278
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003280 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003281 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003282 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3364 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3365 # identifies itself as Darwin/7.*
3366 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3367 # disables platform specific features beyond repair.
3368 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3369 # has no effect, don't bother defining them
3370 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003371 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003372 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003373 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003374 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3375 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3376 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003377 AIX/4)
3378 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003379 AIX/5)
3380 if test `uname -r` -eq 1; then
3381 define_xopen_source=no
3382 fi
3383 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003384 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3385 # defining NI_NUMERICHOST.
3386 QNX/6.3.2)
3387 define_xopen_source=no
3388 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003389
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003390esac
3391
3392if test $define_xopen_source = yes
3393then
Victor Stinner14d098d2011-09-07 22:29:43 +02003394 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
Victor Stinner14d098d2011-09-07 22:29:43 +02003396$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
3399 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3400 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3401 # several APIs are not declared. Since this is also needed in some
3402 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Matthias Kloseb9621712010-04-24 17:59:49 +00003404$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003408$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410fi
3411
Christian Heimes647cd872013-12-07 23:39:33 +01003412# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3413case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003414 hp*|HP*)
3415 define_stdc_a1=yes;;
3416 *)
3417 define_stdc_a1=no;;
3418esac
3419
3420if test $define_stdc_a1 = yes
3421then
Christian Heimes647cd872013-12-07 23:39:33 +01003422
3423$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3424
Christian Heimesb02bcae2013-12-08 15:21:08 +01003425fi
Christian Heimes647cd872013-12-07 23:39:33 +01003426
Jack Jansen6b08a402004-06-03 12:41:45 +00003427# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3428# it may influence the way we can build extensions, so distutils
3429# needs to check it
3430
Thomas Wouters477c8d52006-05-27 19:21:47 +00003431
Jack Jansen6b08a402004-06-03 12:41:45 +00003432CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003433EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003434
Guido van Rossum627b2d71993-12-24 10:39:16 +00003435# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003436
3437# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3438# for debug/optimization stuff. BASECFLAGS is for flags that are required
3439# just to get things to compile and link. Users are free to override OPT
3440# when running configure or make. The build should not break if they do.
3441# BASECFLAGS should generally not be messed with, however.
3442
Guido van Rossum8b131c51995-03-09 14:10:13 +00003443# If the user switches compilers, we can't believe the cache
3444if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3445then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003446 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003447(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003448fi
3449
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003450# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3451# when the compiler supports them, but we don't always want -O2, and
3452# we set -g later.
3453if test -z "$CFLAGS"; then
3454 CFLAGS=
3455fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003456
3457if test "$ac_sys_system" = "Darwin"
3458then
3459 # Compiler selection on MacOSX is more complicated than
3460 # AC_PROG_CC can handle, see Mac/README.txt for more
3461 # information
3462 if test -z "${CC}"
3463 then
3464 found_gcc=
3465 found_clang=
3466 as_save_IFS=$IFS; IFS=:
3467 for as_dir in $PATH
3468 do
3469 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003470 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003471 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003472 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473 fi
3474 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003475 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003476 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003477 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 fi
3479 fi
3480 done
3481 IFS=$as_save_IFS
3482
3483 if test -n "$found_gcc" -a -n "$found_clang"
3484 then
3485 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3486 then
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3488$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3489 CC="$found_clang"
3490 CXX="$found_clang++"
3491 fi
3492
3493
3494 elif test -z "$found_gcc" -a -n "$found_clang"
3495 then
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3497$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3498 CC="$found_clang"
3499 CXX="$found_clang++"
3500
3501 elif test -z "$found_gcc" -a -z "$found_clang"
3502 then
3503 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3504 if test -n "${found_clang}"
3505 then
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3507$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3508 CC="${found_clang}"
3509 CXX="`/usr/bin/xcrun -find clang++`"
3510
3511 # else: use default behaviour
3512 fi
3513 fi
3514 fi
3515fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003516ac_ext=c
3517ac_cpp='$CPP $CPPFLAGS'
3518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3520ac_compiler_gnu=$ac_cv_c_compiler_gnu
3521if test -n "$ac_tool_prefix"; then
3522 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3523set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3525$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003526if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003527 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003528else
3529 if test -n "$CC"; then
3530 ac_cv_prog_CC="$CC" # Let the user override the test.
3531else
Martin v. Löwis11437992002-04-12 09:54:03 +00003532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533for as_dir in $PATH
3534do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003537 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003540 $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 +00003541 break 2
3542 fi
3543done
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003545IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003546
Jack Jansendd19cf82001-12-06 22:36:17 +00003547fi
3548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003549CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003550if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3552$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003553else
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3555$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003556fi
3557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559fi
3560if test -z "$ac_cv_prog_CC"; then
3561 ac_ct_CC=$CC
3562 # Extract the first word of "gcc", so it can be a program name with args.
3563set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003568else
3569 if test -n "$ac_ct_CC"; then
3570 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3571else
3572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
3587fi
3588fi
3589ac_ct_CC=$ac_cv_prog_ac_ct_CC
3590if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3592$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598 if test "x$ac_ct_CC" = x; then
3599 CC=""
3600 else
3601 case $cross_compiling:$ac_tool_warned in
3602yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605ac_tool_warned=yes ;;
3606esac
3607 CC=$ac_ct_CC
3608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
3610 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003611fi
3612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 if test -n "$ac_tool_prefix"; then
3615 # 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 +00003616set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003619if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003621else
3622 if test -n "$CC"; then
3623 ac_cv_prog_CC="$CC" # Let the user override the test.
3624else
Martin v. Löwis11437992002-04-12 09:54:03 +00003625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $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 +00003634 break 2
3635 fi
3636done
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642CC=$ac_cv_prog_CC
3643if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3645$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$CC"; then
3655 # Extract the first word of "cc", so it can be a program name with args.
3656set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003659if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003665 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3674 ac_prog_rejected=yes
3675 continue
3676 fi
3677 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003685if test $ac_prog_rejected = yes; then
3686 # We found a bogon in the path, so make sure we never use it.
3687 set dummy $ac_cv_prog_CC
3688 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690 # We chose a different compiler from the bogus one.
3691 # However, it has the same basename, so the bogon will be chosen
3692 # first if we set CC to just the basename; use the full file name.
3693 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003694 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 fi
3696fi
3697fi
3698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703else
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706fi
3707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 do
3714 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3715set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003718if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003720else
3721 if test -n "$CC"; then
3722 ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $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 +00003733 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
3739fi
3740fi
3741CC=$ac_cv_prog_CC
3742if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3744$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003748fi
3749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 test -n "$CC" && break
3752 done
3753fi
3754if test -z "$CC"; then
3755 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003757do
3758 # Extract the first word of "$ac_prog", so it can be a program name with args.
3759set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$ac_ct_CC"; then
3766 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3767else
3768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3769for as_dir in $PATH
3770do
3771 IFS=$as_save_IFS
3772 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $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 +00003777 break 2
3778 fi
3779done
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784fi
3785ac_ct_CC=$ac_cv_prog_ac_ct_CC
3786if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3788$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3791$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 test -n "$ac_ct_CC" && break
3796done
Michael W. Hudson54241132001-12-07 15:38:26 +00003797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798 if test "x$ac_ct_CC" = x; then
3799 CC=""
3800 else
3801 case $cross_compiling:$ac_tool_warned in
3802yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805ac_tool_warned=yes ;;
3806esac
3807 CC=$ac_ct_CC
3808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
3810
3811fi
3812
3813
Matthias Kloseb9621712010-04-24 17:59:49 +00003814test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003816as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003817See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
3819# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003820$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3821set X $ac_compile
3822ac_compiler=$2
3823for ac_option in --version -v -V -qversion; do
3824 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825case "(($ac_try" in
3826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3827 *) ac_try_echo=$ac_try;;
3828esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3830$as_echo "$ac_try_echo"; } >&5
3831 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 if test -s conftest.err; then
3834 sed '10a\
3835... rest of stderr output deleted ...
3836 10q' conftest.err >conftest.er1
3837 cat conftest.er1 >&5
3838 fi
3839 rm -f conftest.er1 conftest.err
3840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3841 test $ac_status = 0; }
3842done
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003845/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847int
3848main ()
3849{
3850
3851 ;
3852 return 0;
3853}
3854_ACEOF
3855ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003856ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003857# Try to create an executable without -o first, disregard a.out.
3858# It will help us diagnose broken compilers, and finding out an intuition
3859# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3861$as_echo_n "checking whether the C compiler works... " >&6; }
3862ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3863
3864# The possible output files:
3865ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867ac_rmfiles=
3868for ac_file in $ac_files
3869do
3870 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3873 esac
3874done
3875rm -f $ac_rmfiles
3876
Matthias Kloseb9621712010-04-24 17:59:49 +00003877if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3887 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3889# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3890# in a Makefile. We should not override ac_cv_exeext if it was cached,
3891# so that the user can short-circuit this test for compilers unknown to
3892# Autoconf.
3893for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003894do
3895 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003898 ;;
3899 [ab].out )
3900 # We found the default executable, but exeext='' is most
3901 # certainly right.
3902 break;;
3903 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 then :; else
3906 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3907 fi
3908 # We set ac_cv_exeext here because the later test for it is not
3909 # safe: cross compilers may not add the suffix if given an `-o'
3910 # argument, so we may need to know it at that point already.
3911 # Even if this section looks crufty: it has the advantage of
3912 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913 break;;
3914 * )
3915 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 esac
3917done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918test "$ac_cv_exeext" = no && ac_cv_exeext=
3919
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003920else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921 ac_file=''
3922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003923if test -z "$ac_file"; then :
3924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3925$as_echo "no" >&6; }
3926$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003927sed 's/^/| /' conftest.$ac_ext >&5
3928
Matthias Kloseb9621712010-04-24 17:59:49 +00003929{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003931as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003932See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003933else
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3935$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3938$as_echo_n "checking for C compiler default output file name... " >&6; }
3939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3940$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003941ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003942
Matthias Kloseb9621712010-04-24 17:59:49 +00003943rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003944ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3946$as_echo_n "checking for suffix of executables... " >&6; }
3947if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948case "(($ac_try" in
3949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950 *) ac_try_echo=$ac_try;;
3951esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3959# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3960# work properly (i.e., refer to `conftest.exe'), while it won't with
3961# `rm'.
3962for ac_file in conftest.exe conftest conftest.*; do
3963 test -f "$ac_file" || continue
3964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3967 break;;
3968 * ) break;;
3969 esac
3970done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971else
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003974as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003975See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977rm -f conftest conftest$ac_cv_exeext
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3979$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980
3981rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003982EXEEXT=$ac_cv_exeext
3983ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3985/* end confdefs.h. */
3986#include <stdio.h>
3987int
3988main ()
3989{
3990FILE *f = fopen ("conftest.out", "w");
3991 return ferror (f) || fclose (f) != 0;
3992
3993 ;
3994 return 0;
3995}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003997ac_clean_files="$ac_clean_files conftest.out"
3998# Check that the compiler produces executables we can run. If not, either
3999# the compiler is broken, or we cross compile.
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4001$as_echo_n "checking whether we are cross compiling... " >&6; }
4002if test "$cross_compiling" != yes; then
4003 { { ac_try="$ac_link"
4004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
4008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
4010 (eval "$ac_link") 2>&5
4011 ac_status=$?
4012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }
4014 if { ac_try='./conftest$ac_cv_exeext'
4015 { { case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
4019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
4021 (eval "$ac_try") 2>&5
4022 ac_status=$?
4023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; }; then
4025 cross_compiling=no
4026 else
4027 if test "$cross_compiling" = maybe; then
4028 cross_compiling=yes
4029 else
4030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004033If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004034See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 fi
4036 fi
4037fi
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4039$as_echo "$cross_compiling" >&6; }
4040
4041rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4042ac_clean_files=$ac_clean_files_save
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4044$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004045if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 $as_echo_n "(cached) " >&6
4047else
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049/* end confdefs.h. */
4050
4051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004060if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071 for ac_file in conftest.o conftest.obj conftest.*; do
4072 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4076 break;;
4077 esac
4078done
4079else
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004081sed 's/^/| /' conftest.$ac_ext >&5
4082
Matthias Kloseb9621712010-04-24 17:59:49 +00004083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004085as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004086See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004088rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4091$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004092OBJEXT=$ac_cv_objext
4093ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4095$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004096if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004098else
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004101
Martin v. Löwis11437992002-04-12 09:54:03 +00004102int
4103main ()
4104{
4105#ifndef __GNUC__
4106 choke me
4107#endif
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004113if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 ac_compiler_gnu=yes
4115else
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119ac_cv_c_compiler_gnu=$ac_compiler_gnu
4120
4121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4123$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4124if test $ac_compiler_gnu = yes; then
4125 GCC=yes
4126else
4127 GCC=
4128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004129ac_test_CFLAGS=${CFLAGS+set}
4130ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4132$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004133if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004135else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 ac_save_c_werror_flag=$ac_c_werror_flag
4137 ac_c_werror_flag=yes
4138 ac_cv_prog_cc_g=no
4139 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143int
4144main ()
4145{
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004152 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 CFLAGS=""
4155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156/* end confdefs.h. */
4157
4158int
4159main ()
4160{
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004167
Matthias Kloseb9621712010-04-24 17:59:49 +00004168else
4169 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172/* end confdefs.h. */
4173
4174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004182if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4190 ac_c_werror_flag=$ac_save_c_werror_flag
4191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4193$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004194if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004196elif test $ac_cv_prog_cc_g = yes; then
4197 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004198 CFLAGS="-g -O2"
4199 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201 fi
4202else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004203 if test "$GCC" = yes; then
4204 CFLAGS="-O2"
4205 else
4206 CFLAGS=
4207 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4210$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004211if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004213else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004215ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
4218#include <stdarg.h>
4219#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004220struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4222struct buf { int x; };
4223FILE * (*rcsopen) (struct buf *, struct stat *, int);
4224static char *e (p, i)
4225 char **p;
4226 int i;
4227{
4228 return p[i];
4229}
4230static char *f (char * (*g) (char **, int), char **p, ...)
4231{
4232 char *s;
4233 va_list v;
4234 va_start (v,p);
4235 s = g (p, va_arg (v,int));
4236 va_end (v);
4237 return s;
4238}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004239
4240/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4241 function prototypes and stuff, but not '\xHH' hex character constants.
4242 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4245 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004247int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4250 inside strings and character constants. */
4251#define FOO(x) 'x'
4252int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4253
Skip Montanaro6dead952003-09-25 14:50:04 +00004254int test (int i, double x);
4255struct s1 {int (*f) (int a);};
4256struct s2 {int (*f) (double a);};
4257int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4258int argc;
4259char **argv;
4260int
4261main ()
4262{
4263return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4264 ;
4265 return 0;
4266}
4267_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4269 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004270do
4271 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275rm -f core conftest.err conftest.$ac_objext
4276 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004277done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279CC=$ac_save_CC
4280
4281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282# AC_CACHE_VAL
4283case "x$ac_cv_prog_cc_c89" in
4284 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4286$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4289$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4293$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004294esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004295if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004296
Matthias Kloseb9621712010-04-24 17:59:49 +00004297fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299ac_ext=c
4300ac_cpp='$CPP $CPPFLAGS'
4301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4303ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004305ac_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
4310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4311$as_echo_n "checking how to run the C preprocessor... " >&6; }
4312# On Suns, sometimes $CPP names a directory.
4313if test -n "$CPP" && test -d "$CPP"; then
4314 CPP=
4315fi
4316if test -z "$CPP"; then
4317 if ${ac_cv_prog_CPP+:} false; then :
4318 $as_echo_n "(cached) " >&6
4319else
4320 # Double quotes because CPP needs to be expanded
4321 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4322 do
4323 ac_preproc_ok=false
4324for ac_c_preproc_warn_flag in '' yes
4325do
4326 # Use a header file that comes with gcc, so configuring glibc
4327 # with a fresh cross-compiler works.
4328 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4329 # <limits.h> exists even on freestanding compilers.
4330 # On the NeXT, cc -E runs the code through the compiler's parser,
4331 # not just through cpp. "Syntax error" is here to catch this case.
4332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333/* end confdefs.h. */
4334#ifdef __STDC__
4335# include <limits.h>
4336#else
4337# include <assert.h>
4338#endif
4339 Syntax error
4340_ACEOF
4341if ac_fn_c_try_cpp "$LINENO"; then :
4342
4343else
4344 # Broken: fails on valid input.
4345continue
4346fi
4347rm -f conftest.err conftest.i conftest.$ac_ext
4348
4349 # OK, works on sane cases. Now check whether nonexistent headers
4350 # can be detected and how.
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h. */
4353#include <ac_nonexistent.h>
4354_ACEOF
4355if ac_fn_c_try_cpp "$LINENO"; then :
4356 # Broken: success on invalid input.
4357continue
4358else
4359 # Passes both tests.
4360ac_preproc_ok=:
4361break
4362fi
4363rm -f conftest.err conftest.i conftest.$ac_ext
4364
4365done
4366# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4367rm -f conftest.i conftest.err conftest.$ac_ext
4368if $ac_preproc_ok; then :
4369 break
4370fi
4371
4372 done
4373 ac_cv_prog_CPP=$CPP
4374
4375fi
4376 CPP=$ac_cv_prog_CPP
4377else
4378 ac_cv_prog_CPP=$CPP
4379fi
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4381$as_echo "$CPP" >&6; }
4382ac_preproc_ok=false
4383for ac_c_preproc_warn_flag in '' yes
4384do
4385 # Use a header file that comes with gcc, so configuring glibc
4386 # with a fresh cross-compiler works.
4387 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4388 # <limits.h> exists even on freestanding compilers.
4389 # On the NeXT, cc -E runs the code through the compiler's parser,
4390 # not just through cpp. "Syntax error" is here to catch this case.
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392/* end confdefs.h. */
4393#ifdef __STDC__
4394# include <limits.h>
4395#else
4396# include <assert.h>
4397#endif
4398 Syntax error
4399_ACEOF
4400if ac_fn_c_try_cpp "$LINENO"; then :
4401
4402else
4403 # Broken: fails on valid input.
4404continue
4405fi
4406rm -f conftest.err conftest.i conftest.$ac_ext
4407
4408 # OK, works on sane cases. Now check whether nonexistent headers
4409 # can be detected and how.
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h. */
4412#include <ac_nonexistent.h>
4413_ACEOF
4414if ac_fn_c_try_cpp "$LINENO"; then :
4415 # Broken: success on invalid input.
4416continue
4417else
4418 # Passes both tests.
4419ac_preproc_ok=:
4420break
4421fi
4422rm -f conftest.err conftest.i conftest.$ac_ext
4423
4424done
4425# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4426rm -f conftest.i conftest.err conftest.$ac_ext
4427if $ac_preproc_ok; then :
4428
4429else
4430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4432as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4433See \`config.log' for more details" "$LINENO" 5; }
4434fi
4435
4436ac_ext=c
4437ac_cpp='$CPP $CPPFLAGS'
4438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440ac_compiler_gnu=$ac_cv_c_compiler_gnu
4441
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4443$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4444if ${ac_cv_path_GREP+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446else
4447 if test -z "$GREP"; then
4448 ac_path_GREP_found=false
4449 # Loop through the user's path and test for each of PROGNAME-LIST
4450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4451for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4452do
4453 IFS=$as_save_IFS
4454 test -z "$as_dir" && as_dir=.
4455 for ac_prog in grep ggrep; do
4456 for ac_exec_ext in '' $ac_executable_extensions; do
4457 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4458 as_fn_executable_p "$ac_path_GREP" || continue
4459# Check for GNU ac_path_GREP and select it if it is found.
4460 # Check for GNU $ac_path_GREP
4461case `"$ac_path_GREP" --version 2>&1` in
4462*GNU*)
4463 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4464*)
4465 ac_count=0
4466 $as_echo_n 0123456789 >"conftest.in"
4467 while :
4468 do
4469 cat "conftest.in" "conftest.in" >"conftest.tmp"
4470 mv "conftest.tmp" "conftest.in"
4471 cp "conftest.in" "conftest.nl"
4472 $as_echo 'GREP' >> "conftest.nl"
4473 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4474 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4475 as_fn_arith $ac_count + 1 && ac_count=$as_val
4476 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4477 # Best one so far, save it but keep looking for a better one
4478 ac_cv_path_GREP="$ac_path_GREP"
4479 ac_path_GREP_max=$ac_count
4480 fi
4481 # 10*(2^10) chars as input seems more than enough
4482 test $ac_count -gt 10 && break
4483 done
4484 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4485esac
4486
4487 $ac_path_GREP_found && break 3
4488 done
4489 done
4490 done
4491IFS=$as_save_IFS
4492 if test -z "$ac_cv_path_GREP"; then
4493 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4494 fi
4495else
4496 ac_cv_path_GREP=$GREP
4497fi
4498
4499fi
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4501$as_echo "$ac_cv_path_GREP" >&6; }
4502 GREP="$ac_cv_path_GREP"
4503
4504
Łukasz Langaa785c872016-09-09 17:37:37 -07004505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4506$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4507if ${ac_cv_path_SED+:} false; then :
4508 $as_echo_n "(cached) " >&6
4509else
4510 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4511 for ac_i in 1 2 3 4 5 6 7; do
4512 ac_script="$ac_script$as_nl$ac_script"
4513 done
4514 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4515 { ac_script=; unset ac_script;}
4516 if test -z "$SED"; then
4517 ac_path_SED_found=false
4518 # Loop through the user's path and test for each of PROGNAME-LIST
4519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520for as_dir in $PATH
4521do
4522 IFS=$as_save_IFS
4523 test -z "$as_dir" && as_dir=.
4524 for ac_prog in sed gsed; do
4525 for ac_exec_ext in '' $ac_executable_extensions; do
4526 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4527 as_fn_executable_p "$ac_path_SED" || continue
4528# Check for GNU ac_path_SED and select it if it is found.
4529 # Check for GNU $ac_path_SED
4530case `"$ac_path_SED" --version 2>&1` in
4531*GNU*)
4532 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4533*)
4534 ac_count=0
4535 $as_echo_n 0123456789 >"conftest.in"
4536 while :
4537 do
4538 cat "conftest.in" "conftest.in" >"conftest.tmp"
4539 mv "conftest.tmp" "conftest.in"
4540 cp "conftest.in" "conftest.nl"
4541 $as_echo '' >> "conftest.nl"
4542 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4543 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4544 as_fn_arith $ac_count + 1 && ac_count=$as_val
4545 if test $ac_count -gt ${ac_path_SED_max-0}; then
4546 # Best one so far, save it but keep looking for a better one
4547 ac_cv_path_SED="$ac_path_SED"
4548 ac_path_SED_max=$ac_count
4549 fi
4550 # 10*(2^10) chars as input seems more than enough
4551 test $ac_count -gt 10 && break
4552 done
4553 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4554esac
4555
4556 $ac_path_SED_found && break 3
4557 done
4558 done
4559 done
4560IFS=$as_save_IFS
4561 if test -z "$ac_cv_path_SED"; then
4562 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4563 fi
4564else
4565 ac_cv_path_SED=$SED
4566fi
4567
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4570$as_echo "$ac_cv_path_SED" >&6; }
4571 SED="$ac_cv_path_SED"
4572 rm -f conftest.sed
4573
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004574
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575
4576
Matthias Kloseb9621712010-04-24 17:59:49 +00004577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4578$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004581if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004582 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004583
4584 case $withval in
4585 no) with_cxx_main=no
4586 MAINCC='$(CC)';;
4587 yes) with_cxx_main=yes
4588 MAINCC='$(CXX)';;
4589 *) with_cxx_main=yes
4590 MAINCC=$withval
4591 if test -z "$CXX"
4592 then
4593 CXX=$withval
4594 fi;;
4595 esac
4596else
4597
4598 with_cxx_main=no
4599 MAINCC='$(CC)'
4600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004601fi
4602
Matthias Kloseb9621712010-04-24 17:59:49 +00004603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4604$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605
4606preset_cxx="$CXX"
4607if test -z "$CXX"
4608then
4609 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004610 gcc) if test -n "$ac_tool_prefix"; then
4611 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4612set dummy ${ac_tool_prefix}g++; ac_word=$2
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4614$as_echo_n "checking for $ac_word... " >&6; }
4615if ${ac_cv_path_CXX+:} false; then :
4616 $as_echo_n "(cached) " >&6
4617else
4618 case $CXX in
4619 [\\/]* | ?:[\\/]*)
4620 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4621 ;;
4622 *)
4623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in notfound
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
4628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004630 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4632 break 2
4633 fi
4634done
4635 done
4636IFS=$as_save_IFS
4637
4638 ;;
4639esac
4640fi
4641CXX=$ac_cv_path_CXX
4642if test -n "$CXX"; then
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4644$as_echo "$CXX" >&6; }
4645else
4646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4647$as_echo "no" >&6; }
4648fi
4649
4650
4651fi
4652if test -z "$ac_cv_path_CXX"; then
4653 ac_pt_CXX=$CXX
4654 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4657$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004658if ${ac_cv_path_ac_pt_CXX+:} false; then :
4659 $as_echo_n "(cached) " >&6
4660else
4661 case $ac_pt_CXX in
4662 [\\/]* | ?:[\\/]*)
4663 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4664 ;;
4665 *)
4666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4667for as_dir in notfound
4668do
4669 IFS=$as_save_IFS
4670 test -z "$as_dir" && as_dir=.
4671 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004673 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4675 break 2
4676 fi
4677done
4678 done
4679IFS=$as_save_IFS
4680
4681 ;;
4682esac
4683fi
4684ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4685if test -n "$ac_pt_CXX"; then
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4687$as_echo "$ac_pt_CXX" >&6; }
4688else
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690$as_echo "no" >&6; }
4691fi
4692
4693 if test "x$ac_pt_CXX" = x; then
4694 CXX="g++"
4695 else
4696 case $cross_compiling:$ac_tool_warned in
4697yes:)
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4700ac_tool_warned=yes ;;
4701esac
4702 CXX=$ac_pt_CXX
4703 fi
4704else
4705 CXX="$ac_cv_path_CXX"
4706fi
4707 ;;
4708 cc) if test -n "$ac_tool_prefix"; then
4709 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4710set dummy ${ac_tool_prefix}c++; ac_word=$2
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004713if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004714 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715else
4716 case $CXX in
4717 [\\/]* | ?:[\\/]*)
4718 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4719 ;;
4720 *)
4721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in notfound
4723do
4724 IFS=$as_save_IFS
4725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004730 break 2
4731 fi
4732done
Matthias Kloseb9621712010-04-24 17:59:49 +00004733 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004734IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 ;;
4737esac
4738fi
4739CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004740if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4742$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004743else
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004747
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748
4749fi
4750if test -z "$ac_cv_path_CXX"; then
4751 ac_pt_CXX=$CXX
4752 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004756if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761 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 +00004762 ;;
4763 *)
4764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4765for as_dir in notfound
4766do
4767 IFS=$as_save_IFS
4768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 break 2
4774 fi
4775done
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004777IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 ;;
4780esac
4781fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4783if test -n "$ac_pt_CXX"; then
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4785$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004786else
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4788$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004790
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 if test "x$ac_pt_CXX" = x; then
4792 CXX="c++"
4793 else
4794 case $cross_compiling:$ac_tool_warned in
4795yes:)
4796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4798ac_tool_warned=yes ;;
4799esac
4800 CXX=$ac_pt_CXX
4801 fi
4802else
4803 CXX="$ac_cv_path_CXX"
4804fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806 clang|*/clang) if test -n "$ac_tool_prefix"; then
4807 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4808set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810$as_echo_n "checking for $ac_word... " >&6; }
4811if ${ac_cv_path_CXX+:} false; then :
4812 $as_echo_n "(cached) " >&6
4813else
4814 case $CXX in
4815 [\\/]* | ?:[\\/]*)
4816 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4817 ;;
4818 *)
4819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4820for as_dir in notfound
4821do
4822 IFS=$as_save_IFS
4823 test -z "$as_dir" && as_dir=.
4824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004826 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4828 break 2
4829 fi
4830done
4831 done
4832IFS=$as_save_IFS
4833
Ned Deilycbfb9a52012-06-23 16:02:19 -07004834 ;;
4835esac
4836fi
4837CXX=$ac_cv_path_CXX
4838if test -n "$CXX"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4840$as_echo "$CXX" >&6; }
4841else
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
4844fi
4845
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846
4847fi
4848if test -z "$ac_cv_path_CXX"; then
4849 ac_pt_CXX=$CXX
4850 # Extract the first word of "clang++", so it can be a program name with args.
4851set dummy clang++; ac_word=$2
4852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853$as_echo_n "checking for $ac_word... " >&6; }
4854if ${ac_cv_path_ac_pt_CXX+:} false; then :
4855 $as_echo_n "(cached) " >&6
4856else
4857 case $ac_pt_CXX in
4858 [\\/]* | ?:[\\/]*)
4859 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4860 ;;
4861 *)
4862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863for as_dir in notfound
4864do
4865 IFS=$as_save_IFS
4866 test -z "$as_dir" && as_dir=.
4867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4871 break 2
4872 fi
4873done
4874 done
4875IFS=$as_save_IFS
4876
4877 ;;
4878esac
4879fi
4880ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4881if test -n "$ac_pt_CXX"; then
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4883$as_echo "$ac_pt_CXX" >&6; }
4884else
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4886$as_echo "no" >&6; }
4887fi
4888
4889 if test "x$ac_pt_CXX" = x; then
4890 CXX="clang++"
4891 else
4892 case $cross_compiling:$ac_tool_warned in
4893yes:)
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4896ac_tool_warned=yes ;;
4897esac
4898 CXX=$ac_pt_CXX
4899 fi
4900else
4901 CXX="$ac_cv_path_CXX"
4902fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004904 icc|*/icc) if test -n "$ac_tool_prefix"; then
4905 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4906set dummy ${ac_tool_prefix}icpc; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_CXX+:} false; then :
4910 $as_echo_n "(cached) " >&6
4911else
4912 case $CXX in
4913 [\\/]* | ?:[\\/]*)
4914 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4915 ;;
4916 *)
4917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in notfound
4919do
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
4922 for ac_exec_ext in '' $ac_executable_extensions; do
4923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926 break 2
4927 fi
4928done
4929 done
4930IFS=$as_save_IFS
4931
4932 ;;
4933esac
4934fi
4935CXX=$ac_cv_path_CXX
4936if test -n "$CXX"; then
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4938$as_echo "$CXX" >&6; }
4939else
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945fi
4946if test -z "$ac_cv_path_CXX"; then
4947 ac_pt_CXX=$CXX
4948 # Extract the first word of "icpc", so it can be a program name with args.
4949set dummy icpc; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if ${ac_cv_path_ac_pt_CXX+:} false; then :
4953 $as_echo_n "(cached) " >&6
4954else
4955 case $ac_pt_CXX in
4956 [\\/]* | ?:[\\/]*)
4957 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4958 ;;
4959 *)
4960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in notfound
4962do
4963 IFS=$as_save_IFS
4964 test -z "$as_dir" && as_dir=.
4965 for ac_exec_ext in '' $ac_executable_extensions; do
4966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4967 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969 break 2
4970 fi
4971done
4972 done
4973IFS=$as_save_IFS
4974
4975 ;;
4976esac
4977fi
4978ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4979if test -n "$ac_pt_CXX"; then
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4981$as_echo "$ac_pt_CXX" >&6; }
4982else
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987 if test "x$ac_pt_CXX" = x; then
4988 CXX="icpc"
4989 else
4990 case $cross_compiling:$ac_tool_warned in
4991yes:)
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4993$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4994ac_tool_warned=yes ;;
4995esac
4996 CXX=$ac_pt_CXX
4997 fi
4998else
4999 CXX="$ac_cv_path_CXX"
5000fi
5001 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005002 esac
5003 if test "$CXX" = "notfound"
5004 then
5005 CXX=""
5006 fi
5007fi
5008if test -z "$CXX"
5009then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005010 if test -n "$ac_tool_prefix"; then
5011 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5012 do
5013 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5014set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5016$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005017if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005019else
5020 if test -n "$CXX"; then
5021 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5022else
5023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005030 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032 break 2
5033 fi
5034done
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037
5038fi
5039fi
5040CXX=$ac_cv_prog_CXX
5041if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5043$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005044else
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5046$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047fi
5048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005050 test -n "$CXX" && break
5051 done
5052fi
5053if test -z "$CXX"; then
5054 ac_ct_CXX=$CXX
5055 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5056do
5057 # Extract the first word of "$ac_prog", so it can be a program name with args.
5058set dummy $ac_prog; ac_word=$2
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; }
5061if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5062 $as_echo_n "(cached) " >&6
5063else
5064 if test -n "$ac_ct_CXX"; then
5065 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5066else
5067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068for as_dir in $PATH
5069do
5070 IFS=$as_save_IFS
5071 test -z "$as_dir" && as_dir=.
5072 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005074 ac_cv_prog_ac_ct_CXX="$ac_prog"
5075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5076 break 2
5077 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 done
5080IFS=$as_save_IFS
5081
5082fi
5083fi
5084ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5085if test -n "$ac_ct_CXX"; then
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5087$as_echo "$ac_ct_CXX" >&6; }
5088else
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5090$as_echo "no" >&6; }
5091fi
5092
5093
5094 test -n "$ac_ct_CXX" && break
5095done
5096
5097 if test "x$ac_ct_CXX" = x; then
5098 CXX="notfound"
5099 else
5100 case $cross_compiling:$ac_tool_warned in
5101yes:)
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5104ac_tool_warned=yes ;;
5105esac
5106 CXX=$ac_ct_CXX
5107 fi
5108fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109
5110 if test "$CXX" = "notfound"
5111 then
5112 CXX=""
5113 fi
5114fi
5115if test "$preset_cxx" != "$CXX"
5116then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005117 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118
5119 By default, distutils will build C++ extension modules with \"$CXX\".
5120 If this is not intended, then set CXX on the configure command line.
5121 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005122$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123
5124 By default, distutils will build C++ extension modules with \"$CXX\".
5125 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005126 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127fi
5128
5129
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005130MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5131
5132
5133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5134$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5135cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005136#undef bfin
5137#undef cris
5138#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005139#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005140#undef hppa
5141#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005142#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005143#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005144#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005145#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005146#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005147#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005148 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005149#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005150# if defined(__x86_64__) && defined(__LP64__)
5151 x86_64-linux-gnu
5152# elif defined(__x86_64__) && defined(__ILP32__)
5153 x86_64-linux-gnux32
5154# elif defined(__i386__)
5155 i386-linux-gnu
5156# elif defined(__aarch64__) && defined(__AARCH64EL__)
5157# if defined(__ILP32__)
5158 aarch64_ilp32-linux-gnu
5159# else
5160 aarch64-linux-gnu
5161# endif
5162# elif defined(__aarch64__) && defined(__AARCH64EB__)
5163# if defined(__ILP32__)
5164 aarch64_be_ilp32-linux-gnu
5165# else
5166 aarch64_be-linux-gnu
5167# endif
5168# elif defined(__alpha__)
5169 alpha-linux-gnu
5170# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5171# if defined(__ARMEL__)
5172 arm-linux-gnueabihf
5173# else
5174 armeb-linux-gnueabihf
5175# endif
5176# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5177# if defined(__ARMEL__)
5178 arm-linux-gnueabi
5179# else
5180 armeb-linux-gnueabi
5181# endif
5182# elif defined(__hppa__)
5183 hppa-linux-gnu
5184# elif defined(__ia64__)
5185 ia64-linux-gnu
5186# elif defined(__m68k__) && !defined(__mcoldfire__)
5187 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005188# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5189# if _MIPS_SIM == _ABIO32
5190 mipsisa32r6el-linux-gnu
5191# elif _MIPS_SIM == _ABIN32
5192 mipsisa64r6el-linux-gnuabin32
5193# elif _MIPS_SIM == _ABI64
5194 mipsisa64r6el-linux-gnuabi64
5195# else
5196# error unknown platform triplet
5197# endif
5198# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5199# if _MIPS_SIM == _ABIO32
5200 mipsisa32r6-linux-gnu
5201# elif _MIPS_SIM == _ABIN32
5202 mipsisa64r6-linux-gnuabin32
5203# elif _MIPS_SIM == _ABI64
5204 mipsisa64r6-linux-gnuabi64
5205# else
5206# error unknown platform triplet
5207# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208# elif defined(__mips_hard_float) && defined(_MIPSEL)
5209# if _MIPS_SIM == _ABIO32
5210 mipsel-linux-gnu
5211# elif _MIPS_SIM == _ABIN32
5212 mips64el-linux-gnuabin32
5213# elif _MIPS_SIM == _ABI64
5214 mips64el-linux-gnuabi64
5215# else
5216# error unknown platform triplet
5217# endif
5218# elif defined(__mips_hard_float)
5219# if _MIPS_SIM == _ABIO32
5220 mips-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mips64-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mips64-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__or1k__)
5229 or1k-linux-gnu
5230# elif defined(__powerpc__) && defined(__SPE__)
5231 powerpc-linux-gnuspe
5232# elif defined(__powerpc64__)
5233# if defined(__LITTLE_ENDIAN__)
5234 powerpc64le-linux-gnu
5235# else
5236 powerpc64-linux-gnu
5237# endif
5238# elif defined(__powerpc__)
5239 powerpc-linux-gnu
5240# elif defined(__s390x__)
5241 s390x-linux-gnu
5242# elif defined(__s390__)
5243 s390-linux-gnu
5244# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5245 sh4-linux-gnu
5246# elif defined(__sparc__) && defined(__arch64__)
5247 sparc64-linux-gnu
5248# elif defined(__sparc__)
5249 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005250# elif defined(__riscv)
5251# if __riscv_xlen == 32
5252 riscv32-linux-gnu
5253# elif __riscv_xlen == 64
5254 riscv64-linux-gnu
5255# else
5256# error unknown platform triplet
5257# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005258# else
5259# error unknown platform triplet
5260# endif
5261#elif defined(__FreeBSD_kernel__)
5262# if defined(__LP64__)
5263 x86_64-kfreebsd-gnu
5264# elif defined(__i386__)
5265 i386-kfreebsd-gnu
5266# else
5267# error unknown platform triplet
5268# endif
5269#elif defined(__gnu_hurd__)
5270 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005271#elif defined(__APPLE__)
5272 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005273#else
5274# error unknown platform triplet
5275#endif
5276
5277EOF
5278
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005279if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005280 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5282$as_echo "$PLATFORM_TRIPLET" >&6; }
5283else
5284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5285$as_echo "none" >&6; }
5286fi
5287rm -f conftest.c conftest.out
5288
5289if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5290 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5291 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5292 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005293elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5294 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005296
doko@ubuntu.com55532312016-06-14 08:55:19 +02005297if test x$MULTIARCH != x; then
5298 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5299fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300
5301
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5303$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5304save_LDFLAGS="$LDFLAGS"
5305LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005306
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5308/* end confdefs.h. */
5309
5310int
5311main ()
5312{
5313
5314 ;
5315 return 0;
5316}
5317_ACEOF
5318if ac_fn_c_try_link "$LINENO"; then :
5319 NO_AS_NEEDED="-Wl,--no-as-needed"
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5321$as_echo "yes" >&6; }
5322else
5323 NO_AS_NEEDED=""
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
5326fi
5327rm -f core conftest.err conftest.$ac_objext \
5328 conftest$ac_exeext conftest.$ac_ext
5329LDFLAGS="$save_LDFLAGS"
5330
5331
5332
5333# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005334
Matthias Kloseb9621712010-04-24 17:59:49 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5336$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005337if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005338 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005339else
5340 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5341 then ac_cv_path_EGREP="$GREP -E"
5342 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005345 # Loop through the user's path and test for each of PROGNAME-LIST
5346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005347for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5348do
5349 IFS=$as_save_IFS
5350 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 for ac_prog in egrep; do
5352 for ac_exec_ext in '' $ac_executable_extensions; do
5353 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005354 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005355# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356 # Check for GNU $ac_path_EGREP
5357case `"$ac_path_EGREP" --version 2>&1` in
5358*GNU*)
5359 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5360*)
5361 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 while :
5364 do
5365 cat "conftest.in" "conftest.in" >"conftest.tmp"
5366 mv "conftest.tmp" "conftest.in"
5367 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5370 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5373 # Best one so far, save it but keep looking for a better one
5374 ac_cv_path_EGREP="$ac_path_EGREP"
5375 ac_path_EGREP_max=$ac_count
5376 fi
5377 # 10*(2^10) chars as input seems more than enough
5378 test $ac_count -gt 10 && break
5379 done
5380 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5381esac
5382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 $ac_path_EGREP_found && break 3
5384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005389 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 +00005390 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391else
5392 ac_cv_path_EGREP=$EGREP
5393fi
5394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 fi
5396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5398$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005400
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5403$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005404if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 $as_echo_n "(cached) " >&6
5406else
5407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005408/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005409#include <stdlib.h>
5410#include <stdarg.h>
5411#include <string.h>
5412#include <float.h>
5413
5414int
5415main ()
5416{
5417
5418 ;
5419 return 0;
5420}
5421_ACEOF
5422if ac_fn_c_try_compile "$LINENO"; then :
5423 ac_cv_header_stdc=yes
5424else
5425 ac_cv_header_stdc=no
5426fi
5427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5428
5429if test $ac_cv_header_stdc = yes; then
5430 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5432/* end confdefs.h. */
5433#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005434
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005435_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005439else
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005442rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444fi
5445
5446if test $ac_cv_header_stdc = yes; then
5447 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449/* end confdefs.h. */
5450#include <stdlib.h>
5451
5452_ACEOF
5453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5454 $EGREP "free" >/dev/null 2>&1; then :
5455
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f conftest*
5460
5461fi
5462
5463if test $ac_cv_header_stdc = yes; then
5464 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5465 if test "$cross_compiling" = yes; then :
5466 :
5467else
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#include <ctype.h>
5471#include <stdlib.h>
5472#if ((' ' & 0x0FF) == 0x020)
5473# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5474# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5475#else
5476# define ISLOWER(c) \
5477 (('a' <= (c) && (c) <= 'i') \
5478 || ('j' <= (c) && (c) <= 'r') \
5479 || ('s' <= (c) && (c) <= 'z'))
5480# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5481#endif
5482
5483#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5484int
5485main ()
5486{
5487 int i;
5488 for (i = 0; i < 256; i++)
5489 if (XOR (islower (i), ISLOWER (i))
5490 || toupper (i) != TOUPPER (i))
5491 return 2;
5492 return 0;
5493}
5494_ACEOF
5495if ac_fn_c_try_run "$LINENO"; then :
5496
5497else
5498 ac_cv_header_stdc=no
5499fi
5500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5501 conftest.$ac_objext conftest.beam conftest.$ac_ext
5502fi
5503
5504fi
5505fi
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5507$as_echo "$ac_cv_header_stdc" >&6; }
5508if test $ac_cv_header_stdc = yes; then
5509
5510$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5511
5512fi
5513
5514# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5515for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5516 inttypes.h stdint.h unistd.h
5517do :
5518 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5519ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5520"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005521if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005522 cat >>confdefs.h <<_ACEOF
5523#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5524_ACEOF
5525
5526fi
5527
5528done
5529
5530
5531
5532 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 +02005533if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005534 MINIX=yes
5535else
5536 MINIX=
5537fi
5538
5539
5540 if test "$MINIX" = yes; then
5541
5542$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5543
5544
5545$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5546
5547
5548$as_echo "#define _MINIX 1" >>confdefs.h
5549
5550 fi
5551
5552
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5554$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005555if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 $as_echo_n "(cached) " >&6
5557else
5558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h. */
5560
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005561# define __EXTENSIONS__ 1
5562 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005563int
5564main ()
5565{
5566
5567 ;
5568 return 0;
5569}
5570_ACEOF
5571if ac_fn_c_try_compile "$LINENO"; then :
5572 ac_cv_safe_to_define___extensions__=yes
5573else
5574 ac_cv_safe_to_define___extensions__=no
5575fi
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5579$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5580 test $ac_cv_safe_to_define___extensions__ = yes &&
5581 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5582
5583 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5584
5585 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5586
5587 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5588
5589 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5590
5591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
Xavier de Gaye95750b12016-07-09 11:05:42 +02005593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5594$as_echo_n "checking for the Android API level... " >&6; }
5595cat >> conftest.c <<EOF
5596#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005597android_api = __ANDROID_API__
5598arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005599#else
5600#error not Android
5601#endif
5602EOF
5603
5604if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005605 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5606 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5608$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005609 if test -z "$ANDROID_API_LEVEL"; then
5610 echo 'Fatal: you must define __ANDROID_API__'
5611 exit 1
5612 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613
5614cat >>confdefs.h <<_ACEOF
5615#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5616_ACEOF
5617
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005618
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5620$as_echo_n "checking for the Android arm ABI... " >&6; }
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5622$as_echo "$_arm_arch" >&6; }
5623 if test "$_arm_arch" = 7; then
5624 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5625 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5626 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627else
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5629$as_echo "not Android" >&6; }
5630fi
5631rm -f conftest.c conftest.out
5632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633# Check for unsupported systems
5634case $ac_sys_system/$ac_sys_release in
5635atheos*|Linux*/1*)
5636 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5637 echo See README for details.
5638 exit 1;;
5639esac
5640
5641
Matthias Kloseb9621712010-04-24 17:59:49 +00005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5643$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005646if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 withval=$with_suffix;
5648 case $withval in
5649 no) EXEEXT=;;
5650 yes) EXEEXT=.exe;;
5651 *) EXEEXT=$withval;;
5652 esac
5653fi
5654
Matthias Kloseb9621712010-04-24 17:59:49 +00005655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5656$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
5658# Test whether we're running on a non-case-sensitive system, in which
5659# case we give a warning if no ext is given
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5662$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663if test ! -d CaseSensitiveTestDir; then
5664mkdir CaseSensitiveTestDir
5665fi
5666
5667if test -d casesensitivetestdir
5668then
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5670$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=.exe
5672else
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5674$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 BUILDEXEEXT=$EXEEXT
5676fi
5677rmdir CaseSensitiveTestDir
5678
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679case $ac_sys_system in
5680hp*|HP*)
5681 case $CC in
5682 cc|*/cc) CC="$CC -Ae";;
5683 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684esac
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5688$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689if test -z "$LIBRARY"
5690then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005691 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5694$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
5696# LDLIBRARY is the name of the library to link against (as opposed to the
5697# name of the library into which to insert object files). BLDLIBRARY is also
5698# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5699# is blank as the main program is not linked directly against LDLIBRARY.
5700# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5701# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5702# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5703# DLLLIBRARY is the shared (i.e., DLL) library.
5704#
5705# RUNSHARED is used to run shared python without installed libraries
5706#
5707# INSTSONAME is the name of the shared library that will be use to install
5708# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005709#
5710# LDVERSION is the shared library version number, normally the Python version
5711# with the ABI build flags appended.
5712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714
5715
5716
5717
5718
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720LDLIBRARY="$LIBRARY"
5721BLDLIBRARY='$(LDLIBRARY)'
5722INSTSONAME='$(LDLIBRARY)'
5723DLLLIBRARY=''
5724LDLIBRARYDIR=''
5725RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005726LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# LINKCC is the command that links the python executable -- default is $(CC).
5729# If CXX is set, and if it is needed to link a main function that was
5730# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5731# python might then depend on the C++ runtime
5732# This is altered for AIX in order to build the export list before
5733# linking.
5734
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5736$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737if test -z "$LINKCC"
5738then
5739 LINKCC='$(PURIFY) $(MAINCC)'
5740 case $ac_sys_system in
5741 AIX*)
5742 exp_extra="\"\""
5743 if test $ac_sys_release -ge 5 -o \
5744 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5745 exp_extra="."
5746 fi
5747 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748 QNX*)
5749 # qcc must be used because the other compilers do not
5750 # support -N.
5751 LINKCC=qcc;;
5752 esac
5753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5755$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5758# make sure we default having it set to "no": this is used by
5759# distutils.unixccompiler to know if it should add --enable-new-dtags
5760# to linker command lines, and failing to detect GNU ld simply results
5761# in the same bahaviour as before.
5762
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5764$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765ac_prog=ld
5766if test "$GCC" = yes; then
5767 ac_prog=`$CC -print-prog-name=ld`
5768fi
5769case `"$ac_prog" -V 2>&1 < /dev/null` in
5770 *GNU*)
5771 GNULD=yes;;
5772 *)
5773 GNULD=no;;
5774esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5776$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5779$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005781if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 enableval=$enable_shared;
5783fi
5784
5785
5786if test -z "$enable_shared"
5787then
5788 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005789 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790 enable_shared="yes";;
5791 *)
5792 enable_shared="no";;
5793 esac
5794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5796$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5799$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005801if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005802 enableval=$enable_profiling;
5803fi
5804
5805if test "x$enable_profiling" = xyes; then
5806 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005807 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809/* end confdefs.h. */
5810int main() { return 0; }
5811_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005812if ac_fn_c_try_link "$LINENO"; then :
5813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005815 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005817rm -f core conftest.err conftest.$ac_objext \
5818 conftest$ac_exeext conftest.$ac_ext
5819 CC="$ac_save_cc"
5820else
5821 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5824$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825
doko@ubuntu.comba015832012-06-30 16:52:05 +02005826if test "x$enable_profiling" = xyes; then
5827 BASECFLAGS="-pg $BASECFLAGS"
5828 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5832$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
5834# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5835# library that we build, but we do not want to link against it (we
5836# will find it with a -framework option). For this reason there is an
5837# extra variable BLDLIBRARY against which Python and the extension
5838# modules are linked, BLDLIBRARY. This is normally the same as
5839# LDLIBRARY, but empty for MacOSX framework builds.
5840if test "$enable_framework"
5841then
5842 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005843 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 BLDLIBRARY=''
5845else
5846 BLDLIBRARY='$(LDLIBRARY)'
5847fi
5848
5849# Other platforms follow
5850if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005851 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
Matthias Kloseb9621712010-04-24 17:59:49 +00005853$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854
5855 case $ac_sys_system in
5856 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005857 LDLIBRARY='libpython$(LDVERSION).dll.a'
5858 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 ;;
5860 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005861 LDLIBRARY='libpython$(LDVERSION).so'
5862 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005863 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005865 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005866 then
5867 PY3LIBRARY=libpython3.so
5868 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005870 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005871 LDLIBRARY='libpython$(LDVERSION).so'
5872 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005873 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005875 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005876 then
5877 PY3LIBRARY=libpython3.so
5878 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 ;;
5880 hp*|HP*)
5881 case `uname -m` in
5882 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
5885 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 ;;
5888 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005890 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).dylib'
5894 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005897 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005900 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
5902 esac
5903else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 case $ac_sys_system in
5906 CYGWIN*)
5907 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 esac
5911fi
5912
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005913if test "$cross_compiling" = yes; then
5914 RUNSHARED=
5915fi
5916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5918$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005921if test -n "$ac_tool_prefix"; then
5922 for ac_prog in ar aal
5923 do
5924 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5925set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005928if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005929 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930else
5931 if test -n "$AR"; then
5932 ac_cv_prog_AR="$AR" # Let the user override the test.
5933else
5934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5935for as_dir in $PATH
5936do
5937 IFS=$as_save_IFS
5938 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005939 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005941 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 break 2
5944 fi
5945done
Matthias Kloseb9621712010-04-24 17:59:49 +00005946 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947IFS=$as_save_IFS
5948
5949fi
5950fi
5951AR=$ac_cv_prog_AR
5952if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5954$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959
5960
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005961 test -n "$AR" && break
5962 done
5963fi
5964if test -z "$AR"; then
5965 ac_ct_AR=$AR
5966 for ac_prog in ar aal
5967do
5968 # Extract the first word of "$ac_prog", so it can be a program name with args.
5969set dummy $ac_prog; ac_word=$2
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5971$as_echo_n "checking for $ac_word... " >&6; }
5972if ${ac_cv_prog_ac_ct_AR+:} false; then :
5973 $as_echo_n "(cached) " >&6
5974else
5975 if test -n "$ac_ct_AR"; then
5976 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5977else
5978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH
5980do
5981 IFS=$as_save_IFS
5982 test -z "$as_dir" && as_dir=.
5983 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005985 ac_cv_prog_ac_ct_AR="$ac_prog"
5986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5987 break 2
5988 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990 done
5991IFS=$as_save_IFS
5992
5993fi
5994fi
5995ac_ct_AR=$ac_cv_prog_ac_ct_AR
5996if test -n "$ac_ct_AR"; then
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5998$as_echo "$ac_ct_AR" >&6; }
5999else
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001$as_echo "no" >&6; }
6002fi
6003
6004
6005 test -n "$ac_ct_AR" && break
6006done
6007
6008 if test "x$ac_ct_AR" = x; then
6009 AR="ar"
6010 else
6011 case $cross_compiling:$ac_tool_warned in
6012yes:)
6013{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6014$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6015ac_tool_warned=yes ;;
6016esac
6017 AR=$ac_ct_AR
6018 fi
6019fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020
6021
6022# tweak ARFLAGS only if the user didn't set it on the command line
6023
6024if test -z "$ARFLAGS"
6025then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006026 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028
doko@ubuntu.com58844492012-06-30 18:25:32 +02006029if test -n "$ac_tool_prefix"; then
6030 for ac_prog in readelf
6031 do
6032 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6033set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_prog_READELF+:} false; then :
6037 $as_echo_n "(cached) " >&6
6038else
6039 if test -n "$READELF"; then
6040 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6041else
6042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045 IFS=$as_save_IFS
6046 test -z "$as_dir" && as_dir=.
6047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006049 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051 break 2
6052 fi
6053done
6054 done
6055IFS=$as_save_IFS
6056
6057fi
6058fi
6059READELF=$ac_cv_prog_READELF
6060if test -n "$READELF"; then
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6062$as_echo "$READELF" >&6; }
6063else
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069 test -n "$READELF" && break
6070 done
6071fi
6072if test -z "$READELF"; then
6073 ac_ct_READELF=$READELF
6074 for ac_prog in readelf
6075do
6076 # Extract the first word of "$ac_prog", so it can be a program name with args.
6077set dummy $ac_prog; ac_word=$2
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6079$as_echo_n "checking for $ac_word... " >&6; }
6080if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6081 $as_echo_n "(cached) " >&6
6082else
6083 if test -n "$ac_ct_READELF"; then
6084 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6085else
6086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6087for as_dir in $PATH
6088do
6089 IFS=$as_save_IFS
6090 test -z "$as_dir" && as_dir=.
6091 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006093 ac_cv_prog_ac_ct_READELF="$ac_prog"
6094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6095 break 2
6096 fi
6097done
6098 done
6099IFS=$as_save_IFS
6100
6101fi
6102fi
6103ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6104if test -n "$ac_ct_READELF"; then
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6106$as_echo "$ac_ct_READELF" >&6; }
6107else
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109$as_echo "no" >&6; }
6110fi
6111
6112
6113 test -n "$ac_ct_READELF" && break
6114done
6115
6116 if test "x$ac_ct_READELF" = x; then
6117 READELF=":"
6118 else
6119 case $cross_compiling:$ac_tool_warned in
6120yes:)
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6123ac_tool_warned=yes ;;
6124esac
6125 READELF=$ac_ct_READELF
6126 fi
6127fi
6128
6129if test "$cross_compiling" = yes; then
6130 case "$READELF" in
6131 readelf|:)
6132 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6133 ;;
6134 esac
6135fi
6136
6137
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006140hp*|HP*)
6141 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 if test -z "$INSTALL"
6143 then
6144 INSTALL="${srcdir}/install-sh -c"
6145 fi
6146esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147# Find a good install program. We prefer a C program (faster),
6148# so one script is as good as another. But avoid the broken or
6149# incompatible versions:
6150# SysV /etc/install, /usr/sbin/install
6151# SunOS /usr/etc/install
6152# IRIX /sbin/install
6153# AIX /bin/install
6154# AmigaOS /C/install, which installs bootblocks on floppy discs
6155# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6156# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6157# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6158# OS/2's system install, which has a completely different semantic
6159# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006160# Reject install programs that cannot install multiple files.
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6162$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006164if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166else
6167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170 IFS=$as_save_IFS
6171 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 # Account for people who put trailing slashes in PATH elements.
6173case $as_dir/ in #((
6174 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006176 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177 /usr/ucb/* ) ;;
6178 *)
6179 # OSF1 and SCO ODT 3.0 have their own names for install.
6180 # Don't use installbsd from OSF since it installs stuff as root
6181 # by default.
6182 for ac_prog in ginstall scoinst install; do
6183 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006184 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185 if test $ac_prog = install &&
6186 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6187 # AIX install. It has an incompatible calling convention.
6188 :
6189 elif test $ac_prog = install &&
6190 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6191 # program-specific install script used by HP pwplus--don't use.
6192 :
6193 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 rm -rf conftest.one conftest.two conftest.dir
6195 echo one > conftest.one
6196 echo two > conftest.two
6197 mkdir conftest.dir
6198 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6199 test -s conftest.one && test -s conftest.two &&
6200 test -s conftest.dir/conftest.one &&
6201 test -s conftest.dir/conftest.two
6202 then
6203 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6204 break 3
6205 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 fi
6207 fi
6208 done
6209 done
6210 ;;
6211esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006212
6213 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214IFS=$as_save_IFS
6215
Matthias Kloseb9621712010-04-24 17:59:49 +00006216rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217
6218fi
6219 if test "${ac_cv_path_install+set}" = set; then
6220 INSTALL=$ac_cv_path_install
6221 else
6222 # As a last resort, use the slow shell script. Don't cache a
6223 # value for INSTALL within a source directory, because that will
6224 # break other packages using the cache if that directory is
6225 # removed, or if the value is a relative name.
6226 INSTALL=$ac_install_sh
6227 fi
6228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6230$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231
6232# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6233# It thinks the first close brace ends the variable substitution.
6234test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6235
6236test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6237
6238test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6239
Matthias Klose93a0ef12012-03-15 18:08:34 +01006240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6241$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6242if test -z "$MKDIR_P"; then
6243 if ${ac_cv_path_mkdir+:} false; then :
6244 $as_echo_n "(cached) " >&6
6245else
6246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6248do
6249 IFS=$as_save_IFS
6250 test -z "$as_dir" && as_dir=.
6251 for ac_prog in mkdir gmkdir; do
6252 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006253 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006254 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6255 'mkdir (GNU coreutils) '* | \
6256 'mkdir (coreutils) '* | \
6257 'mkdir (fileutils) '4.1*)
6258 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6259 break 3;;
6260 esac
6261 done
6262 done
6263 done
6264IFS=$as_save_IFS
6265
6266fi
6267
6268 test -d ./--version && rmdir ./--version
6269 if test "${ac_cv_path_mkdir+set}" = set; then
6270 MKDIR_P="$ac_cv_path_mkdir -p"
6271 else
6272 # As a last resort, use the slow shell script. Don't cache a
6273 # value for MKDIR_P within a source directory, because that will
6274 # break other packages using the cache if that directory is
6275 # removed, or if the value is a relative name.
6276 MKDIR_P="$ac_install_sh -d"
6277 fi
6278fi
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6280$as_echo "$MKDIR_P" >&6; }
6281
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
6283# Not every filesystem supports hard links
6284
6285if test -z "$LN" ; then
6286 case $ac_sys_system in
6287 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 *) LN=ln;;
6289 esac
6290fi
6291
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006292# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006293
6294ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6298$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299
6300# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006301if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302 withval=$with_pydebug;
6303if test "$withval" != no
6304then
6305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6309$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006311 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006312else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314fi
6315else
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318fi
6319
6320
T. Woutersddbfa2c2017-05-23 01:30:49 +02006321# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6322# the ABI. This allows enabling assertions without changing the ABI.
6323assertions='false'
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6325$as_echo_n "checking for --with-assertions... " >&6; }
6326
6327# Check whether --with-assertions was given.
6328if test "${with_assertions+set}" = set; then :
6329 withval=$with_assertions;
6330if test "$withval" != no
6331then
6332 assertions='true'
6333fi
6334fi
6335
6336if test "$assertions" = 'true'; then
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338$as_echo "yes" >&6; }
6339elif test "$Py_DEBUG" = 'true'; then
6340 assertions='true'
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6342$as_echo "implied by --with-pydebug" >&6; }
6343else
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
Brett Cannon63d98bc2016-09-06 17:12:40 -07006348# Enable optimization flags
6349
6350
6351Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6353$as_echo_n "checking for --enable-optimizations... " >&6; }
6354# Check whether --enable-optimizations was given.
6355if test "${enable_optimizations+set}" = set; then :
6356 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006357if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006358then
6359 Py_OPT='true'
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6361$as_echo "yes" >&6; };
6362else
6363 Py_OPT='false'
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; };
6366fi
6367else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
6372if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006373 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6374 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006375 # 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 +00006376 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006377 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006378 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006379 DEF_MAKE_RULE="build_all"
6380else
6381 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006382 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006383 DEF_MAKE_RULE="all"
6384fi
6385
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006386# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6388$as_echo_n "checking for --with-lto... " >&6; }
6389
6390# Check whether --with-lto was given.
6391if test "${with_lto+set}" = set; then :
6392 withval=$with_lto;
6393if test "$withval" != no
6394then
6395 Py_LTO='true'
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6397$as_echo "yes" >&6; };
6398else
6399 Py_LTO='false'
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401$as_echo "no" >&6; };
6402fi
6403else
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405$as_echo "no" >&6; }
6406fi
6407
6408if test "$Py_LTO" = 'true' ; then
6409 case $CC in
6410 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006411 case $ac_sys_system in
6412 Darwin*)
6413 # Any changes made here should be reflected in the GCC+Darwin case below
6414 LTOFLAGS="-flto -Wl,-export_dynamic"
6415 ;;
6416 *)
6417 LTOFLAGS="-flto"
6418 ;;
6419 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006420 ;;
6421 *gcc*)
6422 case $ac_sys_system in
6423 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006424 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006425 ;;
6426 *)
6427 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6428 ;;
6429 esac
6430 ;;
6431 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006432 CFLAGS="$CFLAGS $LTOFLAGS"
6433 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006434fi
6435
Brett Cannon7188a3e2015-09-18 15:13:44 -07006436# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006437
6438
6439
6440
6441
Gregory P. Smith799520c2016-09-07 16:10:00 -07006442# Make this work on systems where llvm tools are not installed with their
6443# normal names in the default $PATH (ie: Ubuntu). They exist under the
6444# non-suffixed name in their versioned llvm directory.
6445llvm_bin_dir=''
6446llvm_path="${PATH}"
6447if test "${CC}" = "clang"
6448then
6449 clang_bin=`which clang`
6450 # Some systems install clang elsewhere as a symlink to the real path
6451 # which is where the related llvm tools are located.
6452 if test -L "${clang_bin}"
6453 then
6454 clang_dir=`dirname "${clang_bin}"`
6455 clang_bin=`readlink "${clang_bin}"`
6456 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6457 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6458 fi
6459fi
Zachary Ware5af85642015-12-21 12:09:17 -06006460
Gregory P. Smith799520c2016-09-07 16:10:00 -07006461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6462$as_echo_n "checking target system type... " >&6; }
6463if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006464 $as_echo_n "(cached) " >&6
6465else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006466 if test "x$target_alias" = x; then
6467 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006468else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006469 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6470 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6471fi
6472
6473fi
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6475$as_echo "$ac_cv_target" >&6; }
6476case $ac_cv_target in
6477*-*-*) ;;
6478*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6479esac
6480target=$ac_cv_target
6481ac_save_IFS=$IFS; IFS='-'
6482set x $ac_cv_target
6483shift
6484target_cpu=$1
6485target_vendor=$2
6486shift; shift
6487# Remember, the first character of IFS is used to create $*,
6488# except with old shells:
6489target_os=$*
6490IFS=$ac_save_IFS
6491case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6492
6493
6494# The aliases save the names the user supplied, while $host etc.
6495# will get canonicalized.
6496test -n "$target_alias" &&
6497 test "$program_prefix$program_suffix$program_transform_name" = \
6498 NONENONEs,x,x, &&
6499 program_prefix=${target_alias}-
6500# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6501set dummy $target_alias-llvm-profdata; ac_word=$2
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6503$as_echo_n "checking for $ac_word... " >&6; }
6504if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6505 $as_echo_n "(cached) " >&6
6506else
6507 case $LLVM_PROFDATA in
6508 [\\/]* | ?:[\\/]*)
6509 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6510 ;;
6511 *)
6512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006514do
6515 IFS=$as_save_IFS
6516 test -z "$as_dir" && as_dir=.
6517 for ac_exec_ext in '' $ac_executable_extensions; do
6518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006519 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6521 break 2
6522 fi
6523done
6524 done
6525IFS=$as_save_IFS
6526
Gregory P. Smith799520c2016-09-07 16:10:00 -07006527 ;;
6528esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006529fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006530LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6531if test -n "$LLVM_PROFDATA"; then
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6533$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539
Gregory P. Smith799520c2016-09-07 16:10:00 -07006540if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6541 if test "$build" = "$target"; then
6542 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6543 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6544set dummy llvm-profdata; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6548 $as_echo_n "(cached) " >&6
6549else
6550 case $ac_pt_LLVM_PROFDATA in
6551 [\\/]* | ?:[\\/]*)
6552 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6553 ;;
6554 *)
6555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in ${llvm_path}
6557do
6558 IFS=$as_save_IFS
6559 test -z "$as_dir" && as_dir=.
6560 for ac_exec_ext in '' $ac_executable_extensions; do
6561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564 break 2
6565 fi
6566done
6567 done
6568IFS=$as_save_IFS
6569
6570 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6571 ;;
6572esac
6573fi
6574ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6575if test -n "$ac_pt_LLVM_PROFDATA"; then
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6577$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6578else
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
6581fi
6582
6583 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6584 else
6585 LLVM_PROFDATA="''"
6586 fi
6587else
6588 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6589fi
6590
6591
6592if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6593then
6594 LLVM_PROF_FOUND="found"
6595else
6596 LLVM_PROF_FOUND="not-found"
6597fi
6598if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6599then
6600 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6601 if test -n "${found_llvm_profdata}"
6602 then
6603 # llvm-profdata isn't directly in $PATH in some cases.
6604 # https://apple.stackexchange.com/questions/197053/
6605 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6606 LLVM_PROF_FOUND=found
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6608$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6609 fi
6610fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006611LLVM_PROF_ERR=no
6612case $CC in
6613 *clang*)
6614 # Any changes made here should be reflected in the GCC+Darwin case below
6615 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6616 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006617 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006618 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6619 if test $LLVM_PROF_FOUND = not-found
6620 then
6621 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006622 if test "${REQUIRE_PGO}" = "yes"
6623 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006624 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 -07006625 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006626 fi
6627 ;;
6628 *gcc*)
6629 case $ac_sys_system in
6630 Darwin*)
6631 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6632 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006633 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006634 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636 then
6637 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006638 if test "${REQUIRE_PGO}" = "yes"
6639 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006640 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 -07006641 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 fi
6643 ;;
6644 *)
6645 PGO_PROF_GEN_FLAG="-fprofile-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6647 LLVM_PROF_MERGER="true"
6648 LLVM_PROF_FILE=""
6649 ;;
6650 esac
6651 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006652 *icc*)
6653 PGO_PROF_GEN_FLAG="-prof-gen"
6654 PGO_PROF_USE_FLAG="-prof-use"
6655 LLVM_PROF_MERGER="true"
6656 LLVM_PROF_FILE=""
6657 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006658esac
6659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006660# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6661# merged with this chunk of code?
6662
6663# Optimizer/debugger flags
6664# ------------------------
6665# (The following bit of code is complicated enough - please keep things
6666# indented properly. Just pretend you're editing Python code. ;-)
6667
6668# There are two parallel sets of case statements below, one that checks to
6669# see if OPT was set and one that does BASECFLAGS setting based upon
6670# compiler and platform. BASECFLAGS tweaks need to be made even if the
6671# user set OPT.
6672
6673# tweak OPT based on compiler and platform, only if the user didn't set
6674# it on the command line
6675
Victor Stinner9ed34a82017-05-02 22:35:58 +02006676
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006677if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678then
6679 case $GCC in
6680 yes)
6681 if test "$CC" != 'g++' ; then
6682 STRICT_PROTO="-Wstrict-prototypes"
6683 fi
6684 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6685 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6686 WRAP="-fwrapv"
6687 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006688
Stefan Krahaf04ff22011-12-08 22:20:31 +01006689 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006690 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006691 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006692 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006693 *)
6694 if $CC --version 2>&1 | grep -q clang
6695 then
6696 cc_is_clang=1
6697 else
6698 cc_is_clang=
6699 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006700 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006701
Victor Stinner35f3d242017-04-21 12:35:24 +02006702 if test -n "${cc_is_clang}"
6703 then
6704 # Clang also needs -fwrapv
6705 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006706 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6707 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006708 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006709 fi
6710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711 case $ac_cv_prog_cc_g in
6712 yes)
6713 if test "$Py_DEBUG" = 'true' ; then
6714 # Optimization messes up debuggers, so turn it off for
6715 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006716 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006717 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006718 else
Victor Stinner28205b22017-04-21 11:24:34 +02006719 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006720 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721 else
Victor Stinner28205b22017-04-21 11:24:34 +02006722 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723 fi
6724 ;;
6725 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006726 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ;;
6728 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006729
Victor Stinner826f83f2017-04-28 15:07:10 +02006730 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 case $ac_sys_system in
6733 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6734 ;;
6735 esac
6736 ;;
6737
6738 *)
6739 OPT="-O"
6740 ;;
6741 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742fi
6743
6744
6745
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747# The -arch flags for universal builds on OSX
6748UNIVERSAL_ARCH_FLAGS=
6749
6750
6751# tweak BASECFLAGS based on compiler and platform
6752case $GCC in
6753yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006754 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006755
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6757$as_echo_n "checking for -Wextra... " >&6; }
6758 ac_save_cc="$CC"
6759 CC="$CC -Wextra -Werror"
6760 if ${ac_cv_extra_warnings+:} false; then :
6761 $as_echo_n "(cached) " >&6
6762else
6763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6764/* end confdefs.h. */
6765
6766
6767int
6768main ()
6769{
6770
6771 ;
6772 return 0;
6773}
6774
6775_ACEOF
6776if ac_fn_c_try_compile "$LINENO"; then :
6777
6778 ac_cv_extra_warnings=yes
6779
6780else
6781
6782 ac_cv_extra_warnings=no
6783
6784fi
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6786fi
6787
6788 CC="$ac_save_cc"
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6790$as_echo "$ac_cv_extra_warnings" >&6; }
6791
6792 if test $ac_cv_extra_warnings = yes
6793 then
6794 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6795 fi
6796
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006797 # Python doesn't violate C99 aliasing rules, but older versions of
6798 # GCC produce warnings for legal Python code. Enable
6799 # -fno-strict-aliasing on versions of GCC that support but produce
6800 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6802$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803 ac_save_cc="$CC"
6804 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006805 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006806 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006811
Matthias Kloseb159a552010-04-25 21:00:44 +00006812
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006813int
6814main ()
6815{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006816
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006817 ;
6818 return 0;
6819}
Matthias Kloseb159a552010-04-25 21:00:44 +00006820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006822if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006823
6824 CC="$ac_save_cc -fstrict-aliasing"
6825 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006827/* end confdefs.h. */
6828
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006829 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830int
6831main ()
6832{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006833double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834 ;
6835 return 0;
6836}
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006839if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006840
6841 ac_cv_no_strict_aliasing=no
6842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843else
Matthias Kloseb159a552010-04-25 21:00:44 +00006844
6845 ac_cv_no_strict_aliasing=yes
6846
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006850else
Matthias Kloseb159a552010-04-25 21:00:44 +00006851
6852 ac_cv_no_strict_aliasing=no
6853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006856fi
6857
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6861$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 then
6864 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6865 fi
6866
Zachary Ware5af85642015-12-21 12:09:17 -06006867 # ICC doesn't recognize the option, but only emits a warning
6868 ## XXX does it emit an unused result warning and can it be disabled?
6869 case "$CC" in
6870 *icc*)
6871 ac_cv_disable_unused_result_warning=no
6872 ;;
6873 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6875$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6876 ac_save_cc="$CC"
6877 CC="$CC -Wunused-result -Werror"
6878 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006879 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006880 $as_echo_n "(cached) " >&6
6881else
6882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883/* end confdefs.h. */
6884
6885
6886int
6887main ()
6888{
6889
6890 ;
6891 return 0;
6892}
6893
6894_ACEOF
6895if ac_fn_c_try_compile "$LINENO"; then :
6896
6897 ac_cv_disable_unused_result_warning=yes
6898
6899else
6900
6901 ac_cv_disable_unused_result_warning=no
6902
6903fi
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6905fi
6906
6907 CFLAGS="$save_CFLAGS"
6908 CC="$ac_save_cc"
6909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6910$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006911 ;;
6912 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006913
6914 if test $ac_cv_disable_unused_result_warning = yes
6915 then
6916 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006917 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6918 fi
6919
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6921$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6922 ac_save_cc="$CC"
6923 CC="$CC -Wunused-parameter -Werror"
6924 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6925 $as_echo_n "(cached) " >&6
6926else
6927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6928/* end confdefs.h. */
6929
6930
6931int
6932main ()
6933{
6934
6935 ;
6936 return 0;
6937}
6938
6939_ACEOF
6940if ac_fn_c_try_compile "$LINENO"; then :
6941
6942 ac_cv_disable_unused_parameter_warning=yes
6943
6944else
6945
6946 ac_cv_disable_unused_parameter_warning=no
6947
6948fi
6949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6950fi
6951
6952 CC="$ac_save_cc"
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6954$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6955
6956 if test $ac_cv_disable_unused_parameter_warning = yes
6957 then
6958 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6959 fi
6960
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6962$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6963 ac_save_cc="$CC"
6964 CC="$CC -Wmissing-field-initializers -Werror"
6965 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6966 $as_echo_n "(cached) " >&6
6967else
6968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6969/* end confdefs.h. */
6970
6971
6972int
6973main ()
6974{
6975
6976 ;
6977 return 0;
6978}
6979
6980_ACEOF
6981if ac_fn_c_try_compile "$LINENO"; then :
6982
6983 ac_cv_disable_missing_field_initializers=yes
6984
6985else
6986
6987 ac_cv_disable_missing_field_initializers=no
6988
6989fi
6990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6991fi
6992
6993 CC="$ac_save_cc"
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
6995$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
6996
6997 if test $ac_cv_disable_missing_field_initializers = yes
6998 then
6999 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007000 fi
7001
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7003$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7004 ac_save_cc="$CC"
7005 CC="$CC -Wsign-compare"
7006 save_CFLAGS="$CFLAGS"
7007 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7008 $as_echo_n "(cached) " >&6
7009else
7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011/* end confdefs.h. */
7012
7013
7014int
7015main ()
7016{
7017
7018 ;
7019 return 0;
7020}
7021
7022_ACEOF
7023if ac_fn_c_try_compile "$LINENO"; then :
7024
7025 ac_cv_enable_sign_compare_warning=yes
7026
7027else
7028
7029 ac_cv_enable_sign_compare_warning=no
7030
7031fi
7032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7033fi
7034
7035 CFLAGS="$save_CFLAGS"
7036 CC="$ac_save_cc"
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7038$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7039
7040 if test $ac_cv_enable_sign_compare_warning = yes
7041 then
7042 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7043 fi
7044
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7046$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7047 ac_save_cc="$CC"
7048 CC="$CC -Wunreachable-code"
7049 save_CFLAGS="$CFLAGS"
7050 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7051 $as_echo_n "(cached) " >&6
7052else
7053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054/* end confdefs.h. */
7055
7056
7057int
7058main ()
7059{
7060
7061 ;
7062 return 0;
7063}
7064
7065_ACEOF
7066if ac_fn_c_try_compile "$LINENO"; then :
7067
7068 ac_cv_enable_unreachable_code_warning=yes
7069
7070else
7071
7072 ac_cv_enable_unreachable_code_warning=no
7073
7074fi
7075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7076fi
7077
7078 CFLAGS="$save_CFLAGS"
7079 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007080
7081 # Don't enable unreachable code warning in debug mode, since it usually
7082 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007083 # Issue #24324: Unfortunately, the unreachable code warning does not work
7084 # correctly on gcc and has been silently removed from the compiler.
7085 # It is supported on clang but on OS X systems gcc may be an alias
7086 # for clang. Try to determine if the compiler is not really gcc and,
7087 # if so, only then enable the warning.
7088 if test $ac_cv_enable_unreachable_code_warning = yes && \
7089 test "$Py_DEBUG" != "true" && \
7090 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007091 then
7092 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007093 else
7094 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007095 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7097$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007098
Victor Stinner193ee0a2017-02-06 14:24:00 +01007099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7100$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7101 ac_save_cc="$CC"
7102 CC="$CC -Werror=implicit-function-declaration"
7103 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7104 $as_echo_n "(cached) " >&6
7105else
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108
7109
7110int
7111main ()
7112{
7113
7114 ;
7115 return 0;
7116}
7117
7118_ACEOF
7119if ac_fn_c_try_compile "$LINENO"; then :
7120
7121 ac_cv_enable_implicit_function_declaration_error=yes
7122
7123else
7124
7125 ac_cv_enable_implicit_function_declaration_error=no
7126
7127fi
7128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129fi
7130
7131 CC="$ac_save_cc"
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7133$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7134
7135 if test $ac_cv_enable_implicit_function_declaration_error = yes
7136 then
7137 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7138 fi
7139
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007140 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7141 # support. Without this, treatment of subnormals doesn't follow
7142 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007143 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007144 alpha*)
7145 BASECFLAGS="$BASECFLAGS -mieee"
7146 ;;
7147 esac
7148
7149 case $ac_sys_system in
7150 SCO_SV*)
7151 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7152 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007153
Ned Deily87adb6e2013-10-18 21:09:56 -07007154 Darwin*)
7155 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7156 # used to be here, but non-Apple gcc doesn't accept them.
7157 if test "${CC}" = gcc
7158 then
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007160$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007161 case "${UNIVERSALSDK}" in
7162 */MacOSX10.4u.sdk)
7163 # Build using 10.4 SDK, force usage of gcc when the
7164 # compiler is gcc, otherwise the user will get very
7165 # confusing error messages when building on OSX 10.6
7166 CC=gcc-4.0
7167 CPP=cpp-4.0
7168 ;;
7169 esac
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007171$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007173
Ned Deily87adb6e2013-10-18 21:09:56 -07007174 if test "${enable_universalsdk}"
7175 then
7176 case "$UNIVERSAL_ARCHS" in
7177 32-bit)
7178 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7179 LIPO_32BIT_FLAGS=""
7180 ARCH_RUN_32BIT=""
7181 ;;
7182 64-bit)
7183 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7184 LIPO_32BIT_FLAGS=""
7185 ARCH_RUN_32BIT="true"
7186 ;;
7187 all)
7188 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7189 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7190 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7191 ;;
7192 intel)
7193 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7194 LIPO_32BIT_FLAGS="-extract i386"
7195 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7196 ;;
7197 intel-32)
7198 UNIVERSAL_ARCH_FLAGS="-arch i386"
7199 LIPO_32BIT_FLAGS=""
7200 ARCH_RUN_32BIT=""
7201 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007202 intel-64)
7203 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7204 LIPO_32BIT_FLAGS=""
7205 ARCH_RUN_32BIT="true"
7206 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007207 3-way)
7208 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7209 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7210 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7211 ;;
7212 *)
7213 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7214 ;;
7215 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216
Ned Deily87adb6e2013-10-18 21:09:56 -07007217 if test "${UNIVERSALSDK}" != "/"
7218 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007219 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7220 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007221 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007222 else
7223 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7224 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007225 fi
7226 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227
Ned Deily87adb6e2013-10-18 21:09:56 -07007228 # Calculate an appropriate deployment target for this build:
7229 # The deployment target value is used explicitly to enable certain
7230 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007231 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007232 # component of the string returned by distutils.get_platform().
7233 #
7234 # Use the value from:
7235 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7236 # 2. the operating system version of the build machine if >= 10.6
7237 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7238 # below to pick either 10.3, 10.4, or 10.5 as the target.
7239 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240
Ned Deily87adb6e2013-10-18 21:09:56 -07007241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7242$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007243 cur_target_major=`sw_vers -productVersion | \
7244 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7245 cur_target_minor=`sw_vers -productVersion | \
7246 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7247 cur_target="${cur_target_major}.${cur_target_minor}"
7248 if test ${cur_target_major} -eq 10 && \
7249 test ${cur_target_minor} -ge 3 && \
7250 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007251 then
Ned Deily36820b62014-06-25 13:44:22 -07007252 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007253 cur_target=10.3
7254 if test ${enable_universalsdk}
7255 then
7256 case "$UNIVERSAL_ARCHS" in
7257 all|3-way|intel|64-bit)
7258 # These configurations were first supported in 10.5
7259 cur_target='10.5'
7260 ;;
7261 esac
7262 else
7263 if test `/usr/bin/arch` = "i386"
7264 then
7265 # 10.4 was the first release to support Intel archs
7266 cur_target="10.4"
7267 fi
7268 fi
7269 fi
7270 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007271
Ned Deily87adb6e2013-10-18 21:09:56 -07007272 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7273 # environment with a value that is the same as what we'll use
7274 # in the Makefile to ensure that we'll get the same compiler
7275 # environment during configure and build time.
7276 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7277 export MACOSX_DEPLOYMENT_TARGET
7278 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7280$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007281
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 # end of Darwin* tests
7283 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007284 esac
7285 ;;
7286
7287*)
7288 case $ac_sys_system in
7289 OpenUNIX*|UnixWare*)
7290 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7291 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292 SCO_SV*)
7293 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7294 ;;
7295 esac
7296 ;;
7297esac
7298
Zachary Ware5af85642015-12-21 12:09:17 -06007299# ICC needs -fp-model strict or floats behave badly
7300case "$CC" in
7301*icc*)
7302 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7303 ;;
7304esac
7305
T. Woutersddbfa2c2017-05-23 01:30:49 +02007306if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007307 :
7308else
7309 OPT="-DNDEBUG $OPT"
7310fi
7311
7312if test "$ac_arch_flags"
7313then
7314 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7315fi
7316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317# On some compilers, pthreads are available without further options
7318# (e.g. MacOS X). On some of these systems, the compiler will not
7319# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7320# So we have to see first whether pthreads are available without
7321# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7323$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007324if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007325 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326else
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328 ac_cv_pthread_is_default=no
7329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007331/* end confdefs.h. */
7332
Stefan Krah7dba5942012-11-22 22:49:11 +01007333#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334#include <pthread.h>
7335
7336void* routine(void* p){return NULL;}
7337
7338int main(){
7339 pthread_t p;
7340 if(pthread_create(&p,NULL,routine,NULL)!=0)
7341 return 1;
7342 (void)pthread_detach(p);
7343 return 0;
7344}
7345
7346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007347if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348
7349 ac_cv_pthread_is_default=yes
7350 ac_cv_kthread=no
7351 ac_cv_pthread=no
7352
7353else
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358fi
7359
7360
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361fi
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7364$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365
7366
7367if test $ac_cv_pthread_is_default = yes
7368then
7369 ac_cv_kpthread=no
7370else
7371# -Kpthread, if available, provides the right #defines
7372# and linker options to make pthread_create available
7373# Some compilers won't report that they do not support -Kpthread,
7374# so we need to run a program to see whether it really made the
7375# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7377$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007378if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380else
7381 ac_save_cc="$CC"
7382CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007383if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384 ac_cv_kpthread=no
7385else
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387/* end confdefs.h. */
7388
Stefan Krah7dba5942012-11-22 22:49:11 +01007389#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390#include <pthread.h>
7391
7392void* routine(void* p){return NULL;}
7393
7394int main(){
7395 pthread_t p;
7396 if(pthread_create(&p,NULL,routine,NULL)!=0)
7397 return 1;
7398 (void)pthread_detach(p);
7399 return 0;
7400}
7401
7402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007403if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404 ac_cv_kpthread=yes
7405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7409 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410fi
7411
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412CC="$ac_save_cc"
7413fi
7414
Matthias Kloseb9621712010-04-24 17:59:49 +00007415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7416$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417fi
7418
7419if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7420then
7421# -Kthread, 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 -Kthread,
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 -Kthread" >&5
7427$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007428if ${ac_cv_kthread+:} 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 -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 ac_cv_kthread=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_kthread=yes
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 ac_cv_kthread=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_kthread" >&5
7466$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
7468
7469if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7470then
7471# -pthread, 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 -pthread,
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 -pthread" >&5
7477$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007478if ${ac_cv_pthread+:} 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 -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 ac_cv_pthread=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_pthread=yes
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_pthread=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_pthread" >&5
7516$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
7519# If we have set a CC compiler flag for thread support then
7520# check if it works for CXX, too.
7521ac_cv_cxx_thread=no
7522if test ! -z "$CXX"
7523then
Matthias Kloseb9621712010-04-24 17:59:49 +00007524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7525$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526ac_save_cxx="$CXX"
7527
7528if test "$ac_cv_kpthread" = "yes"
7529then
7530 CXX="$CXX -Kpthread"
7531 ac_cv_cxx_thread=yes
7532elif test "$ac_cv_kthread" = "yes"
7533then
7534 CXX="$CXX -Kthread"
7535 ac_cv_cxx_thread=yes
7536elif test "$ac_cv_pthread" = "yes"
7537then
7538 CXX="$CXX -pthread"
7539 ac_cv_cxx_thread=yes
7540fi
7541
7542if test $ac_cv_cxx_thread = yes
7543then
7544 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7545 $CXX -c conftest.$ac_ext 2>&5
7546 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7547 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7548 then
7549 ac_cv_cxx_thread=yes
7550 else
7551 ac_cv_cxx_thread=no
7552 fi
7553 rm -fr conftest*
7554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7556$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
7558CXX="$ac_save_cxx"
7559
7560
7561# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7563$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007564if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568/* end confdefs.h. */
7569#include <stdlib.h>
7570#include <stdarg.h>
7571#include <string.h>
7572#include <float.h>
7573
7574int
7575main ()
7576{
7577
7578 ;
7579 return 0;
7580}
7581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007582if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583 ac_cv_header_stdc=yes
7584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7588
7589if test $ac_cv_header_stdc = yes; then
7590 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592/* end confdefs.h. */
7593#include <string.h>
7594
7595_ACEOF
7596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 $EGREP "memchr" >/dev/null 2>&1; then :
7598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599else
7600 ac_cv_header_stdc=no
7601fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007602rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603
7604fi
7605
7606if test $ac_cv_header_stdc = yes; then
7607 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609/* end confdefs.h. */
7610#include <stdlib.h>
7611
7612_ACEOF
7613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $EGREP "free" >/dev/null 2>&1; then :
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
7617 ac_cv_header_stdc=no
7618fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007619rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620
7621fi
7622
7623if test $ac_cv_header_stdc = yes; then
7624 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 :
7627else
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629/* end confdefs.h. */
7630#include <ctype.h>
7631#include <stdlib.h>
7632#if ((' ' & 0x0FF) == 0x020)
7633# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7634# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7635#else
7636# define ISLOWER(c) \
7637 (('a' <= (c) && (c) <= 'i') \
7638 || ('j' <= (c) && (c) <= 'r') \
7639 || ('s' <= (c) && (c) <= 'z'))
7640# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7641#endif
7642
7643#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7644int
7645main ()
7646{
7647 int i;
7648 for (i = 0; i < 256; i++)
7649 if (XOR (islower (i), ISLOWER (i))
7650 || toupper (i) != TOUPPER (i))
7651 return 2;
7652 return 0;
7653}
7654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007655if ac_fn_c_try_run "$LINENO"; then :
7656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657else
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
7663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7667$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668if test $ac_cv_header_stdc = yes; then
7669
Matthias Kloseb9621712010-04-24 17:59:49 +00007670$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671
7672fi
7673
stratakise768c862018-01-23 16:11:24 +01007674for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007675fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007676ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007677sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007678unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007679poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007680sys/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 +01007681sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007682sys/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 +01007683sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007684sys/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 -07007685libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007686linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007687sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007688do :
7689 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7690ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007691if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007693#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007694_ACEOF
7695
7696fi
7697
Guido van Rossum627b2d71993-12-24 10:39:16 +00007698done
7699
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007700ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007701for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7704$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007705if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710#include <sys/types.h>
7711#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007712
Martin v. Löwis11437992002-04-12 09:54:03 +00007713int
7714main ()
7715{
7716if ((DIR *) 0)
7717return 0;
7718 ;
7719 return 0;
7720}
7721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007723 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729eval ac_res=\$$as_ac_Header
7730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7731$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007732if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007734#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007735_ACEOF
7736
7737ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007739
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740done
7741# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7742if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7744$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007745if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747else
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752/* Override any GCC internal prototype to avoid an error.
7753 Use char because int might match the return type of a GCC
7754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007755#ifdef __cplusplus
7756extern "C"
7757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007758char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007759int
7760main ()
7761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ;
7764 return 0;
7765}
7766_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767for ac_lib in '' dir; do
7768 if test -z "$ac_lib"; then
7769 ac_res="none required"
7770 else
7771 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007772 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007775 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777rm -f core conftest.err conftest.$ac_objext \
7778 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007779 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782done
Victor Stinnere0be4232011-10-25 13:06:09 +02007783if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785else
7786 ac_cv_search_opendir=no
7787fi
7788rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007789LIBS=$ac_func_search_save_LIBS
7790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7792$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007794if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007796
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007798
Michael W. Hudson54241132001-12-07 15:38:26 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7801$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007802if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007804else
7805 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809/* Override any GCC internal prototype to avoid an error.
7810 Use char because int might match the return type of a GCC
7811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007812#ifdef __cplusplus
7813extern "C"
7814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007815char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007816int
7817main ()
7818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ;
7821 return 0;
7822}
7823_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824for ac_lib in '' x; do
7825 if test -z "$ac_lib"; then
7826 ac_res="none required"
7827 else
7828 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834rm -f core conftest.err conftest.$ac_objext \
7835 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007836 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839done
Victor Stinnere0be4232011-10-25 13:06:09 +02007840if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842else
7843 ac_cv_search_opendir=no
7844fi
7845rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007846LIBS=$ac_func_search_save_LIBS
7847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7849$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007851if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007853
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854fi
7855
7856fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007857
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7859$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007860if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007864/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007865#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007866int
7867main ()
7868{
7869return makedev(0, 0);
7870 ;
7871 return 0;
7872}
7873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007875 ac_cv_header_sys_types_h_makedev=yes
7876else
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007879rm -f core conftest.err conftest.$ac_objext \
7880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007881
7882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7884$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007885
7886if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007887ac_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 +02007888if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007891
7892fi
7893
7894
7895
7896 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 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 +02007898if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007901
7902fi
7903
7904
7905 fi
7906fi
7907
Michael W. Hudson54241132001-12-07 15:38:26 +00007908
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007909# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7910# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7911SAVE_CFLAGS=$CFLAGS
7912CFLAGS="-std=c99 $CFLAGS"
7913for ac_header in bluetooth/bluetooth.h
7914do :
7915 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7916if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7917 cat >>confdefs.h <<_ACEOF
7918#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7919_ACEOF
7920
7921fi
7922
7923done
7924
7925CFLAGS=$SAVE_CFLAGS
7926
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007927# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7928for ac_header in net/if.h
7929do :
7930 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7931#ifdef STDC_HEADERS
7932# include <stdlib.h>
7933# include <stddef.h>
7934#else
7935# ifdef HAVE_STDLIB_H
7936# include <stdlib.h>
7937# endif
7938#endif
7939#ifdef HAVE_SYS_SOCKET_H
7940# include <sys/socket.h>
7941#endif
7942
7943"
Victor Stinnere0be4232011-10-25 13:06:09 +02007944if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007945 cat >>confdefs.h <<_ACEOF
7946#define HAVE_NET_IF_H 1
7947_ACEOF
7948
7949fi
7950
7951done
7952
7953
Martin v. Löwis11017b12006-01-14 18:12:57 +00007954# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007955for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007956do :
7957 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 +00007958#ifdef HAVE_ASM_TYPES_H
7959#include <asm/types.h>
7960#endif
7961#ifdef HAVE_SYS_SOCKET_H
7962#include <sys/socket.h>
7963#endif
7964
Matthias Kloseb9621712010-04-24 17:59:49 +00007965"
Victor Stinnere0be4232011-10-25 13:06:09 +02007966if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007967 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007968#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007969_ACEOF
7970
7971fi
7972
7973done
7974
7975
caaveryeffc12f2017-09-06 18:18:10 -04007976for ac_header in linux/vm_sockets.h
7977do :
7978 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7979#ifdef HAVE_SYS_SOCKET_H
7980#include <sys/socket.h>
7981#endif
7982
7983"
7984if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
7985 cat >>confdefs.h <<_ACEOF
7986#define HAVE_LINUX_VM_SOCKETS_H 1
7987_ACEOF
7988
7989fi
7990
7991done
7992
7993
Charles-François Natali47413c12011-10-06 19:47:44 +02007994# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007995for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007996do :
7997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7998ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7999#ifdef HAVE_SYS_SOCKET_H
8000#include <sys/socket.h>
8001#endif
8002
8003"
8004if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8005 cat >>confdefs.h <<_ACEOF
8006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8007_ACEOF
8008
8009fi
8010
8011done
8012
8013
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008015was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8017$as_echo_n "checking for clock_t in time.h... " >&6; }
8018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
8022_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008025 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008026else
Martin v. Löwis11437992002-04-12 09:54:03 +00008027
8028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008030
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008031
Guido van Rossum627b2d71993-12-24 10:39:16 +00008032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008033rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8036$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8039$as_echo_n "checking for makedev... " >&6; }
8040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008042
Jesus Cea740f53a2010-04-28 11:35:30 +00008043#if defined(MAJOR_IN_MKDEV)
8044#include <sys/mkdev.h>
8045#elif defined(MAJOR_IN_SYSMACROS)
8046#include <sys/sysmacros.h>
8047#else
8048#include <sys/types.h>
8049#endif
8050
Neal Norwitz11690112002-07-30 01:08:28 +00008051int
8052main ()
8053{
Jesus Cea740f53a2010-04-28 11:35:30 +00008054
8055 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008056 ;
8057 return 0;
8058}
Matthias Kloseb159a552010-04-25 21:00:44 +00008059
Neal Norwitz11690112002-07-30 01:08:28 +00008060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008061if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008062 ac_cv_has_makedev=yes
8063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008066rm -f core conftest.err conftest.$ac_objext \
8067 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8069$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008070if test "$ac_cv_has_makedev" = "yes"; then
8071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008073
8074fi
8075
Christian Heimes985ecdc2013-11-20 11:46:18 +01008076# byte swapping
8077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8078$as_echo_n "checking for le64toh... " >&6; }
8079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8080/* end confdefs.h. */
8081
8082#ifdef HAVE_ENDIAN_H
8083#include <endian.h>
8084#elif defined(HAVE_SYS_ENDIAN_H)
8085#include <sys/endian.h>
8086#endif
8087
8088int
8089main ()
8090{
8091
8092 le64toh(1)
8093 ;
8094 return 0;
8095}
8096
8097_ACEOF
8098if ac_fn_c_try_link "$LINENO"; then :
8099 ac_cv_has_le64toh=yes
8100else
8101 ac_cv_has_le64toh=no
8102fi
8103rm -f core conftest.err conftest.$ac_objext \
8104 conftest$ac_exeext conftest.$ac_ext
8105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8106$as_echo "$ac_cv_has_le64toh" >&6; }
8107if test "$ac_cv_has_le64toh" = "yes"; then
8108
8109$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8110
8111fi
8112
Martin v. Löwis399a6892002-10-04 10:22:02 +00008113use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008114# Don't use largefile support for GNU/Hurd
8115case $ac_sys_system in GNU*)
8116 use_lfs=no
8117esac
8118
Martin v. Löwis399a6892002-10-04 10:22:02 +00008119if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008120# Two defines needed to enable largefile support on various platforms
8121# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008122case $ac_sys_system/$ac_sys_release in
8123AIX*)
8124
8125$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8126
8127 ;;
8128esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
8132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008134
Martin v. Löwis399a6892002-10-04 10:22:02 +00008135fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008136
Guido van Rossum84e7b241996-08-19 21:59:00 +00008137# Add some code to confdefs.h so that the test for off_t works on SCO
8138cat >> confdefs.h <<\EOF
8139#if defined(SCO_DS)
8140#undef _OFF_T
8141#endif
8142EOF
8143
Guido van Rossumef2255b2000-03-10 22:30:29 +00008144# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008146if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008148else
Martin v. Löwis11437992002-04-12 09:54:03 +00008149
8150cat >>confdefs.h <<_ACEOF
8151#define mode_t int
8152_ACEOF
8153
8154fi
8155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008157if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008159else
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
8161cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008163_ACEOF
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171
8172cat >>confdefs.h <<_ACEOF
8173#define pid_t int
8174_ACEOF
8175
8176fi
8177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008180#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008181_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008184if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
8188cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008190_ACEOF
8191
8192fi
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8195$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008196if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008198else
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008201#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008206 ac_cv_type_uid_t=yes
8207else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008208 ac_cv_type_uid_t=no
8209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008210rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8214$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008215if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216
Matthias Kloseb9621712010-04-24 17:59:49 +00008217$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
8219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221
8222fi
8223
Mark Dickinson983bc162012-12-02 12:11:38 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008229
8230fi
8231
Stefan Krah1919b7e2012-03-21 18:25:23 +01008232ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8233if test "x$ac_cv_type___uint128_t" = xyes; then :
8234
8235$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8236
8237fi
8238
Jack Jansendd19cf82001-12-06 22:36:17 +00008239
Michael W. Hudson54241132001-12-07 15:38:26 +00008240# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008241# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242# The cast to long int works around a bug in the HP C Compiler
8243# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8244# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8245# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8247$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008248if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008250else
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 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 +00008252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253else
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 if test "$ac_cv_type_int" = yes; then
8255 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8256$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008257as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008258See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259 else
8260 ac_cv_sizeof_int=0
8261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263
Martin v. Löwis11437992002-04-12 09:54:03 +00008264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8266$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267
8268
8269
Martin v. Löwis11437992002-04-12 09:54:03 +00008270cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008271#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008272_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273
8274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275# The cast to long int works around a bug in the HP C Compiler
8276# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8277# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8278# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8280$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008283else
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 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 +00008285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286else
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 if test "$ac_cv_type_long" = yes; then
8288 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008290as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008291See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 else
8293 ac_cv_sizeof_long=0
8294 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8299$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300
8301
8302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008304#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008305_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008306
8307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308# The cast to long int works around a bug in the HP C Compiler
8309# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8310# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8311# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8313$as_echo_n "checking size of long long... " >&6; }
8314if ${ac_cv_sizeof_long_long+:} false; then :
8315 $as_echo_n "(cached) " >&6
8316else
8317 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8318
8319else
8320 if test "$ac_cv_type_long_long" = yes; then
8321 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8322$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8323as_fn_error 77 "cannot compute sizeof (long long)
8324See \`config.log' for more details" "$LINENO" 5; }
8325 else
8326 ac_cv_sizeof_long_long=0
8327 fi
8328fi
8329
8330fi
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8332$as_echo "$ac_cv_sizeof_long_long" >&6; }
8333
8334
8335
8336cat >>confdefs.h <<_ACEOF
8337#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8338_ACEOF
8339
8340
8341# The cast to long int works around a bug in the HP C Compiler
8342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8344# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8346$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008347if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008349else
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 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 +00008351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 if test "$ac_cv_type_void_p" = yes; then
8354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008356as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008357See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 else
8359 ac_cv_sizeof_void_p=0
8360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362
Martin v. Löwis11437992002-04-12 09:54:03 +00008363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8365$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366
8367
8368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008370#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008371_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008372
8373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374# The cast to long int works around a bug in the HP C Compiler
8375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8377# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8379$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008380if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 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 +00008384
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 if test "$ac_cv_type_short" = yes; then
8387 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008389as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008390See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391 else
8392 ac_cv_sizeof_short=0
8393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395
Martin v. Löwis11437992002-04-12 09:54:03 +00008396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8398$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399
8400
8401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008403#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008404_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008405
8406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407# The cast to long int works around a bug in the HP C Compiler
8408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8410# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8412$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 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 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 if test "$ac_cv_type_float" = yes; then
8420 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008422as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008423See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 else
8425 ac_cv_sizeof_float=0
8426 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8431$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432
8433
8434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008436#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008437_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008438
8439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440# The cast to long int works around a bug in the HP C Compiler
8441# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8442# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8443# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8445$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008446if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008448else
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 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 +00008450
Martin v. Löwis11437992002-04-12 09:54:03 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 if test "$ac_cv_type_double" = yes; then
8453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008455as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008456See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 else
8458 ac_cv_sizeof_double=0
8459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8464$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465
8466
8467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008469#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008470_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008471
8472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473# The cast to long int works around a bug in the HP C Compiler
8474# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8475# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8476# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8478$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008479if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 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 +00008483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 if test "$ac_cv_type_fpos_t" = yes; then
8486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008488as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008489See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490 else
8491 ac_cv_sizeof_fpos_t=0
8492 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8497$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498
8499
8500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008502#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008503_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008504
Michael W. Hudson54241132001-12-07 15:38:26 +00008505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506# The cast to long int works around a bug in the HP C Compiler
8507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8509# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8511$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008512if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 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 +00008516
Martin v. Löwis18e16552006-02-15 17:27:45 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 if test "$ac_cv_type_size_t" = yes; then
8519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008521as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008522See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523 else
8524 ac_cv_sizeof_size_t=0
8525 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527
Martin v. Löwis18e16552006-02-15 17:27:45 +00008528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8530$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531
8532
8533
Martin v. Löwis18e16552006-02-15 17:27:45 +00008534cat >>confdefs.h <<_ACEOF
8535#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8536_ACEOF
8537
8538
Christian Heimes400adb02008-02-01 08:12:03 +00008539# The cast to long int works around a bug in the HP C Compiler
8540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8542# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8544$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008545if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 +00008549
Christian Heimes400adb02008-02-01 08:12:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 if test "$ac_cv_type_pid_t" = yes; then
8552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008554as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008555See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008556 else
8557 ac_cv_sizeof_pid_t=0
8558 fi
8559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560
Christian Heimes400adb02008-02-01 08:12:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8563$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008564
8565
8566
8567cat >>confdefs.h <<_ACEOF
8568#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8569_ACEOF
8570
8571
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008572# The cast to long int works around a bug in the HP C Compiler
8573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8575# This bug is HP SR number 8606223364.
8576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8577$as_echo_n "checking size of uintptr_t... " >&6; }
8578if ${ac_cv_sizeof_uintptr_t+:} false; then :
8579 $as_echo_n "(cached) " >&6
8580else
8581 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8582
8583else
8584 if test "$ac_cv_type_uintptr_t" = yes; then
8585 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8587as_fn_error 77 "cannot compute sizeof (uintptr_t)
8588See \`config.log' for more details" "$LINENO" 5; }
8589 else
8590 ac_cv_sizeof_uintptr_t=0
8591 fi
8592fi
8593
8594fi
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8596$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8597
8598
8599
8600cat >>confdefs.h <<_ACEOF
8601#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8602_ACEOF
8603
8604
Michael W. Hudson54241132001-12-07 15:38:26 +00008605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8607$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008610/* end confdefs.h. */
8611
8612int
8613main ()
8614{
8615long double x; x = (long double)0;
8616 ;
8617 return 0;
8618}
8619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008620if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621
8622
Matthias Kloseb9621712010-04-24 17:59:49 +00008623$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008624
8625 have_long_double=yes
8626
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008627fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8630$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008631if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008632# The cast to long int works around a bug in the HP C Compiler
8633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8637$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008638if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 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 +00008642
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 if test "$ac_cv_type_long_double" = yes; then
8645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008647as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008648See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008649 else
8650 ac_cv_sizeof_long_double=0
8651 fi
8652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008653
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8656$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008657
8658
8659
8660cat >>confdefs.h <<_ACEOF
8661#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8662_ACEOF
8663
8664
8665fi
8666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667# The cast to long int works around a bug in the HP C Compiler
8668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8670# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8672$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008673if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 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 +00008677
Thomas Woutersb2137042007-02-01 18:02:27 +00008678else
Matthias Kloseb9621712010-04-24 17:59:49 +00008679 if test "$ac_cv_type__Bool" = yes; then
8680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008682as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008683See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684 else
8685 ac_cv_sizeof__Bool=0
8686 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688
Thomas Woutersb2137042007-02-01 18:02:27 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8691$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692
8693
8694
Thomas Woutersb2137042007-02-01 18:02:27 +00008695cat >>confdefs.h <<_ACEOF
8696#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8697_ACEOF
8698
8699
Thomas Woutersb2137042007-02-01 18:02:27 +00008700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008701# The cast to long int works around a bug in the HP C Compiler
8702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8706$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008707if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008711#ifdef HAVE_SYS_TYPES_H
8712#include <sys/types.h>
8713#endif
8714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_off_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008723 else
8724 ac_cv_sizeof_off_t=0
8725 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8730$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008735#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008737
Michael W. Hudson54241132001-12-07 15:38:26 +00008738
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008739
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8741$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008742if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008743 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008746
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8748$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752fi
8753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8759$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764#ifdef HAVE_SYS_TYPES_H
8765#include <sys/types.h>
8766#endif
8767#ifdef HAVE_TIME_H
8768#include <time.h>
8769#endif
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 if test "$ac_cv_type_time_t" = yes; then
8775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008777as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008778See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779 else
8780 ac_cv_sizeof_time_t=0
8781 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8786$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788
8789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008791#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008792_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793
Michael W. Hudson54241132001-12-07 15:38:26 +00008794
8795
Trent Mick635f6fb2000-08-23 21:33:05 +00008796# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008797ac_save_cc="$CC"
8798if test "$ac_cv_kpthread" = "yes"
8799then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008800elif test "$ac_cv_kthread" = "yes"
8801then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008802elif test "$ac_cv_pthread" = "yes"
8803then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008804fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8807$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008808have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008811
8812 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
Guido van Rossum12580492000-09-24 16:47:19 +00008816pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ;
8818 return 0;
8819}
Matthias Kloseb159a552010-04-25 21:00:44 +00008820
Martin v. Löwis11437992002-04-12 09:54:03 +00008821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008822if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008823 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8827$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008828if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8834$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008835if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837else
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839#ifdef HAVE_PTHREAD_H
8840#include <pthread.h>
8841#endif
8842
Matthias Kloseb9621712010-04-24 17:59:49 +00008843"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$ac_cv_type_pthread_t" = yes; then
8847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008849as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008850See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851 else
8852 ac_cv_sizeof_pthread_t=0
8853 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855
Trent Mick635f6fb2000-08-23 21:33:05 +00008856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8858$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860
8861
Martin v. Löwis11437992002-04-12 09:54:03 +00008862cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008863#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008864_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866
Trent Mick635f6fb2000-08-23 21:33:05 +00008867fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008868
8869# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8870# This checking will be unnecessary after removing deprecated TLS API.
8871# The cast to long int works around a bug in the HP C Compiler
8872# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8873# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8874# This bug is HP SR number 8606223364.
8875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8876$as_echo_n "checking size of pthread_key_t... " >&6; }
8877if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8878 $as_echo_n "(cached) " >&6
8879else
8880 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8881"; then :
8882
8883else
8884 if test "$ac_cv_type_pthread_key_t" = yes; then
8885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8887as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8888See \`config.log' for more details" "$LINENO" 5; }
8889 else
8890 ac_cv_sizeof_pthread_key_t=0
8891 fi
8892fi
8893
8894fi
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8896$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8897
8898
8899
8900cat >>confdefs.h <<_ACEOF
8901#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8902_ACEOF
8903
8904
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8906$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8907if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8909/* end confdefs.h. */
8910#include <pthread.h>
8911int
8912main ()
8913{
8914pthread_key_t k; k * 1;
8915 ;
8916 return 0;
8917}
8918_ACEOF
8919if ac_fn_c_try_compile "$LINENO"; then :
8920 ac_pthread_key_t_is_arithmetic_type=yes
8921else
8922 ac_pthread_key_t_is_arithmetic_type=no
8923
8924fi
8925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8927$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8928 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8929
8930$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8931
8932 fi
8933else
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
8936fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008937CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008938
Michael W. Hudson54241132001-12-07 15:38:26 +00008939
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008940case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008941 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008942 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8943 ;;
8944 Darwin/*)
8945 OTHER_LIBTOOL_OPT=""
8946 ;;
8947esac
8948
8949
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008950
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008951case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008952 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008953 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8954 if test "${enable_universalsdk}"; then
8955 :
8956 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008957 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008958 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008959 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008960 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008961 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008962 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008963 if test ${gcc_version} '<' 4.0
8964 then
8965 LIBTOOL_CRUFT="-lcc_dynamic"
8966 else
8967 LIBTOOL_CRUFT=""
8968 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008970 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008973/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008974
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975 #include <unistd.h>
8976 int main(int argc, char*argv[])
8977 {
8978 if (sizeof(long) == 4) {
8979 return 0;
8980 } else {
8981 return 1;
8982 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008983 }
8984
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008986if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987 ac_osx_32bit=yes
8988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993fi
8994
8995
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008997 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008998 i386)
8999 MACOSX_DEFAULT_ARCH="i386"
9000 ;;
9001 ppc)
9002 MACOSX_DEFAULT_ARCH="ppc"
9003 ;;
9004 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009005 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009006 ;;
9007 esac
9008 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009009 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010 i386)
9011 MACOSX_DEFAULT_ARCH="x86_64"
9012 ;;
9013 ppc)
9014 MACOSX_DEFAULT_ARCH="ppc64"
9015 ;;
9016 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009017 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018 ;;
9019 esac
9020
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 fi
9022
9023 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009024 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009025 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009026esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9028$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009029if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009030then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009031 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009033 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9038$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009039 if test $enable_shared = "yes"
9040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009041 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 +00009042 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043else
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9045$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046fi
9047
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9049$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009050case $ac_sys_system/$ac_sys_release in
9051 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009052
Matthias Kloseb9621712010-04-24 17:59:49 +00009053$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9056$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009057 ;;
9058 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9060$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009061 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009062esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063
Guido van Rossum0a516c91994-09-12 10:58:40 +00009064# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009065
Michael W. Hudson54241132001-12-07 15:38:26 +00009066
9067
9068
9069
Benjamin Peterson99f03762010-04-11 22:15:28 +00009070
Thomas Wouters477c8d52006-05-27 19:21:47 +00009071
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009072# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9073# -- usually .so, .sl on HP-UX, .dll on Cygwin
9074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9075$as_echo_n "checking the extension of shared libraries... " >&6; }
9076if test -z "$SHLIB_SUFFIX"; then
9077 case $ac_sys_system in
9078 hp*|HP*)
9079 case `uname -m` in
9080 ia64) SHLIB_SUFFIX=.so;;
9081 *) SHLIB_SUFFIX=.sl;;
9082 esac
9083 ;;
9084 CYGWIN*) SHLIB_SUFFIX=.dll;;
9085 *) SHLIB_SUFFIX=.so;;
9086 esac
9087fi
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9089$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009090
Guido van Rossum0a516c91994-09-12 10:58:40 +00009091# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009092# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093# (Shared libraries in this instance are shared modules to be loaded into
9094# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9096$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009097if test -z "$LDSHARED"
9098then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009099 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009100 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009101 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009102 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009105 if test "$GCC" = "yes" ; then
9106 LDSHARED='$(CC) -shared'
9107 LDCXXSHARED='$(CXX) -shared'
9108 else
9109 LDSHARED='$(CC) -G'
9110 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009111 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009112 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009113 if test "$GCC" = "yes" ; then
9114 LDSHARED='$(CC) -shared'
9115 LDCXXSHARED='$(CXX) -shared'
9116 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009117 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009118 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009119 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009120 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009121 LDSHARED='$(CC) -bundle'
9122 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009123 if test "$enable_framework" ; then
9124 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009125 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9126 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009127 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009128 else
9129 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009130 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009131 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009132 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009133 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009134 LDSHARED='$(CC) -bundle'
9135 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009136 if test "$enable_framework" ; then
9137 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009138 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9139 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009141 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009142 # No framework, use the Python app as bundle-loader
9143 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009144 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009145 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009146 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009147 Darwin/*)
9148 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9149 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009150
Ned Deily36820b62014-06-25 13:44:22 -07009151 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9152 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9153 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9154 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9155 if test ${dep_target_major} -eq 10 && \
9156 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009157 then
Ned Deily36820b62014-06-25 13:44:22 -07009158 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009159 LDSHARED='$(CC) -bundle'
9160 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009161 if test "$enable_framework" ; then
9162 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009163 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9164 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009165 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009166 else
9167 # No framework, use the Python app as bundle-loader
9168 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9169 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009171 fi
Ned Deily36820b62014-06-25 13:44:22 -07009172 else
9173 # building for OS X 10.3 and later
9174 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9175 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9176 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009177 fi
9178 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 Linux*|GNU*|QNX*)
9180 LDSHARED='$(CC) -shared'
9181 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009182 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009183 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009184 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009185 LDSHARED='$(CC) -shared'
9186 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009187 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009188 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009189 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009190 OpenBSD*)
9191 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9192 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009193 LDSHARED='$(CC) -shared $(CCSHARED)'
9194 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009195 else
9196 case `uname -r` in
9197 [01].* | 2.[0-7] | 2.[0-7].*)
9198 LDSHARED="ld -Bshareable ${LDFLAGS}"
9199 ;;
9200 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009201 LDSHARED='$(CC) -shared $(CCSHARED)'
9202 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009203 ;;
9204 esac
9205 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009206 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009207 LDSHARED='$(CC) -shared'
9208 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009209 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 if test "$GCC" = "yes" ; then
9211 LDSHARED='$(CC) -shared'
9212 LDCXXSHARED='$(CXX) -shared'
9213 else
9214 LDSHARED='$(CC) -G'
9215 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009216 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217 SCO_SV*)
9218 LDSHARED='$(CC) -Wl,-G,-Bexport'
9219 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9220 CYGWIN*)
9221 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9222 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009223 *) LDSHARED="ld";;
9224 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9227$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009228LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009229BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009230# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009231# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9233$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009234if test -z "$CCSHARED"
9235then
Guido van Rossum07397971997-04-29 21:49:50 +00009236 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009237 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009238 then CCSHARED="-fPIC";
9239 elif test `uname -p` = sparc;
9240 then CCSHARED="-xcode=pic32";
9241 else CCSHARED="-Kpic";
9242 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009243 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009244 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009245 else CCSHARED="+z";
9246 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009247 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009248 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009249 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009250 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009251 if test "$GCC" = "yes"
9252 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009253 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009254 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009255 SCO_SV*)
9256 if test "$GCC" = "yes"
9257 then CCSHARED="-fPIC"
9258 else CCSHARED="-Kpic -belf"
9259 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9263$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009264# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009265# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9267$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268if test -z "$LINKFORSHARED"
9269then
Guido van Rossum07397971997-04-29 21:49:50 +00009270 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009271 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009272 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009273 LINKFORSHARED="-Wl,-E -Wl,+s";;
9274# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009275 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009276 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009279 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009280
9281 # Issue #18075: the default maximum stack size (8MBytes) is too
9282 # small for the default recursion limit. Increase the stack size
9283 # to ensure that tests don't crash
9284 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9285
Jack Jansene578a632001-08-15 01:27:14 +00009286 if test "$enable_framework"
9287 then
Jack Jansenda49e192005-01-07 13:08:22 +00009288 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009289 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009290 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009291 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009292 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009293 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009294 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009295 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9296 then
9297 LINKFORSHARED="-Wl,--export-dynamic"
9298 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009299 SunOS/5*) case $CC in
9300 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009301 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009302 then
9303 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009304 fi;;
9305 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009306 CYGWIN*)
9307 if test $enable_shared = "no"
9308 then
9309 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9310 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009311 QNX*)
9312 # -Wl,-E causes the symbols to be added to the dynamic
9313 # symbol table so that they can be found when a module
9314 # is loaded. -N 2048K causes the stack size to be set
9315 # to 2048 kilobytes so that the stack doesn't overflow
9316 # when running test_compile.py.
9317 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009318 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9321$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322
Michael W. Hudson54241132001-12-07 15:38:26 +00009323
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009324
Matthias Kloseb9621712010-04-24 17:59:49 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9326$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009327if test ! "$LIBRARY" = "$LDLIBRARY"
9328then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009329 case $ac_sys_system in
9330 CYGWIN*)
9331 # Cygwin needs CCSHARED when building extension DLLs
9332 # but not when building the interpreter DLL.
9333 CFLAGSFORSHARED='';;
9334 *)
9335 CFLAGSFORSHARED='$(CCSHARED)'
9336 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9339$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009340
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009341# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9342# library (with --enable-shared).
9343# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009344# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9345# if it is not required, since it creates a dependency of the shared library
9346# to LIBS. This, in turn, means that applications linking the shared libpython
9347# don't need to link LIBS explicitly. The default should be only changed
9348# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009349
Matthias Kloseb9621712010-04-24 17:59:49 +00009350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9351$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009352case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009353 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009354 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009355esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9357$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358
9359
Guido van Rossum627b2d71993-12-24 10:39:16 +00009360# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9362$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009363if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009364 $as_echo_n "(cached) " >&6
9365else
9366 ac_check_lib_save_LIBS=$LIBS
9367LIBS="-lsendfile $LIBS"
9368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9369/* end confdefs.h. */
9370
9371/* Override any GCC internal prototype to avoid an error.
9372 Use char because int might match the return type of a GCC
9373 builtin and then its argument prototype would still apply. */
9374#ifdef __cplusplus
9375extern "C"
9376#endif
9377char sendfile ();
9378int
9379main ()
9380{
9381return sendfile ();
9382 ;
9383 return 0;
9384}
9385_ACEOF
9386if ac_fn_c_try_link "$LINENO"; then :
9387 ac_cv_lib_sendfile_sendfile=yes
9388else
9389 ac_cv_lib_sendfile_sendfile=no
9390fi
9391rm -f core conftest.err conftest.$ac_objext \
9392 conftest$ac_exeext conftest.$ac_ext
9393LIBS=$ac_check_lib_save_LIBS
9394fi
9395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9396$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009397if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009398 cat >>confdefs.h <<_ACEOF
9399#define HAVE_LIBSENDFILE 1
9400_ACEOF
9401
9402 LIBS="-lsendfile $LIBS"
9403
9404fi
9405
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9407$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009408if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009410else
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009412LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416/* Override any GCC internal prototype to avoid an error.
9417 Use char because int might match the return type of a GCC
9418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419#ifdef __cplusplus
9420extern "C"
9421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009422char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009423int
9424main ()
9425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ;
9428 return 0;
9429}
9430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009433else
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009436rm -f core conftest.err conftest.$ac_objext \
9437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9441$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009442if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 cat >>confdefs.h <<_ACEOF
9444#define HAVE_LIBDL 1
9445_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009446
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009447 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009449fi
9450 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9452$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009453if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009455else
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009457LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461/* Override any GCC internal prototype to avoid an error.
9462 Use char because int might match the return type of a GCC
9463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464#ifdef __cplusplus
9465extern "C"
9466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009467char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ;
9473 return 0;
9474}
9475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009478else
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481rm -f core conftest.err conftest.$ac_objext \
9482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9486$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009487if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 cat >>confdefs.h <<_ACEOF
9489#define HAVE_LIBDLD 1
9490_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009491
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009492 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009494fi
9495 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009496
Michael Felt0d3ccb42017-12-30 22:39:20 +01009497# checks for uuid.h location
9498for ac_header in uuid/uuid.h uuid.h
9499do :
9500 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9501ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9502if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9503 cat >>confdefs.h <<_ACEOF
9504#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9505_ACEOF
9506
9507fi
9508
9509done
9510
9511
Berker Peksag9a10ff42017-11-08 23:09:16 +03009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9513$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9515/* end confdefs.h. */
9516#include <uuid/uuid.h>
9517int
9518main ()
9519{
9520
9521#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009522void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009523#endif
9524
9525 ;
9526 return 0;
9527}
9528_ACEOF
9529if ac_fn_c_try_compile "$LINENO"; then :
9530
9531$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9532
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9534$as_echo "yes" >&6; }
9535else
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9537$as_echo "no" >&6; }
9538
9539fi
9540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9541
Michael Felt0d3ccb42017-12-30 22:39:20 +01009542# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009543# FreeBSD and OpenBSD provides support as well
9544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9545$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9547/* end confdefs.h. */
9548#include <uuid.h>
9549int
9550main ()
9551{
9552
9553#ifndef uuid_create
9554void *x = uuid_create
9555#endif
9556
9557 ;
9558 return 0;
9559}
9560_ACEOF
9561if ac_fn_c_try_compile "$LINENO"; then :
9562
9563$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9564
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9566$as_echo "yes" >&6; }
9567else
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
9570
9571fi
9572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9573
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009574# 'Real Time' functions on Solaris
9575# posix4 on Solaris 2.6
9576# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009579if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009581else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009582 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586/* Override any GCC internal prototype to avoid an error.
9587 Use char because int might match the return type of a GCC
9588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009589#ifdef __cplusplus
9590extern "C"
9591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009592char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ;
9598 return 0;
9599}
9600_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601for ac_lib in '' pthread rt posix4; do
9602 if test -z "$ac_lib"; then
9603 ac_res="none required"
9604 else
9605 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009611rm -f core conftest.err conftest.$ac_objext \
9612 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009613 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616done
Victor Stinnere0be4232011-10-25 13:06:09 +02009617if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619else
9620 ac_cv_search_sem_init=no
9621fi
9622rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009623LIBS=$ac_func_search_save_LIBS
9624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9626$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009628if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009630
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009631fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009632
Martin v. Löwis519adae2003-09-20 10:47:47 +00009633
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9636$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639else
9640 ac_check_lib_save_LIBS=$LIBS
9641LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645/* Override any GCC internal prototype to avoid an error.
9646 Use char because int might match the return type of a GCC
9647 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009648#ifdef __cplusplus
9649extern "C"
9650#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009652int
9653main ()
9654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656 ;
9657 return 0;
9658}
9659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009661 ac_cv_lib_intl_textdomain=yes
9662else
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009665rm -f core conftest.err conftest.$ac_objext \
9666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667LIBS=$ac_check_lib_save_LIBS
9668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9670$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009671if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672
Matthias Kloseb9621712010-04-24 17:59:49 +00009673$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674
Brett Cannonc6d936e2009-06-07 20:09:53 +00009675 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676fi
9677
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009678
9679# checks for system dependent C++ extensions support
9680case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9682$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009684/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009685
Georg Brandl59e87bd2011-02-15 19:48:59 +00009686 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009687int
9688main ()
9689{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009690loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ;
9692 return 0;
9693}
Matthias Kloseb159a552010-04-25 21:00:44 +00009694
Martin v. Löwis11437992002-04-12 09:54:03 +00009695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009697
Matthias Kloseb159a552010-04-25 21:00:44 +00009698
Matthias Kloseb9621712010-04-24 17:59:49 +00009699$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009700
Matthias Kloseb159a552010-04-25 21:00:44 +00009701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009703
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009704else
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009708
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009710rm -f core conftest.err conftest.$ac_objext \
9711 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712 *) ;;
9713esac
9714
Christian Heimes985ecdc2013-11-20 11:46:18 +01009715# check for systems that require aligned memory access
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9717$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009718if ${ac_cv_aligned_required+:} false; then :
9719 $as_echo_n "(cached) " >&6
9720else
9721 if test "$cross_compiling" = yes; then :
9722 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009723else
9724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9725/* end confdefs.h. */
9726
9727int main()
9728{
9729 char s[16];
9730 int i, *p1, *p2;
9731 for (i=0; i < 16; i++)
9732 s[i] = i;
9733 p1 = (int*)(s+1);
9734 p2 = (int*)(s+2);
9735 if (*p1 == *p2)
9736 return 1;
9737 return 0;
9738}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009739_ACEOF
9740if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009741 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009742else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009743 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009744fi
9745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9746 conftest.$ac_objext conftest.beam conftest.$ac_ext
9747fi
9748
9749
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009750fi
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9753$as_echo "$ac_cv_aligned_required" >&6; }
9754if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009755
9756$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9757
9758fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009759
9760# str, bytes and memoryview hash algorithm
9761
9762
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9764$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9765
9766# Check whether --with-hash_algorithm was given.
9767if test "${with_hash_algorithm+set}" = set; then :
9768 withval=$with_hash_algorithm;
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9770$as_echo "$withval" >&6; }
9771case "$withval" in
9772 siphash24)
9773 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9774
9775 ;;
9776 fnv)
9777 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9778
9779 ;;
9780 *)
9781 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9782 ;;
9783esac
9784
9785else
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9787$as_echo "default" >&6; }
9788fi
9789
9790
Charles-François Natalid30b0222014-05-08 23:08:51 +01009791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9792$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9793
9794# Check whether --with-address_sanitizer was given.
9795if test "${with_address_sanitizer+set}" = set; then :
9796 withval=$with_address_sanitizer;
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9798$as_echo "$withval" >&6; }
9799BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9800LDFLAGS="-fsanitize=address $LDFLAGS"
9801
9802else
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
Guido van Rossum70c7f481998-03-26 18:44:10 +00009808# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9810$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009811if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009815LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819/* Override any GCC internal prototype to avoid an error.
9820 Use char because int might match the return type of a GCC
9821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009822#ifdef __cplusplus
9823extern "C"
9824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009825char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
9828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009834if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009836else
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009839rm -f core conftest.err conftest.$ac_objext \
9840 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009841LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9844$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009845if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009846 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009847fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009848 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9850$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009851if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009853else
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009855LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862#ifdef __cplusplus
9863extern "C"
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009881LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9884$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009885if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009886 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009887fi
9888 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009889
Matthias Kloseb9621712010-04-24 17:59:49 +00009890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9891$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009894if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9897$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009898LIBS="$withval $LIBS"
9899
9900else
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903fi
9904
Guido van Rossum7f43da71994-08-01 12:15:30 +00009905
Benjamin Peterson54016222018-05-14 21:39:22 -07009906PKG_PROG_PKG_CONFIG
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009907
9908# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9910$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009911
9912# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009913if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009914 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009915else
9916 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009917fi
9918
9919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9921$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009922
9923# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9925$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009926
9927# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009928if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009929 withval=$with_system_ffi;
9930fi
9931
9932
Zachary Waref40d4dd2016-09-17 01:25:24 -05009933if test "$ac_sys_system" = "Darwin"
9934then
9935 case "$with_system_ffi" in
9936 "")
9937 with_system_ffi="no"
9938 ;;
9939 yes|no)
9940 ;;
9941 *)
9942 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
9943 ;;
9944 esac
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9946$as_echo "$with_system_ffi" >&6; }
9947else
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9949$as_echo "yes" >&6; }
9950 if test "$with_system_ffi" != ""
9951 then
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
9953$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
9954 fi
9955 with_system_ffi="yes"
9956fi
Zachary Ware935043d2016-09-09 17:01:21 -07009957
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009958if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009959 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9960else
9961 LIBFFI_INCLUDEDIR=""
9962fi
9963
9964
Stefan Krah60187b52012-03-23 19:06:27 +01009965# Check for use of the system libmpdec library
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9967$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9968
9969# Check whether --with-system_libmpdec was given.
9970if test "${with_system_libmpdec+set}" = set; then :
9971 withval=$with_system_libmpdec;
9972else
9973 with_system_libmpdec="no"
9974fi
9975
9976
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9978$as_echo "$with_system_libmpdec" >&6; }
9979
Benjamin Peterson076ed002010-10-31 17:11:02 +00009980# Check for support for loadable sqlite extensions
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9982$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9983# Check whether --enable-loadable-sqlite-extensions was given.
9984if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9985 enableval=$enable_loadable_sqlite_extensions;
9986else
9987 enable_loadable_sqlite_extensions="no"
9988fi
9989
9990
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9992$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9993
Ned Deilyd819b932013-09-06 01:07:05 -07009994# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9995
9996
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9998$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9999
10000# Check whether --with-tcltk-includes was given.
10001if test "${with_tcltk_includes+set}" = set; then :
10002 withval=$with_tcltk_includes;
10003else
10004 with_tcltk_includes="default"
10005fi
10006
10007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10008$as_echo "$with_tcltk_includes" >&6; }
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10010$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10011
10012# Check whether --with-tcltk-libs was given.
10013if test "${with_tcltk_libs+set}" = set; then :
10014 withval=$with_tcltk_libs;
10015else
10016 with_tcltk_libs="default"
10017fi
10018
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10020$as_echo "$with_tcltk_libs" >&6; }
10021if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10022then
10023 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10024 then
10025 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10026 fi
10027 TCLTK_INCLUDES=""
10028 TCLTK_LIBS=""
10029else
10030 TCLTK_INCLUDES="$with_tcltk_includes"
10031 TCLTK_LIBS="$with_tcltk_libs"
10032fi
10033
Matthias Klose55708cc2009-04-30 08:06:49 +000010034# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10036$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010037
10038# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010039if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010040 withval=$with_dbmliborder;
10041if test x$with_dbmliborder = xyes
10042then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010043as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010044else
10045 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10046 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10047 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010048 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010049 fi
10050 done
10051fi
10052fi
10053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10055$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
10059# Templates for things AC_DEFINEd more than once.
10060# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010061
10062
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010063if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010064then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010065 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010067
10068 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010069elif test "$ac_cv_kpthread" = "yes"
10070then
10071 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010072 if test "$ac_cv_cxx_thread" = "yes"; then
10073 CXX="$CXX -Kpthread"
10074 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010075 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010076elif test "$ac_cv_kthread" = "yes"
10077then
10078 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010079 if test "$ac_cv_cxx_thread" = "yes"; then
10080 CXX="$CXX -Kthread"
10081 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010082 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010083elif test "$ac_cv_pthread" = "yes"
10084then
10085 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010086 if test "$ac_cv_cxx_thread" = "yes"; then
10087 CXX="$CXX -pthread"
10088 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010089 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010090else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010091 if test ! -z "$withval" -a -d "$withval"
10092 then LDFLAGS="$LDFLAGS -L$withval"
10093 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010094
10095 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010096 # define _POSIX_THREADS in unistd.h. Some apparently don't
10097 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10099$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010101/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010102
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010103#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010104#ifdef _POSIX_THREADS
10105yes
10106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
10108_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010110 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010111 unistd_defines_pthreads=yes
10112else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010113 unistd_defines_pthreads=no
10114fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010115rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010116
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10118$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010121
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010122 # Just looking for pthread_create in libpthread is not enough:
10123 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10124 # So we really have to include pthread.h, and then link.
10125 _libs=$LIBS
10126 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10128$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010131
10132#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010133#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010134
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010135void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010136int
10137main ()
10138{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010139
10140pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
10144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010146
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10148$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010149 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010150
Guido van Rossum02a1c402000-02-25 19:26:31 +000010151else
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010153 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010155if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010156
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010157 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010158
Guido van Rossumad678af1998-10-02 14:42:15 +000010159else
Guido van Rossumad678af1998-10-02 14:42:15 +000010160
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10162$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010163if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010165else
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010167LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171/* Override any GCC internal prototype to avoid an error.
10172 Use char because int might match the return type of a GCC
10173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010174#ifdef __cplusplus
10175extern "C"
10176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010177char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178int
10179main ()
10180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ;
10183 return 0;
10184}
10185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010188else
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191rm -f core conftest.err conftest.$ac_objext \
10192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010193LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10196$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010198
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010199 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010200 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010201
Greg Steinadf63d62000-07-05 10:38:09 +000010202else
Greg Steinadf63d62000-07-05 10:38:09 +000010203
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10205$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010206if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010208else
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010210LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214/* Override any GCC internal prototype to avoid an error.
10215 Use char because int might match the return type of a GCC
10216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217#ifdef __cplusplus
10218extern "C"
10219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010220char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010221int
10222main ()
10223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ;
10226 return 0;
10227}
10228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010231else
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234rm -f core conftest.err conftest.$ac_objext \
10235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010236LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10239$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010240if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010242 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010244
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010245else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10248$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010249if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010253LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010260#ifdef __cplusplus
10261extern "C"
10262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010263char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010264int
10265main ()
10266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ;
10269 return 0;
10270}
10271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010279LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10282$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010283if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010285 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010286 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010287
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010288else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10291$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010292if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010294else
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010296LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300/* Override any GCC internal prototype to avoid an error.
10301 Use char because int might match the return type of a GCC
10302 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010303#ifdef __cplusplus
10304extern "C"
10305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010306char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307int
10308main ()
10309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ;
10312 return 0;
10313}
10314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010315if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320rm -f core conftest.err conftest.$ac_objext \
10321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010322LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10325$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010326if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010328 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010329 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010330
Guido van Rossumb93a8621998-05-07 13:27:32 +000010331else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010332
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010333 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10334
Guido van Rossum2d38f911996-06-26 19:47:01 +000010335fi
10336
Guido van Rossum627b2d71993-12-24 10:39:16 +000010337
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010338fi
10339
Guido van Rossum0be3e491997-05-22 20:33:33 +000010340fi
10341
Guido van Rossum49545951997-12-02 19:28:29 +000010342fi
10343
Guido van Rossumb93a8621998-05-07 13:27:32 +000010344fi
10345
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10351$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010356LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360/* Override any GCC internal prototype to avoid an error.
10361 Use char because int might match the return type of a GCC
10362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010363#ifdef __cplusplus
10364extern "C"
10365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010366char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367int
10368main ()
10369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ;
10372 return 0;
10373}
10374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380rm -f core conftest.err conftest.$ac_objext \
10381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010382LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10385$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010387
Martin v. Löwis130fb172001-07-19 11:00:41 +000010388 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010389
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390fi
10391
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010392
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010393fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010394
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010395if test "$posix_threads" = "yes"; then
10396 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010399
10400 fi
10401
10402 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10403 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010404 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010406
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010407 ;;
10408 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010410
10411 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010412 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010413$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010414
10415 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010416 esac
10417
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10419$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010422else
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010424 ac_cv_pthread_system_supported=no
10425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010427/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010428
10429 #include <stdio.h>
10430 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010431 void *foo(void *parm) {
10432 return NULL;
10433 }
10434 main() {
10435 pthread_attr_t attr;
10436 pthread_t id;
10437 if (pthread_attr_init(&attr)) exit(-1);
10438 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10439 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10440 exit(0);
10441 }
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010444 ac_cv_pthread_system_supported=yes
10445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010450fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452
Guido van Rossum627b2d71993-12-24 10:39:16 +000010453fi
10454
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10456$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010457 if test "$ac_cv_pthread_system_supported" = "yes"; then
10458
Matthias Kloseb9621712010-04-24 17:59:49 +000010459$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010460
10461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 for ac_func in pthread_sigmask
10463do :
10464 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010465if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010468_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010469 case $ac_sys_system in
10470 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471
Matthias Kloseb9621712010-04-24 17:59:49 +000010472$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010473
10474 ;;
10475 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010476fi
10477done
10478
pdoxe14679c2017-10-05 00:01:56 -070010479 for ac_func in pthread_getcpuclockid
10480do :
10481 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10482if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10483 cat >>confdefs.h <<_ACEOF
10484#define HAVE_PTHREAD_GETCPUCLOCKID 1
10485_ACEOF
10486
10487fi
10488done
10489
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010490fi
10491
10492
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010493# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10496$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010498if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010500 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503 ipv6=no
10504 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10506$as_echo "yes" >&6; }
10507 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508
10509 ipv6=yes
10510 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010516 /* AF_INET6 available check */
10517#include <sys/types.h>
10518#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010519int
10520main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010522int domain = AF_INET6;
10523 ;
10524 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010525}
Martin v. Löwis11437992002-04-12 09:54:03 +000010526_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010527if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010528
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10530$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010532
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533else
Matthias Kloseb159a552010-04-25 21:00:44 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010537 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010538
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010539fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010542if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10544$as_echo_n "checking if RFC2553 API is available... " >&6; }
10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010546/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010547
10548 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010549#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010550int
10551main ()
10552{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010553struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010554 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ;
10556 return 0;
10557}
Matthias Kloseb159a552010-04-25 21:00:44 +000010558
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010560if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010561
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010563$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010564 ipv6=yes
10565
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010566else
Matthias Kloseb159a552010-04-25 21:00:44 +000010567
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010569$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010570 ipv6=no
10571
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010574fi
10575
10576if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010578
10579fi
10580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581fi
10582
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583
10584ipv6type=unknown
10585ipv6lib=none
10586ipv6trylibc=no
10587
10588if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10590$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010591 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10592 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593 case $i in
10594 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010597
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598#include <netinet/in.h>
10599#ifdef IPV6_INRIA_VERSION
10600yes
10601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010602_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010605 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010607rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608
10609 ;;
10610 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010613
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010614#include <netinet/in.h>
10615#ifdef __KAME__
10616yes
10617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010618_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621 ipv6type=$i;
10622 ipv6lib=inet6
10623 ipv6libdir=/usr/local/v6/lib
10624 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010626rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627
10628 ;;
10629 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010632
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633#include <features.h>
10634#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10635yes
10636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010637_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640 ipv6type=$i;
10641 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010643rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644
10645 ;;
10646 linux-inet6)
10647 if test -d /usr/inet6; then
10648 ipv6type=$i
10649 ipv6lib=inet6
10650 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010651 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652 fi
10653 ;;
10654 solaris)
10655 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010656 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657 ipv6type=$i
10658 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659 fi
10660 fi
10661 ;;
10662 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010665
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010666#include <sys/param.h>
10667#ifdef _TOSHIBA_INET6
10668yes
10669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010670_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673 ipv6type=$i;
10674 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010675 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010677rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678
10679 ;;
10680 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684#include </usr/local/v6/include/sys/v6config.h>
10685#ifdef __V6D__
10686yes
10687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691 ipv6type=$i;
10692 ipv6lib=v6;
10693 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010694 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010696rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697
10698 ;;
10699 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010701/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010702
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703#include <sys/param.h>
10704#ifdef _ZETA_MINAMI_INET6
10705yes
10706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010707_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710 ipv6type=$i;
10711 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010712 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010714rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715
10716 ;;
10717 esac
10718 if test "$ipv6type" != "unknown"; then
10719 break
10720 fi
10721 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10723$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724fi
10725
10726if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10727 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10728 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10729 echo "using lib$ipv6lib"
10730 else
10731 if test $ipv6trylibc = "yes"; then
10732 echo "using libc"
10733 else
10734 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10735 echo "You need to fetch lib$ipv6lib.a from appropriate"
10736 echo 'ipv6 kit and compile beforehand.'
10737 exit 1
10738 fi
10739 fi
10740fi
10741
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10743$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10745/* end confdefs.h. */
10746 /* CAN_RAW_FD_FRAMES available check */
10747#include <linux/can/raw.h>
10748int
10749main ()
10750{
10751int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10752 ;
10753 return 0;
10754}
10755_ACEOF
10756if ac_fn_c_try_compile "$LINENO"; then :
10757
10758
10759$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10760
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10762$as_echo "yes" >&6; }
10763
10764else
10765
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768
10769fi
10770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10771
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010772# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10774$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778 withval=$with_doc_strings;
10779fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010780
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010781
10782if test -z "$with_doc_strings"
10783then with_doc_strings="yes"
10784fi
10785if test "$with_doc_strings" != "no"
10786then
10787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010789
10790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10792$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010793
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010794# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10796$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800 withval=$with_pymalloc;
10801fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010802
Neil Schemenauera35c6882001-02-27 04:45:05 +000010803
Neil Schemenauer16c22972002-03-22 15:34:49 +000010804if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010805then
10806 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010807fi
10808if test "$with_pymalloc" != "no"
10809then
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010812
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010813 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10816$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010817
Nick Coghlan6ea41862017-06-11 13:16:15 +100010818# Check for --with-c-locale-coercion
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10820$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10821
10822# Check whether --with-c-locale-coercion was given.
10823if test "${with_c_locale_coercion+set}" = set; then :
10824 withval=$with_c_locale_coercion;
10825fi
10826
10827
10828if test -z "$with_c_locale_coercion"
10829then
10830 with_c_locale_coercion="yes"
10831fi
10832if test "$with_c_locale_coercion" != "no"
10833then
10834
10835$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10836
10837fi
10838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10839$as_echo "$with_c_locale_coercion" >&6; }
10840
10841# Check for --with-c-locale-warning
10842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10843$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10844
10845# Check whether --with-c-locale-warning was given.
10846if test "${with_c_locale_warning+set}" = set; then :
10847 withval=$with_c_locale_warning;
10848fi
10849
10850
10851if test -z "$with_c_locale_warning"
10852then
10853 with_c_locale_warning="yes"
10854fi
10855if test "$with_c_locale_warning" != "no"
10856then
10857
10858$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10859
10860fi
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10862$as_echo "$with_c_locale_warning" >&6; }
10863
Benjamin Peterson05159c42009-12-03 03:01:27 +000010864# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10866$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010867
10868# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010869if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010870 withval=$with_valgrind;
10871else
10872 with_valgrind=no
10873fi
10874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10876$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010877if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 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 +020010879if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010882
10883else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010884 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010885
10886fi
10887
10888
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010889 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010890fi
10891
Łukasz Langaa785c872016-09-09 17:37:37 -070010892# Check for DTrace support
10893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10894$as_echo_n "checking for --with-dtrace... " >&6; }
10895
10896# Check whether --with-dtrace was given.
10897if test "${with_dtrace+set}" = set; then :
10898 withval=$with_dtrace;
10899else
10900 with_dtrace=no
10901fi
10902
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10904$as_echo "$with_dtrace" >&6; }
10905
10906
10907
10908
10909
10910DTRACE=
10911DFLAGS=
10912DTRACE_HEADERS=
10913DTRACE_OBJS=
10914
10915if test "$with_dtrace" = "yes"
10916then
10917 # Extract the first word of "dtrace", so it can be a program name with args.
10918set dummy dtrace; ac_word=$2
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920$as_echo_n "checking for $ac_word... " >&6; }
10921if ${ac_cv_path_DTRACE+:} false; then :
10922 $as_echo_n "(cached) " >&6
10923else
10924 case $DTRACE in
10925 [\\/]* | ?:[\\/]*)
10926 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
10927 ;;
10928 *)
10929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930for as_dir in $PATH
10931do
10932 IFS=$as_save_IFS
10933 test -z "$as_dir" && as_dir=.
10934 for ac_exec_ext in '' $ac_executable_extensions; do
10935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10936 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
10937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938 break 2
10939 fi
10940done
10941 done
10942IFS=$as_save_IFS
10943
10944 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
10945 ;;
10946esac
10947fi
10948DTRACE=$ac_cv_path_DTRACE
10949if test -n "$DTRACE"; then
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
10951$as_echo "$DTRACE" >&6; }
10952else
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
10955fi
10956
10957
10958 if test "$DTRACE" = "not found"; then
10959 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
10960 fi
10961
10962$as_echo "#define WITH_DTRACE 1" >>confdefs.h
10963
10964 DTRACE_HEADERS="Include/pydtrace_probes.h"
10965
10966 # On OS X, DTrace providers do not need to be explicitly compiled and
10967 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
10968 # generation flag '-G'. We check for presence of this flag, rather than
10969 # hardcoding support by OS, in the interest of robustness.
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
10971$as_echo_n "checking whether DTrace probes require linking... " >&6; }
10972if ${ac_cv_dtrace_link+:} false; then :
10973 $as_echo_n "(cached) " >&6
10974else
10975 ac_cv_dtrace_link=no
10976 echo 'BEGIN' > conftest.d
10977 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
10978 ac_cv_dtrace_link=yes
10979
10980fi
10981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
10982$as_echo "$ac_cv_dtrace_link" >&6; }
10983 if test "$ac_cv_dtrace_link" = "yes"; then
10984 DTRACE_OBJS="Python/pydtrace.o"
10985 fi
10986fi
10987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010988# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010989
Guido van Rossum98935bf2001-09-05 19:13:16 +000010990DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010991
Guido van Rossume97ee181999-12-20 21:27:22 +000010992# the dlopen() function means we might want to use dynload_shlib.o. some
10993# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010994for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010995do :
10996 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010997if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010999#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011000_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011001
Guido van Rossume97ee181999-12-20 21:27:22 +000011002fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011003done
Guido van Rossume97ee181999-12-20 21:27:22 +000011004
Michael W. Hudson54241132001-12-07 15:38:26 +000011005
Guido van Rossume97ee181999-12-20 21:27:22 +000011006# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11007# loading of modules.
11008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11010$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011011if test -z "$DYNLOADFILE"
11012then
11013 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011014 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11015 if test "$ac_cv_func_dlopen" = yes
11016 then DYNLOADFILE="dynload_shlib.o"
11017 else DYNLOADFILE="dynload_aix.o"
11018 fi
11019 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011020 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011021 *)
11022 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11023 # out any dynamic loading
11024 if test "$ac_cv_func_dlopen" = yes
11025 then DYNLOADFILE="dynload_shlib.o"
11026 else DYNLOADFILE="dynload_stub.o"
11027 fi
11028 ;;
11029 esac
11030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11032$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011033if test "$DYNLOADFILE" != "dynload_stub.o"
11034then
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011037
11038fi
11039
Neil Schemenauer4e425612001-06-19 15:44:15 +000011040# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11041
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11044$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011045if test -z "$MACHDEP_OBJS"
11046then
Jack Jansene578a632001-08-15 01:27:14 +000011047 MACHDEP_OBJS=$extra_machdep_objs
11048else
11049 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011050fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011051if test -z "$MACHDEP_OBJS"; then
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11053$as_echo "none" >&6; }
11054else
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11056$as_echo "$MACHDEP_OBJS" >&6; }
11057fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011058
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011060for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011061 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011062 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011063 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011064 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011065 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011066 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011067 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011068 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011069 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011070 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011071 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011072 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011073 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011074 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011075 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11076 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011077 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011078 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011079 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011080 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011081 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011082do :
11083 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11084ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011085if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011089
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011090fi
11091done
11092
Michael W. Hudson54241132001-12-07 15:38:26 +000011093
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011094ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11095 #include <dirent.h>
11096"
11097if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11098
11099$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11100
11101fi
11102
11103
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011104# For some functions, having a definition is not sufficient, since
11105# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11107$as_echo_n "checking for chroot... " >&6; }
11108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011110#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011111int
11112main ()
11113{
11114void *x=chroot
11115 ;
11116 return 0;
11117}
11118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011122
Matthias Kloseb159a552010-04-25 21:00:44 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011125else
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011128
11129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11132$as_echo_n "checking for link... " >&6; }
11133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011135#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011136int
11137main ()
11138{
11139void *x=link
11140 ;
11141 return 0;
11142}
11143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011147
Matthias Kloseb159a552010-04-25 21:00:44 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153
11154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11157$as_echo_n "checking for symlink... " >&6; }
11158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011159/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011160#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161int
11162main ()
11163{
11164void *x=symlink
11165 ;
11166 return 0;
11167}
11168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172
Matthias Kloseb159a552010-04-25 21:00:44 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175else
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178
11179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11182$as_echo_n "checking for fchdir... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011185#include <unistd.h>
11186int
11187main ()
11188{
11189void *x=fchdir
11190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011203
11204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11207$as_echo_n "checking for fsync... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011210#include <unistd.h>
11211int
11212main ()
11213{
11214void *x=fsync
11215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011222
Matthias Kloseb159a552010-04-25 21:00:44 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011228
11229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11232$as_echo_n "checking for fdatasync... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011235#include <unistd.h>
11236int
11237main ()
11238{
11239void *x=fdatasync
11240 ;
11241 return 0;
11242}
11243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247
Matthias Kloseb159a552010-04-25 21:00:44 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11252$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011253
11254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11257$as_echo_n "checking for epoll... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011259/* end confdefs.h. */
11260#include <sys/epoll.h>
11261int
11262main ()
11263{
11264void *x=epoll_create
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011278
11279fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11282$as_echo_n "checking for epoll_create1... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11284/* end confdefs.h. */
11285#include <sys/epoll.h>
11286int
11287main ()
11288{
11289void *x=epoll_create1
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294if ac_fn_c_try_compile "$LINENO"; then :
11295
11296$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11297
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11299$as_echo "yes" >&6; }
11300else
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
11303
11304fi
11305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11307$as_echo_n "checking for kqueue... " >&6; }
11308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011309/* end confdefs.h. */
11310
11311#include <sys/types.h>
11312#include <sys/event.h>
11313
11314int
11315main ()
11316{
11317int x=kqueue()
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011325
Matthias Kloseb159a552010-04-25 21:00:44 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011331
11332fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11335$as_echo_n "checking for prlimit... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h. */
11338
11339#include <sys/time.h>
11340#include <sys/resource.h>
11341
11342int
11343main ()
11344{
11345void *x=prlimit
11346 ;
11347 return 0;
11348}
11349_ACEOF
11350if ac_fn_c_try_compile "$LINENO"; then :
11351
11352$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11353
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355$as_echo "yes" >&6; }
11356else
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358$as_echo "no" >&6; }
11359
11360fi
11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362
Martin v. Löwisd5843682002-11-21 20:41:28 +000011363# On some systems (eg. FreeBSD 5), we would find a definition of the
11364# functions ctermid_r, setgroups in the library, but no prototype
11365# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11366# address to avoid compiler warnings and potential miscompilations
11367# because of the missing prototypes.
11368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11370$as_echo_n "checking for ctermid_r... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374#include <stdio.h>
11375
Martin v. Löwisd5843682002-11-21 20:41:28 +000011376int
11377main ()
11378{
11379void* p = ctermid_r
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387
Matthias Kloseb159a552010-04-25 21:00:44 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393
11394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11396
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11398$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011399if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011400 $as_echo_n "(cached) " >&6
11401else
11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011404#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011405int
11406main ()
11407{
11408void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011409
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011415 ac_cv_flock_decl=yes
11416else
11417 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011418
11419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011421
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11424$as_echo "$ac_cv_flock_decl" >&6; }
11425if test "x${ac_cv_flock_decl}" = xyes; then
11426 for ac_func in flock
11427do :
11428 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011430 cat >>confdefs.h <<_ACEOF
11431#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011432_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011433
Antoine Pitroua3000072010-09-07 14:52:42 +000011434else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011436$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011437if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011438 $as_echo_n "(cached) " >&6
11439else
11440 ac_check_lib_save_LIBS=$LIBS
11441LIBS="-lbsd $LIBS"
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443/* end confdefs.h. */
11444
11445/* Override any GCC internal prototype to avoid an error.
11446 Use char because int might match the return type of a GCC
11447 builtin and then its argument prototype would still apply. */
11448#ifdef __cplusplus
11449extern "C"
11450#endif
11451char flock ();
11452int
11453main ()
11454{
11455return flock ();
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460if ac_fn_c_try_link "$LINENO"; then :
11461 ac_cv_lib_bsd_flock=yes
11462else
11463 ac_cv_lib_bsd_flock=no
11464fi
11465rm -f core conftest.err conftest.$ac_objext \
11466 conftest$ac_exeext conftest.$ac_ext
11467LIBS=$ac_check_lib_save_LIBS
11468fi
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11470$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011472 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011473
11474
11475$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11476
11477
11478fi
11479
11480
11481fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011482done
11483
Antoine Pitroua3000072010-09-07 14:52:42 +000011484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11487$as_echo_n "checking for getpagesize... " >&6; }
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011489/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011490
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011491#include <unistd.h>
11492
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011493int
11494main ()
11495{
11496void* p = getpagesize
11497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011504
Matthias Kloseb159a552010-04-25 21:00:44 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011506$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011510
11511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011513
Victor Stinner984890f2011-11-24 13:53:38 +010011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11515$as_echo_n "checking for broken unsetenv... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518
11519#include <stdlib.h>
11520
11521int
11522main ()
11523{
11524int res = unsetenv("DUMMY")
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529if ac_fn_c_try_compile "$LINENO"; then :
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
11532else
11533
11534$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11535
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
11538
11539fi
11540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011542for ac_prog in true
11543do
11544 # Extract the first word of "$ac_prog", so it can be a program name with args.
11545set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011548if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011550else
11551 if test -n "$TRUE"; then
11552 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11553else
11554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11555for as_dir in $PATH
11556do
11557 IFS=$as_save_IFS
11558 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011561 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 $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 +000011563 break 2
11564 fi
11565done
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011568
11569fi
11570fi
11571TRUE=$ac_cv_prog_TRUE
11572if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11574$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011578fi
11579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581 test -n "$TRUE" && break
11582done
11583test -n "$TRUE" || TRUE="/bin/true"
11584
11585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11587$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011588if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011590else
11591 ac_check_lib_save_LIBS=$LIBS
11592LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596/* Override any GCC internal prototype to avoid an error.
11597 Use char because int might match the return type of a GCC
11598 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011599#ifdef __cplusplus
11600extern "C"
11601#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011602char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011603int
11604main ()
11605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011607 ;
11608 return 0;
11609}
11610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011612 ac_cv_lib_c_inet_aton=yes
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011618LIBS=$ac_check_lib_save_LIBS
11619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11621$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011623 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11626$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011627if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011629else
11630 ac_check_lib_save_LIBS=$LIBS
11631LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638#ifdef __cplusplus
11639extern "C"
11640#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642int
11643main ()
11644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646 ;
11647 return 0;
11648}
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651 ac_cv_lib_resolv_inet_aton=yes
11652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657LIBS=$ac_check_lib_save_LIBS
11658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11660$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011661if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662 cat >>confdefs.h <<_ACEOF
11663#define HAVE_LIBRESOLV 1
11664_ACEOF
11665
11666 LIBS="-lresolv $LIBS"
11667
11668fi
11669
11670
11671fi
11672
11673
Christian Heimesd0764e22007-12-04 15:00:33 +000011674# On Tru64, chflags seems to be present, but calling it will
11675# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11677$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011682 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011685/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011686
Christian Heimesd0764e22007-12-04 15:00:33 +000011687#include <sys/stat.h>
11688#include <unistd.h>
11689int main(int argc, char*argv[])
11690{
11691 if(chflags(argv[0], 0) != 0)
11692 return 1;
11693 return 0;
11694}
Ned Deily3eb67d52011-06-28 00:00:28 -070011695
Christian Heimesd0764e22007-12-04 15:00:33 +000011696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011698 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011704fi
11705
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11709$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011710if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011713 ac_cv_have_chflags="yes"
11714else
11715 ac_cv_have_chflags="no"
11716fi
11717
11718fi
11719if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011722
11723fi
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11726$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011731 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011734/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011735
Christian Heimesd0764e22007-12-04 15:00:33 +000011736#include <sys/stat.h>
11737#include <unistd.h>
11738int main(int argc, char*argv[])
11739{
11740 if(lchflags(argv[0], 0) != 0)
11741 return 1;
11742 return 0;
11743}
Ned Deily3eb67d52011-06-28 00:00:28 -070011744
Christian Heimesd0764e22007-12-04 15:00:33 +000011745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011747 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011753fi
11754
11755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11758$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011759if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011762 ac_cv_have_lchflags="yes"
11763else
11764 ac_cv_have_lchflags="no"
11765fi
11766
11767fi
11768if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011771
11772fi
11773
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011774case $ac_sys_system/$ac_sys_release in
11775Darwin/*)
11776 _CUR_CFLAGS="${CFLAGS}"
11777 _CUR_LDFLAGS="${LDFLAGS}"
11778 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11779 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11780 ;;
11781esac
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11784$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011785if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011787else
11788 ac_check_lib_save_LIBS=$LIBS
11789LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011791/* end confdefs.h. */
11792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793/* Override any GCC internal prototype to avoid an error.
11794 Use char because int might match the return type of a GCC
11795 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011796#ifdef __cplusplus
11797extern "C"
11798#endif
11799char inflateCopy ();
11800int
11801main ()
11802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011809 ac_cv_lib_z_inflateCopy=yes
11810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813rm -f core conftest.err conftest.$ac_objext \
11814 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011815LIBS=$ac_check_lib_save_LIBS
11816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11818$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011822
11823fi
11824
11825
11826case $ac_sys_system/$ac_sys_release in
11827Darwin/*)
11828 CFLAGS="${_CUR_CFLAGS}"
11829 LDFLAGS="${_CUR_LDFLAGS}"
11830 ;;
11831esac
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11834$as_echo_n "checking for hstrerror... " >&6; }
11835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011836/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011837
Martin v. Löwise9416172003-05-03 10:12:45 +000011838#include <netdb.h>
11839
Martin v. Löwise9416172003-05-03 10:12:45 +000011840int
11841main ()
11842{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011851
Matthias Kloseb159a552010-04-25 21:00:44 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011857
11858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011859rm -f core conftest.err conftest.$ac_objext \
11860 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11863$as_echo_n "checking for inet_aton... " >&6; }
11864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011865/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011866
Martin v. Löwis86d66262006-02-17 08:40:11 +000011867#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011868#include <sys/socket.h>
11869#include <netinet/in.h>
11870#include <arpa/inet.h>
11871
Martin v. Löwise9416172003-05-03 10:12:45 +000011872int
11873main ()
11874{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011875void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011883
Matthias Kloseb159a552010-04-25 21:00:44 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11888$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011889
11890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core conftest.err conftest.$ac_objext \
11892 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11895$as_echo_n "checking for inet_pton... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011898
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011899#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011900#include <sys/socket.h>
11901#include <netinet/in.h>
11902#include <arpa/inet.h>
11903
Martin v. Löwise9416172003-05-03 10:12:45 +000011904int
11905main ()
11906{
11907void* p = inet_pton
11908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011915
Matthias Kloseb159a552010-04-25 21:00:44 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011921
11922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011925# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11927$as_echo_n "checking for setgroups... " >&6; }
11928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011929/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011930
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011931#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011932#ifdef HAVE_GRP_H
11933#include <grp.h>
11934#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011935
Martin v. Löwisd5843682002-11-21 20:41:28 +000011936int
11937main ()
11938{
11939void* p = setgroups
11940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011947
Matthias Kloseb159a552010-04-25 21:00:44 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11952$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011953
11954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011956
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011957# check for openpty and forkpty
11958
11959for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011960do :
11961 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011962if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011965_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11969$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011970if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011972else
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011974LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978/* Override any GCC internal prototype to avoid an error.
11979 Use char because int might match the return type of a GCC
11980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011981#ifdef __cplusplus
11982extern "C"
11983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011984char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011985int
11986main ()
11987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 ;
11990 return 0;
11991}
11992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998rm -f core conftest.err conftest.$ac_objext \
11999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012000LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12003$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012006 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12009$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012010if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012012else
12013 ac_check_lib_save_LIBS=$LIBS
12014LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012016/* end confdefs.h. */
12017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018/* Override any GCC internal prototype to avoid an error.
12019 Use char because int might match the return type of a GCC
12020 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012021#ifdef __cplusplus
12022extern "C"
12023#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012024char openpty ();
12025int
12026main ()
12027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012034 ac_cv_lib_bsd_openpty=yes
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038rm -f core conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012040LIBS=$ac_check_lib_save_LIBS
12041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12043$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012046 LIBS="$LIBS -lbsd"
12047fi
12048
12049
12050fi
12051
Fred Drake8cef4cf2000-06-28 16:40:38 +000012052
12053fi
12054done
12055
12056for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012057do :
12058 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012062_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063
Fred Drake8cef4cf2000-06-28 16:40:38 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12066$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012067if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012069else
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012071LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075/* Override any GCC internal prototype to avoid an error.
12076 Use char because int might match the return type of a GCC
12077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012078#ifdef __cplusplus
12079extern "C"
12080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012081char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012082int
12083main ()
12084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095rm -f core conftest.err conftest.$ac_objext \
12096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012097LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12100$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12106$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012109else
12110 ac_check_lib_save_LIBS=$LIBS
12111LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012113/* end confdefs.h. */
12114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115/* Override any GCC internal prototype to avoid an error.
12116 Use char because int might match the return type of a GCC
12117 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118#ifdef __cplusplus
12119extern "C"
12120#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012121char forkpty ();
12122int
12123main ()
12124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012131 ac_cv_lib_bsd_forkpty=yes
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012135rm -f core conftest.err conftest.$ac_objext \
12136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137LIBS=$ac_check_lib_save_LIBS
12138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12140$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012143 LIBS="$LIBS -lbsd"
12144fi
12145
12146
12147fi
12148
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149
12150fi
12151done
12152
Jack Jansendd19cf82001-12-06 22:36:17 +000012153
Michael W. Hudson54241132001-12-07 15:38:26 +000012154# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012156do :
12157 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012159if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012162_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012165done
12166
Michael W. Hudson54241132001-12-07 15:38:26 +000012167
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012168ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012170 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012171
Martin v. Löwis1142de32002-03-29 16:28:31 +000012172else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012174 *" dup2.$ac_objext "* ) ;;
12175 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012177esac
12178
Martin v. Löwis1142de32002-03-29 16:28:31 +000012179fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012180
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012181ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012183 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12184
12185else
12186 case " $LIBOBJS " in
12187 *" strdup.$ac_objext "* ) ;;
12188 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12189 ;;
12190esac
12191
12192fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012193
12194
12195for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012196do :
12197 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012198if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012205int
12206main ()
12207{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012208getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012216
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012219
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012221done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012222
Jack Jansen150753c2003-03-29 22:07:47 +000012223for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012224do :
12225 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012227 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012231/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012232#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012233int
12234main ()
12235{
12236setpgrp(0,0);
12237 ;
12238 return 0;
12239}
12240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012244
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012247
12248fi
12249done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012250
Thomas Wouters3a584202000-08-05 23:28:51 +000012251for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012252do :
12253 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012254if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012260#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012261int
12262main ()
12263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012264gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ;
12266 return 0;
12267}
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_compile "$LINENO"; then :
12270
Guido van Rossum627b2d71993-12-24 10:39:16 +000012271else
Skip Montanaro6dead952003-09-25 14:50:04 +000012272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
Guido van Rossum627b2d71993-12-24 10:39:16 +000012276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012279fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012280done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281
Michael W. Hudson54241132001-12-07 15:38:26 +000012282
Victor Stinnere0be4232011-10-25 13:06:09 +020012283for ac_func in clock_gettime
12284do :
12285 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12286if test "x$ac_cv_func_clock_gettime" = xyes; then :
12287 cat >>confdefs.h <<_ACEOF
12288#define HAVE_CLOCK_GETTIME 1
12289_ACEOF
12290
12291else
12292
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12294$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12295if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12296 $as_echo_n "(cached) " >&6
12297else
12298 ac_check_lib_save_LIBS=$LIBS
12299LIBS="-lrt $LIBS"
12300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12301/* end confdefs.h. */
12302
12303/* Override any GCC internal prototype to avoid an error.
12304 Use char because int might match the return type of a GCC
12305 builtin and then its argument prototype would still apply. */
12306#ifdef __cplusplus
12307extern "C"
12308#endif
12309char clock_gettime ();
12310int
12311main ()
12312{
12313return clock_gettime ();
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318if ac_fn_c_try_link "$LINENO"; then :
12319 ac_cv_lib_rt_clock_gettime=yes
12320else
12321 ac_cv_lib_rt_clock_gettime=no
12322fi
12323rm -f core conftest.err conftest.$ac_objext \
12324 conftest$ac_exeext conftest.$ac_ext
12325LIBS=$ac_check_lib_save_LIBS
12326fi
12327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12328$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12329if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12330
Victor Stinner7efb8332014-08-29 15:41:08 +020012331 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012332 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12333
12334
12335$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12336
12337
12338fi
12339
12340
12341fi
12342done
12343
12344
12345for ac_func in clock_getres
12346do :
12347 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12348if test "x$ac_cv_func_clock_getres" = xyes; then :
12349 cat >>confdefs.h <<_ACEOF
12350#define HAVE_CLOCK_GETRES 1
12351_ACEOF
12352
12353else
12354
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12356$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12357if ${ac_cv_lib_rt_clock_getres+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359else
12360 ac_check_lib_save_LIBS=$LIBS
12361LIBS="-lrt $LIBS"
12362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363/* end confdefs.h. */
12364
12365/* Override any GCC internal prototype to avoid an error.
12366 Use char because int might match the return type of a GCC
12367 builtin and then its argument prototype would still apply. */
12368#ifdef __cplusplus
12369extern "C"
12370#endif
12371char clock_getres ();
12372int
12373main ()
12374{
12375return clock_getres ();
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380if ac_fn_c_try_link "$LINENO"; then :
12381 ac_cv_lib_rt_clock_getres=yes
12382else
12383 ac_cv_lib_rt_clock_getres=no
12384fi
12385rm -f core conftest.err conftest.$ac_objext \
12386 conftest$ac_exeext conftest.$ac_ext
12387LIBS=$ac_check_lib_save_LIBS
12388fi
12389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12390$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12391if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12392
12393 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12394
12395
12396fi
12397
12398
12399fi
12400done
12401
12402
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012403for ac_func in clock_settime
12404do :
12405 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12406if test "x$ac_cv_func_clock_settime" = xyes; then :
12407 cat >>confdefs.h <<_ACEOF
12408#define HAVE_CLOCK_SETTIME 1
12409_ACEOF
12410
12411else
12412
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12414$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12415if ${ac_cv_lib_rt_clock_settime+:} false; then :
12416 $as_echo_n "(cached) " >&6
12417else
12418 ac_check_lib_save_LIBS=$LIBS
12419LIBS="-lrt $LIBS"
12420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12421/* end confdefs.h. */
12422
12423/* Override any GCC internal prototype to avoid an error.
12424 Use char because int might match the return type of a GCC
12425 builtin and then its argument prototype would still apply. */
12426#ifdef __cplusplus
12427extern "C"
12428#endif
12429char clock_settime ();
12430int
12431main ()
12432{
12433return clock_settime ();
12434 ;
12435 return 0;
12436}
12437_ACEOF
12438if ac_fn_c_try_link "$LINENO"; then :
12439 ac_cv_lib_rt_clock_settime=yes
12440else
12441 ac_cv_lib_rt_clock_settime=no
12442fi
12443rm -f core conftest.err conftest.$ac_objext \
12444 conftest$ac_exeext conftest.$ac_ext
12445LIBS=$ac_check_lib_save_LIBS
12446fi
12447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12448$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12449if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12450
12451 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12452
12453
12454fi
12455
12456
12457fi
12458done
12459
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12462$as_echo_n "checking for major... " >&6; }
12463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012465
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012466#if defined(MAJOR_IN_MKDEV)
12467#include <sys/mkdev.h>
12468#elif defined(MAJOR_IN_SYSMACROS)
12469#include <sys/sysmacros.h>
12470#else
12471#include <sys/types.h>
12472#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012473
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012474int
12475main ()
12476{
12477
12478 makedev(major(0),minor(0));
12479
12480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012485
12486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12490$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012491
12492else
Skip Montanaro6dead952003-09-25 14:50:04 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12495$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012496
12497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012498rm -f core conftest.err conftest.$ac_objext \
12499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012500
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012501# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012502# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12504$as_echo_n "checking for getaddrinfo... " >&6; }
12505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012507
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012508#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012509#include <sys/socket.h>
12510#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012511#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513int
12514main ()
12515{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012516getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ;
12518 return 0;
12519}
12520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012521if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012522 have_getaddrinfo=yes
12523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012526rm -f core conftest.err conftest.$ac_objext \
12527 conftest$ac_exeext conftest.$ac_ext
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12529$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530if test $have_getaddrinfo = yes
12531then
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12533$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012534 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012536else
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012538
12539if test "${enable_ipv6+set}" = set; then
12540 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12541else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012542 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012543fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012544else
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547
Stefan Krah19c21392012-11-22 23:47:32 +010012548#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012549#include <sys/types.h>
12550#include <netdb.h>
12551#include <string.h>
12552#include <sys/socket.h>
12553#include <netinet/in.h>
12554
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012555int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556{
12557 int passive, gaierr, inet4 = 0, inet6 = 0;
12558 struct addrinfo hints, *ai, *aitop;
12559 char straddr[INET6_ADDRSTRLEN], strport[16];
12560
12561 for (passive = 0; passive <= 1; passive++) {
12562 memset(&hints, 0, sizeof(hints));
12563 hints.ai_family = AF_UNSPEC;
12564 hints.ai_flags = passive ? AI_PASSIVE : 0;
12565 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012566 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012567 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12568 (void)gai_strerror(gaierr);
12569 goto bad;
12570 }
12571 for (ai = aitop; ai; ai = ai->ai_next) {
12572 if (ai->ai_addr == NULL ||
12573 ai->ai_addrlen == 0 ||
12574 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12575 straddr, sizeof(straddr), strport, sizeof(strport),
12576 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12577 goto bad;
12578 }
12579 switch (ai->ai_family) {
12580 case AF_INET:
12581 if (strcmp(strport, "54321") != 0) {
12582 goto bad;
12583 }
12584 if (passive) {
12585 if (strcmp(straddr, "0.0.0.0") != 0) {
12586 goto bad;
12587 }
12588 } else {
12589 if (strcmp(straddr, "127.0.0.1") != 0) {
12590 goto bad;
12591 }
12592 }
12593 inet4++;
12594 break;
12595 case AF_INET6:
12596 if (strcmp(strport, "54321") != 0) {
12597 goto bad;
12598 }
12599 if (passive) {
12600 if (strcmp(straddr, "::") != 0) {
12601 goto bad;
12602 }
12603 } else {
12604 if (strcmp(straddr, "::1") != 0) {
12605 goto bad;
12606 }
12607 }
12608 inet6++;
12609 break;
12610 case AF_UNSPEC:
12611 goto bad;
12612 break;
12613 default:
12614 /* another family support? */
12615 break;
12616 }
12617 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012618 freeaddrinfo(aitop);
12619 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012620 }
12621
12622 if (!(inet4 == 0 || inet4 == 2))
12623 goto bad;
12624 if (!(inet6 == 0 || inet6 == 2))
12625 goto bad;
12626
12627 if (aitop)
12628 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012629 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630
12631 bad:
12632 if (aitop)
12633 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635}
12636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012638if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012639 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640else
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012647fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012648
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12652$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12653
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012654if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012655then
12656 if test $ipv6 = yes
12657 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658 echo 'Fatal: You must get working getaddrinfo() function.'
12659 echo ' or you can specify "--disable-ipv6"'.
12660 exit 1
12661 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012665
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012666fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012667
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012668for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012669do :
12670 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012671if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012674_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012675
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012676fi
12677done
12678
Michael W. Hudson54241132001-12-07 15:38:26 +000012679
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12682$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012683if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688#include <sys/types.h>
12689#include <sys/time.h>
12690#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
12695if ((struct tm *) 0)
12696return 0;
12697 ;
12698 return 0;
12699}
12700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703else
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12709$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012710if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713
12714fi
12715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12717$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012718if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720else
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723#include <sys/types.h>
12724#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729struct tm tm;
12730 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012736if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737 ac_cv_struct_tm=time.h
12738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12744$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012745if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012748
12749fi
12750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751ac_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 +000012752#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754"
Victor Stinnere0be4232011-10-25 13:06:09 +020012755if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
12757cat >>confdefs.h <<_ACEOF
12758#define HAVE_STRUCT_TM_TM_ZONE 1
12759_ACEOF
12760
12761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012763
Martin v. Löwis11437992002-04-12 09:54:03 +000012764if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767
12768else
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12770"
Victor Stinnere0be4232011-10-25 13:06:09 +020012771if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773else
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775fi
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012779_ACEOF
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12782$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012783if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012788#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789#if !HAVE_DECL_TZNAME
12790extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
Martin v. Löwis11437992002-04-12 09:54:03 +000012793int
12794main ()
12795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ;
12798 return 0;
12799}
12800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012801if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012802 ac_cv_var_tzname=yes
12803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806rm -f core conftest.err conftest.$ac_objext \
12807 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12810$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012811 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012815 fi
12816fi
12817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818ac_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 +020012819if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
12821cat >>confdefs.h <<_ACEOF
12822#define HAVE_STRUCT_STAT_ST_RDEV 1
12823_ACEOF
12824
12825
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012826fi
12827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828ac_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 +020012829if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012830
Martin v. Löwis11437992002-04-12 09:54:03 +000012831cat >>confdefs.h <<_ACEOF
12832#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12833_ACEOF
12834
12835
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012836fi
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838ac_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 +020012839if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012840
12841cat >>confdefs.h <<_ACEOF
12842#define HAVE_STRUCT_STAT_ST_FLAGS 1
12843_ACEOF
12844
12845
12846fi
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848ac_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 +020012849if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012850
12851cat >>confdefs.h <<_ACEOF
12852#define HAVE_STRUCT_STAT_ST_GEN 1
12853_ACEOF
12854
12855
12856fi
12857
Matthias Kloseb9621712010-04-24 17:59:49 +000012858ac_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 +020012859if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012860
12861cat >>confdefs.h <<_ACEOF
12862#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12863_ACEOF
12864
12865
12866fi
12867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868ac_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 +020012869if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012870
Martin v. Löwis11437992002-04-12 09:54:03 +000012871cat >>confdefs.h <<_ACEOF
12872#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12873_ACEOF
12874
12875
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012876fi
12877
Stefan Krah267b6392016-04-26 01:09:18 +020012878ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12879 #include <sys/types.h>
12880 #include <pwd.h>
12881
12882"
12883if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12884
12885cat >>confdefs.h <<_ACEOF
12886#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12887_ACEOF
12888
12889
12890fi
12891ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12892 #include <sys/types.h>
12893 #include <pwd.h>
12894
12895"
12896if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12897
12898cat >>confdefs.h <<_ACEOF
12899#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12900_ACEOF
12901
12902
12903fi
12904
Zachary Ware6a6967e2016-10-01 00:47:27 -050012905# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
12906ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
12907"
12908if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
12909
12910cat >>confdefs.h <<_ACEOF
12911#define HAVE_SIGINFO_T_SI_BAND 1
12912_ACEOF
12913
12914
12915fi
12916
Michael W. Hudson54241132001-12-07 15:38:26 +000012917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12919$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012920if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922else
Matthias Kloseb159a552010-04-25 21:00:44 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012925/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012926#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012927int
12928main ()
12929{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012930return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ;
12932 return 0;
12933}
12934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936 ac_cv_header_time_altzone=yes
12937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012942fi
12943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12945$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012946if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949
12950fi
12951
Guido van Rossumda88dad1995-01-26 00:46:29 +000012952was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12954$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012957
12958#include <sys/types.h>
12959#include <sys/select.h>
12960#include <sys/time.h>
12961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962int
12963main ()
12964{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012965;
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ;
12967 return 0;
12968}
12969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012971
12972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012975 was_it_defined=yes
12976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12980$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12983$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012984if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012988/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012989#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012990int
12991main ()
12992{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 ;
12995 return 0;
12996}
12997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012998if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012999 ac_cv_struct_addrinfo=yes
13000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13007$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011
13012fi
13013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13015$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013016if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021
13022# include <sys/types.h>
13023# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013024int
13025main ()
13026{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ;
13029 return 0;
13030}
13031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033 ac_cv_struct_sockaddr_storage=yes
13034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13038fi
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13041$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045
13046fi
13047
Christian Heimesdffa3942016-09-05 23:54:41 +020013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13049$as_echo_n "checking for sockaddr_alg... " >&6; }
13050if ${ac_cv_struct_sockaddr_alg+:} false; then :
13051 $as_echo_n "(cached) " >&6
13052else
13053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054/* end confdefs.h. */
13055
13056# include <sys/types.h>
13057# include <sys/socket.h>
13058# include <linux/if_alg.h>
13059int
13060main ()
13061{
13062struct sockaddr_alg s
13063 ;
13064 return 0;
13065}
13066_ACEOF
13067if ac_fn_c_try_compile "$LINENO"; then :
13068 ac_cv_struct_sockaddr_alg=yes
13069else
13070 ac_cv_struct_sockaddr_alg=no
13071fi
13072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13073fi
13074
13075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13076$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13077if test $ac_cv_struct_sockaddr_alg = yes; then
13078
13079$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13080
13081fi
13082
Guido van Rossum627b2d71993-12-24 10:39:16 +000013083# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13086$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013087if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013092$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
13096static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013097test_array [0] = 0;
13098return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
13100 ;
13101 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013102}
Martin v. Löwis11437992002-04-12 09:54:03 +000013103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013105 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13112$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115
13116fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13119$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013120if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126int
13127main ()
13128{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013129
Martin v. Löwis11437992002-04-12 09:54:03 +000013130#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013131 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013133 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135 char const *const *pcpcc;
13136 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 /* NEC SVR4.0.2 mips cc rejects this. */
13138 struct point {int x, y;};
13139 static struct point const zero = {0,0};
13140 /* AIX XL C 1.02.0.0 rejects this.
13141 It does not let you subtract one const X* pointer from another in
13142 an arm of an if-expression whose if-part is not a constant
13143 expression */
13144 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147 ++pcpcc;
13148 ppc = (char**) pcpcc;
13149 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013150 { /* SCO 3.2v4 cc rejects this sort of thing. */
13151 char tx;
13152 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 }
13158 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13159 int x[] = {25, 17};
13160 const int *foo = &x[0];
13161 ++foo;
13162 }
13163 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13164 typedef const int *iptr;
13165 iptr p = 0;
13166 ++p;
13167 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013168 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013170 struct s { int j; const int *ap[3]; } bx;
13171 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 }
13173 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13174 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013179
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 ;
13181 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013182}
Martin v. Löwis11437992002-04-12 09:54:03 +000013183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013184if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013185 ac_cv_c_const=yes
13186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13192$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013193if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196
13197fi
13198
Michael W. Hudson54241132001-12-07 15:38:26 +000013199
Guido van Rossumda88dad1995-01-26 00:46:29 +000013200works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13202$as_echo_n "checking for working signed char... " >&6; }
13203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013204/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013205
Martin v. Löwis11437992002-04-12 09:54:03 +000013206int
13207main ()
13208{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013209signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ;
13211 return 0;
13212}
13213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013215 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013216else
Skip Montanaro6dead952003-09-25 14:50:04 +000013217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013219
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013220
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13224$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013225
Guido van Rossumda88dad1995-01-26 00:46:29 +000013226have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13228$as_echo_n "checking for prototypes... " >&6; }
13229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013230/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013232int
13233main ()
13234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013235return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
Matthias Kloseb159a552010-04-25 21:00:44 +000013244 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13248$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249
Guido van Rossumda88dad1995-01-26 00:46:29 +000013250works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13252$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013255
13256#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013257int foo(int x, ...) {
13258 va_list va;
13259 va_start(va, x);
13260 va_arg(va, int);
13261 va_arg(va, char *);
13262 va_arg(va, double);
13263 return 0;
13264}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266int
13267main ()
13268{
Guido van Rossum90eea071996-08-30 20:58:57 +000013269return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 ;
13271 return 0;
13272}
13273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
13276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013279 works=yes
13280
Guido van Rossum627b2d71993-12-24 10:39:16 +000013281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13284$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285
Martin v. Löwisd6320502004-08-12 13:45:08 +000013286# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13288$as_echo_n "checking for socketpair... " >&6; }
13289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013290/* end confdefs.h. */
13291
13292#include <sys/types.h>
13293#include <sys/socket.h>
13294
13295int
13296main ()
13297{
13298void *x=socketpair
13299 ;
13300 return 0;
13301}
13302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013306
Matthias Kloseb159a552010-04-25 21:00:44 +000013307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013312
13313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013315
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13318$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013321#include <sys/types.h>
13322#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013323int
13324main ()
13325{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326struct sockaddr x;
13327x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 ;
13329 return 0;
13330}
13331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013332if ac_fn_c_try_compile "$LINENO"; then :
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13334$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013337
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13340$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013341
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013344
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013345# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013349if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13354$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013355 OLD_CFLAGS=$CFLAGS
13356 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013359
13360# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Martin v. Löwis11437992002-04-12 09:54:03 +000013362int
13363main ()
13364{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013365
13366 char *name;
13367 struct hostent *he, *res;
13368 char buffer[2048];
13369 int buflen = 2048;
13370 int h_errnop;
13371
13372 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13386$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013388else
Skip Montanaro6dead952003-09-25 14:50:04 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13391$as_echo "no" >&6; }
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13393$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013397# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399int
13400main ()
13401{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013402
13403 char *name;
13404 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013405 char buffer[2048];
13406 int buflen = 2048;
13407 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013408
Matthias Kloseb159a552010-04-25 21:00:44 +000013409 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
13411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb159a552010-04-25 21:00:44 +000013420$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13423$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425else
Skip Montanaro6dead952003-09-25 14:50:04 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13428$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13430$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13432/* end confdefs.h. */
13433
13434# include <netdb.h>
13435
13436int
13437main ()
13438{
13439
13440 char *name;
13441 struct hostent *he;
13442 struct hostent_data data;
13443
13444 (void) gethostbyname_r(name, he, &data);
13445
13446 ;
13447 return 0;
13448}
13449_ACEOF
13450if ac_fn_c_try_compile "$LINENO"; then :
13451
13452 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13453
13454
13455$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13456
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13458$as_echo "yes" >&6; }
13459
13460else
13461
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13463$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013473 CFLAGS=$OLD_CFLAGS
13474
13475else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 for ac_func in gethostbyname
13478do :
13479 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013480if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013486done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489fi
13490
Michael W. Hudson54241132001-12-07 15:38:26 +000013491
13492
13493
13494
13495
13496
Guido van Rossum627b2d71993-12-24 10:39:16 +000013497# checks for system services
13498# (none yet)
13499
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013501ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13506$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509else
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013511LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515/* Override any GCC internal prototype to avoid an error.
13516 Use char because int might match the return type of a GCC
13517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013518#ifdef __cplusplus
13519extern "C"
13520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013521char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013522int
13523main ()
13524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13540$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013541if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 cat >>confdefs.h <<_ACEOF
13543#define HAVE_LIBIEEE 1
13544_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013546 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548fi
13549
Michael W. Hudson54241132001-12-07 15:38:26 +000013550
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013551fi
13552
Michael W. Hudson54241132001-12-07 15:38:26 +000013553
Guido van Rossum7f43da71994-08-01 12:15:30 +000013554# check for --with-libm=...
13555
Guido van Rossum563e7081996-09-10 18:20:48 +000013556case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013557Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013558*) LIBM=-lm
13559esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13561$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013566if test "$withval" = no
13567then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13569$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013570elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13573$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013574else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013575fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13578$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579fi
13580
Guido van Rossum7f43da71994-08-01 12:15:30 +000013581
13582# check for --with-libc=...
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13585$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013590if test "$withval" = no
13591then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13593$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013594elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013595then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13597$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013598else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13602$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603fi
13604
Guido van Rossum7f43da71994-08-01 12:15:30 +000013605
Stefan Krah1919b7e2012-03-21 18:25:23 +010013606# **************************************
13607# * Check for gcc x64 inline assembler *
13608# **************************************
13609
13610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13611$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613/* end confdefs.h. */
13614
13615int
13616main ()
13617{
13618
13619 __asm__ __volatile__ ("movq %rcx, %rax");
13620
13621 ;
13622 return 0;
13623}
13624_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013625if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013626 have_gcc_asm_for_x64=yes
13627else
13628 have_gcc_asm_for_x64=no
13629fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013630rm -f core conftest.err conftest.$ac_objext \
13631 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13633$as_echo "$have_gcc_asm_for_x64" >&6; }
13634if test "$have_gcc_asm_for_x64" = yes
13635then
13636
13637$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13638
13639fi
13640
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013641# **************************************************
13642# * Check for various properties of floating point *
13643# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13646$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013649else
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013652 ac_cv_little_endian_double=no
13653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655/* end confdefs.h. */
13656
13657#include <string.h>
13658int main() {
13659 double x = 9006104071832581.0;
13660 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13661 return 0;
13662 else
13663 return 1;
13664}
13665
13666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013668 ac_cv_little_endian_double=yes
13669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674fi
13675
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013676fi
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13679$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680if test "$ac_cv_little_endian_double" = yes
13681then
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013684
13685fi
13686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13688$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013689if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013691else
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694 ac_cv_big_endian_double=no
13695else
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013697/* end confdefs.h. */
13698
13699#include <string.h>
13700int main() {
13701 double x = 9006104071832581.0;
13702 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13703 return 0;
13704 else
13705 return 1;
13706}
13707
13708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013709if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013710 ac_cv_big_endian_double=yes
13711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013716fi
13717
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718fi
13719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13721$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722if test "$ac_cv_big_endian_double" = yes
13723then
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013726
13727fi
13728
13729# Some ARM platforms use a mixed-endian representation for doubles.
13730# While Python doesn't currently have full support for these platforms
13731# (see e.g., issue 1762561), we can at least make sure that float <-> string
13732# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13734$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737else
13738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013740 ac_cv_mixed_endian_double=no
13741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743/* end confdefs.h. */
13744
13745#include <string.h>
13746int main() {
13747 double x = 9006104071832581.0;
13748 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13749 return 0;
13750 else
13751 return 1;
13752}
13753
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013756 ac_cv_mixed_endian_double=yes
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762fi
13763
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13767$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768if test "$ac_cv_mixed_endian_double" = yes
13769then
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013772
13773fi
13774
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013775# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013776# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013777# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013778# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013779# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013780# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013781
13782# This inline assembler syntax may also work for suncc and icc,
13783# so we try it on all platforms.
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13786$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788/* end confdefs.h. */
13789
13790int
13791main ()
13792{
13793
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013794 unsigned short cw;
13795 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13796 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797
13798 ;
13799 return 0;
13800}
13801_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013802if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803 have_gcc_asm_for_x87=yes
13804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013807rm -f core conftest.err conftest.$ac_objext \
13808 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13810$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013811if test "$have_gcc_asm_for_x87" = yes
13812then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13819$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822
13823int
13824main ()
13825{
13826
13827 unsigned int fpcr;
13828 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13829 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13830
13831 ;
13832 return 0;
13833}
13834_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013835if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013836 have_gcc_asm_for_mc68881=yes
13837else
13838 have_gcc_asm_for_mc68881=no
13839fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013840rm -f core conftest.err conftest.$ac_objext \
13841 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13843$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13844if test "$have_gcc_asm_for_mc68881" = yes
13845then
13846
13847$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13848
13849fi
13850
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013851# Detect whether system arithmetic is subject to x87-style double
13852# rounding issues. The result of this test has little meaning on non
13853# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13854# mode is round-to-nearest and double rounding issues are present, and
13855# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13857$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858# $BASECFLAGS may affect the result
13859ac_save_cc="$CC"
13860CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013861if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013862 ac_cv_x87_double_rounding=no
13863else
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013865/* end confdefs.h. */
13866
13867#include <stdlib.h>
13868#include <math.h>
13869int main() {
13870 volatile double x, y, z;
13871 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13872 x = 0.99999999999999989; /* 1-2**-53 */
13873 y = 1./x;
13874 if (y != 1.)
13875 exit(0);
13876 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13877 x = 1e16;
13878 y = 2.99999;
13879 z = x + y;
13880 if (z != 1e16+4.)
13881 exit(0);
13882 /* both tests show evidence of double rounding */
13883 exit(1);
13884}
13885
13886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013888 ac_cv_x87_double_rounding=no
13889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013894fi
13895
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13898$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013899if test "$ac_cv_x87_double_rounding" = yes
13900then
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013903
13904fi
13905
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906# ************************************
13907# * Check for mathematical functions *
13908# ************************************
13909
13910LIBS_SAVE=$LIBS
13911LIBS="$LIBS $LIBM"
13912
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013913for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13914do :
13915 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13916ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013917if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013918 cat >>confdefs.h <<_ACEOF
13919#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13920_ACEOF
13921
13922fi
13923done
13924
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013925for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013926do :
13927 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13928ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013929if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013930 cat >>confdefs.h <<_ACEOF
13931#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13932_ACEOF
13933
13934fi
13935done
13936
13937ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13938"
Victor Stinnere0be4232011-10-25 13:06:09 +020013939if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013940 ac_have_decl=1
13941else
13942 ac_have_decl=0
13943fi
13944
13945cat >>confdefs.h <<_ACEOF
13946#define HAVE_DECL_ISINF $ac_have_decl
13947_ACEOF
13948ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13949"
Victor Stinnere0be4232011-10-25 13:06:09 +020013950if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013951 ac_have_decl=1
13952else
13953 ac_have_decl=0
13954fi
13955
13956cat >>confdefs.h <<_ACEOF
13957#define HAVE_DECL_ISNAN $ac_have_decl
13958_ACEOF
13959ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13960"
Victor Stinnere0be4232011-10-25 13:06:09 +020013961if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013962 ac_have_decl=1
13963else
13964 ac_have_decl=0
13965fi
13966
13967cat >>confdefs.h <<_ACEOF
13968#define HAVE_DECL_ISFINITE $ac_have_decl
13969_ACEOF
13970
13971
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013972# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13973# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13975$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013976if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013978else
13979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013981 ac_cv_tanh_preserves_zero_sign=no
13982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013984/* end confdefs.h. */
13985
13986#include <math.h>
13987#include <stdlib.h>
13988int main() {
13989 /* return 0 if either negative zeros don't exist
13990 on this platform or if negative zeros exist
13991 and tanh(-0.) == -0. */
13992 if (atan2(0., -1.) == atan2(-0., -1.) ||
13993 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13994 else exit(1);
13995}
13996
13997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013999 ac_cv_tanh_preserves_zero_sign=yes
14000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014005fi
14006
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014007fi
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14010$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014011if test "$ac_cv_tanh_preserves_zero_sign" = yes
14012then
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014015
14016fi
14017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014018if test "$ac_cv_func_log1p" = yes
14019then
14020 # On some versions of AIX, log1p(-0.) returns 0. instead of
14021 # -0. See issue #9920.
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14023$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014024 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014025 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014026else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014028 if test "$cross_compiling" = yes; then :
14029 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014034 #include <math.h>
14035 #include <stdlib.h>
14036 int main() {
14037 /* Fail if the signs of log1p(-0.) and -0. can be
14038 distinguished. */
14039 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14040 return 0;
14041 else
14042 return 1;
14043 }
14044
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014045_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014046if ac_fn_c_try_run "$LINENO"; then :
14047 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014048else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014049 ac_cv_log1p_drops_zero_sign=yes
14050fi
14051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014053fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014055fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14058$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14059fi
14060if test "$ac_cv_log1p_drops_zero_sign" = yes
14061then
14062
14063$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14064
14065fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014066
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014067LIBS=$LIBS_SAVE
14068
Mark Dickinsona614f042009-11-28 12:48:43 +000014069# For multiprocessing module, check that sem_open
14070# actually works. For FreeBSD versions <= 7.2,
14071# the kernel module that provides POSIX semaphores
14072# isn't loaded by default, so an attempt to call
14073# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14075$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014076if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014080 ac_cv_posix_semaphores_enabled=yes
14081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014083/* end confdefs.h. */
14084
14085#include <unistd.h>
14086#include <fcntl.h>
14087#include <stdio.h>
14088#include <semaphore.h>
14089#include <sys/stat.h>
14090
14091int main(void) {
14092 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14093 if (a == SEM_FAILED) {
14094 perror("sem_open");
14095 return 1;
14096 }
14097 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014098 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014099 return 0;
14100}
14101
14102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014103if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014104 ac_cv_posix_semaphores_enabled=yes
14105else
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014110fi
14111
14112
Mark Dickinsona614f042009-11-28 12:48:43 +000014113fi
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14116$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014117if test $ac_cv_posix_semaphores_enabled = no
14118then
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014121
14122fi
14123
Mark Dickinson10683072009-04-18 21:18:19 +000014124# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14126$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014131 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014134/* end confdefs.h. */
14135
14136#include <unistd.h>
14137#include <fcntl.h>
14138#include <stdio.h>
14139#include <semaphore.h>
14140#include <sys/stat.h>
14141
14142int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014143 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014144 int count;
14145 int res;
14146 if(a==SEM_FAILED){
14147 perror("sem_open");
14148 return 1;
14149
14150 }
14151 res = sem_getvalue(a, &count);
14152 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014153 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014154 return res==-1 ? 1 : 0;
14155}
14156
Mark Dickinson10683072009-04-18 21:18:19 +000014157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014158if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014165fi
14166
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014167
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014168fi
14169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14171$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172if test $ac_cv_broken_sem_getvalue = yes
14173then
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176
14177fi
14178
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014179ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14180"
14181if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14182 ac_have_decl=1
14183else
14184 ac_have_decl=0
14185fi
14186
14187cat >>confdefs.h <<_ACEOF
14188#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14189_ACEOF
14190ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14191"
14192if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14193 ac_have_decl=1
14194else
14195 ac_have_decl=0
14196fi
14197
14198cat >>confdefs.h <<_ACEOF
14199#define HAVE_DECL_RTLD_NOW $ac_have_decl
14200_ACEOF
14201ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14202"
14203if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14204 ac_have_decl=1
14205else
14206 ac_have_decl=0
14207fi
14208
14209cat >>confdefs.h <<_ACEOF
14210#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14211_ACEOF
14212ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14213"
14214if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14215 ac_have_decl=1
14216else
14217 ac_have_decl=0
14218fi
14219
14220cat >>confdefs.h <<_ACEOF
14221#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14222_ACEOF
14223ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14224"
14225if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14226 ac_have_decl=1
14227else
14228 ac_have_decl=0
14229fi
14230
14231cat >>confdefs.h <<_ACEOF
14232#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14233_ACEOF
14234ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14235"
14236if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14237 ac_have_decl=1
14238else
14239 ac_have_decl=0
14240fi
14241
14242cat >>confdefs.h <<_ACEOF
14243#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14244_ACEOF
14245ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14246"
14247if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14248 ac_have_decl=1
14249else
14250 ac_have_decl=0
14251fi
14252
14253cat >>confdefs.h <<_ACEOF
14254#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14255_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014256ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14257"
14258if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14259 ac_have_decl=1
14260else
14261 ac_have_decl=0
14262fi
14263
14264cat >>confdefs.h <<_ACEOF
14265#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14266_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014267
14268
Mark Dickinsonbd792642009-03-18 20:06:12 +000014269# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14271$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014272# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014273if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014274 enableval=$enable_big_digits; case $enable_big_digits in
14275yes)
14276 enable_big_digits=30 ;;
14277no)
14278 enable_big_digits=15 ;;
1427915|30)
14280 ;;
14281*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014282 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 +000014283esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14285$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014286
14287cat >>confdefs.h <<_ACEOF
14288#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14289_ACEOF
14290
14291
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14294$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014295fi
14296
14297
Guido van Rossumef2255b2000-03-10 22:30:29 +000014298# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014299ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014300if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
14302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014305 wchar_h="yes"
14306
Guido van Rossumef2255b2000-03-10 22:30:29 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014309
14310fi
14311
Michael W. Hudson54241132001-12-07 15:38:26 +000014312
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014314# determine wchar_t size
14315if test "$wchar_h" = yes
14316then
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14320# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14322$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014323if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14327"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Martin v. Löwis11437992002-04-12 09:54:03 +000014329else
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 if test "$ac_cv_type_wchar_t" = yes; then
14331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014333as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014334See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 else
14336 ac_cv_sizeof_wchar_t=0
14337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014339
Martin v. Löwis11437992002-04-12 09:54:03 +000014340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14342$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343
14344
14345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014347#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014348_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014349
Michael W. Hudson54241132001-12-07 15:38:26 +000014350
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014351fi
14352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14354$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014355have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014357/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014358
14359#include <tcl.h>
14360#if TCL_UTF_MAX != 6
14361# error "NOT UCS4_TCL"
14362#endif
14363int
14364main ()
14365{
14366
14367 ;
14368 return 0;
14369}
14370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014372
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014375
14376 have_ucs4_tcl=yes
14377
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14381$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014382
Skip Montanaro6dead952003-09-25 14:50:04 +000014383# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014384if test "$wchar_h" = yes
14385then
14386 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14388$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014389 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014391else
14392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014394 ac_cv_wchar_t_signed=yes
14395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014397/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014398
14399 #include <wchar.h>
14400 int main()
14401 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014402 /* Success: exit code 0 */
14403 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014404 }
14405
14406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014407if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014408 ac_cv_wchar_t_signed=yes
14409else
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014414fi
14415
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014416fi
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14419$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420fi
14421
Georg Brandl52d168a2008-01-07 18:10:24 +000014422# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014423if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014424 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014425then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014426 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Georg Brandl52d168a2008-01-07 18:10:24 +000014430else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014431 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014432fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14434$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014435
14436# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14438$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014439if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014441else
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 ac_cv_c_bigendian=unknown
14443 # See if we're dealing with a universal compiler.
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445/* end confdefs.h. */
14446#ifndef __APPLE_CC__
14447 not a universal capable compiler
14448 #endif
14449 typedef int dummy;
14450
Skip Montanaro6dead952003-09-25 14:50:04 +000014451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014452if ac_fn_c_try_compile "$LINENO"; then :
14453
14454 # Check for potential -arch flags. It is not universal unless
14455 # there are at least two -arch flags with different values.
14456 ac_arch=
14457 ac_prev=
14458 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14459 if test -n "$ac_prev"; then
14460 case $ac_word in
14461 i?86 | x86_64 | ppc | ppc64)
14462 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14463 ac_arch=$ac_word
14464 else
14465 ac_cv_c_bigendian=universal
14466 break
14467 fi
14468 ;;
14469 esac
14470 ac_prev=
14471 elif test "x$ac_word" = "x-arch"; then
14472 ac_prev=arch
14473 fi
14474 done
14475fi
14476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14477 if test $ac_cv_c_bigendian = unknown; then
14478 # See if sys/param.h defines the BYTE_ORDER macro.
14479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014481#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014483
Martin v. Löwis11437992002-04-12 09:54:03 +000014484int
14485main ()
14486{
Matthias Kloseb9621712010-04-24 17:59:49 +000014487#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14488 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14489 && LITTLE_ENDIAN)
14490 bogus endian macros
14491 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
14493 ;
14494 return 0;
14495}
14496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014497if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014498 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014501#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504int
14505main ()
14506{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014507#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 not big endian
14509 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014510
14511 ;
14512 return 0;
14513}
14514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014516 ac_cv_c_bigendian=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014521fi
14522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14523 fi
14524 if test $ac_cv_c_bigendian = unknown; then
14525 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014528#include <limits.h>
14529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530int
14531main ()
14532{
Matthias Kloseb9621712010-04-24 17:59:49 +000014533#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14534 bogus endian macros
14535 #endif
14536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537 ;
14538 return 0;
14539}
14540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541if ac_fn_c_try_compile "$LINENO"; then :
14542 # It does; now see whether it defined to _BIG_ENDIAN or not.
14543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14544/* end confdefs.h. */
14545#include <limits.h>
14546
14547int
14548main ()
14549{
14550#ifndef _BIG_ENDIAN
14551 not big endian
14552 #endif
14553
14554 ;
14555 return 0;
14556}
14557_ACEOF
14558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14564fi
14565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14566 fi
14567 if test $ac_cv_c_bigendian = unknown; then
14568 # Compile a test program.
14569 if test "$cross_compiling" = yes; then :
14570 # Try to guess by grepping values from an object file.
14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14572/* end confdefs.h. */
14573short int ascii_mm[] =
14574 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14575 short int ascii_ii[] =
14576 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14577 int use_ascii (int i) {
14578 return ascii_mm[i] + ascii_ii[i];
14579 }
14580 short int ebcdic_ii[] =
14581 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14582 short int ebcdic_mm[] =
14583 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14584 int use_ebcdic (int i) {
14585 return ebcdic_mm[i] + ebcdic_ii[i];
14586 }
14587 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589int
14590main ()
14591{
14592return use_ascii (foo) == use_ebcdic (foo);
14593 ;
14594 return 0;
14595}
14596_ACEOF
14597if ac_fn_c_try_compile "$LINENO"; then :
14598 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14599 ac_cv_c_bigendian=yes
14600 fi
14601 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14602 if test "$ac_cv_c_bigendian" = unknown; then
14603 ac_cv_c_bigendian=no
14604 else
14605 # finding both strings is unlikely to happen, but who knows?
14606 ac_cv_c_bigendian=unknown
14607 fi
14608 fi
14609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014613/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014615int
14616main ()
14617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 /* Are we little or big endian? From Harbison&Steele. */
14620 union
14621 {
14622 long int l;
14623 char c[sizeof (long int)];
14624 } u;
14625 u.l = 1;
14626 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627
14628 ;
14629 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014630}
Martin v. Löwis11437992002-04-12 09:54:03 +000014631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014632if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633 ac_cv_c_bigendian=no
14634else
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14644$as_echo "$ac_cv_c_bigendian" >&6; }
14645 case $ac_cv_c_bigendian in #(
14646 yes)
14647 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14648;; #(
14649 no)
14650 ;; #(
14651 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 ;; #(
14656 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014657 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014658 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014660
Michael W. Hudson54241132001-12-07 15:38:26 +000014661
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014662# ABI version string for Python extension modules. This appears between the
14663# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14664# from the following attributes which affect the ABI of this Python build (in
14665# this order):
14666#
14667# * The Python implementation (always 'cpython-' for us)
14668# * The major and minor version numbers
14669# * --with-pydebug (adds a 'd')
14670# * --with-pymalloc (adds a 'm')
14671# * --with-wide-unicode (adds a 'u')
14672#
14673# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014674# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14675# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014676
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14678$as_echo_n "checking ABIFLAGS... " >&6; }
14679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14680$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14682$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014683SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14685$as_echo "$SOABI" >&6; }
14686
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014687
14688case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014689 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014690 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14691 *)
14692 EXT_SUFFIX=${SHLIB_SUFFIX};;
14693esac
14694
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14696$as_echo_n "checking LDVERSION... " >&6; }
14697LDVERSION='$(VERSION)$(ABIFLAGS)'
14698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14699$as_echo "$LDVERSION" >&6; }
14700
doko@python.org87421192013-01-26 11:39:31 +010014701
doko@ubuntu.com55532312016-06-14 08:55:19 +020014702if test x$PLATFORM_TRIPLET = x; then
14703 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14704else
14705 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14706fi
doko@python.org87421192013-01-26 11:39:31 +010014707
14708
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014709# Check whether right shifting a negative integer extends the sign bit
14710# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14712$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014713if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014715else
Martin v. Löwis11437992002-04-12 09:54:03 +000014716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014718 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014721/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014722
14723int main()
14724{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014725 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014726}
14727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014729if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014730 ac_cv_rshift_extends_sign=yes
14731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014736fi
14737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738fi
14739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14741$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014742if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014743then
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014746
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014747fi
14748
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014749# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14751$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014754else
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014757/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014758#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014759int
14760main ()
14761{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014762
14763 FILE *f = fopen("/dev/null", "r");
14764 flockfile(f);
14765 getc_unlocked(f);
14766 funlockfile(f);
14767
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 ;
14769 return 0;
14770}
14771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014772if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014773 ac_cv_have_getc_unlocked=yes
14774else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 ac_cv_have_getc_unlocked=no
14776fi
14777rm -f core conftest.err conftest.$ac_objext \
14778 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14782$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014783if test "$ac_cv_have_getc_unlocked" = yes
14784then
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014787
14788fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014789
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014790# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014791# save the value of LIBS so we don't actually link Python with readline
14792LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014793
Gregory P. Smith18820942008-09-07 06:24:49 +000014794# On some systems we need to link readline to a termcap compatible
14795# library. NOTE: Keep the precedence of listed libraries synchronised
14796# with setup.py.
14797py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14799$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014800for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014801 if test -z "$py_libtermcap"; then
14802 READLINE_LIBS="-lreadline"
14803 else
14804 READLINE_LIBS="-lreadline -l$py_libtermcap"
14805 fi
14806 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014808/* end confdefs.h. */
14809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810/* Override any GCC internal prototype to avoid an error.
14811 Use char because int might match the return type of a GCC
14812 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014813#ifdef __cplusplus
14814extern "C"
14815#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014816char readline ();
14817int
14818main ()
14819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014821 ;
14822 return 0;
14823}
14824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014826 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828rm -f core conftest.err conftest.$ac_objext \
14829 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014830 if test $py_cv_lib_readline = yes; then
14831 break
14832 fi
14833done
14834# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14835#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014836if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14838$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14841$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014844
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014845fi
14846
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014847# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014849/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014850#include <readline/readline.h>
14851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014852if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014853 have_readline=yes
14854else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014855 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014856
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014857fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014858rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014859if test $have_readline = yes
14860then
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014862/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014863#include <readline/readline.h>
14864
14865_ACEOF
14866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014870
14871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014872rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014873
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014875/* end confdefs.h. */
14876#include <readline/readline.h>
14877
14878_ACEOF
14879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014881
Matthias Kloseb9621712010-04-24 17:59:49 +000014882$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014883
14884fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014885rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014886
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014887fi
14888
Martin v. Löwis0daad592001-09-30 21:09:59 +000014889# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14891$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014892if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014894else
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014896LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900/* Override any GCC internal prototype to avoid an error.
14901 Use char because int might match the return type of a GCC
14902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014903#ifdef __cplusplus
14904extern "C"
14905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014906char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014907int
14908main ()
14909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ;
14912 return 0;
14913}
14914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014917else
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014920rm -f core conftest.err conftest.$ac_objext \
14921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014922LIBS=$ac_check_lib_save_LIBS
14923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14925$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014926if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014929
Martin v. Löwis0daad592001-09-30 21:09:59 +000014930fi
14931
Michael W. Hudson54241132001-12-07 15:38:26 +000014932
Thomas Wouters89d996e2007-09-08 17:39:28 +000014933# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14935$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014938else
14939 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014940LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014942/* end confdefs.h. */
14943
14944/* Override any GCC internal prototype to avoid an error.
14945 Use char because int might match the return type of a GCC
14946 builtin and then its argument prototype would still apply. */
14947#ifdef __cplusplus
14948extern "C"
14949#endif
14950char rl_completion_display_matches_hook ();
14951int
14952main ()
14953{
14954return rl_completion_display_matches_hook ();
14955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014960 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014964rm -f core conftest.err conftest.$ac_objext \
14965 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014966LIBS=$ac_check_lib_save_LIBS
14967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14969$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014970if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014971
Matthias Kloseb9621712010-04-24 17:59:49 +000014972$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014973
14974fi
14975
14976
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014977# also in 4.0, but not in editline
14978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14979$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14980if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14981 $as_echo_n "(cached) " >&6
14982else
14983 ac_check_lib_save_LIBS=$LIBS
14984LIBS="-lreadline $READLINE_LIBS $LIBS"
14985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14986/* end confdefs.h. */
14987
14988/* Override any GCC internal prototype to avoid an error.
14989 Use char because int might match the return type of a GCC
14990 builtin and then its argument prototype would still apply. */
14991#ifdef __cplusplus
14992extern "C"
14993#endif
14994char rl_resize_terminal ();
14995int
14996main ()
14997{
14998return rl_resize_terminal ();
14999 ;
15000 return 0;
15001}
15002_ACEOF
15003if ac_fn_c_try_link "$LINENO"; then :
15004 ac_cv_lib_readline_rl_resize_terminal=yes
15005else
15006 ac_cv_lib_readline_rl_resize_terminal=no
15007fi
15008rm -f core conftest.err conftest.$ac_objext \
15009 conftest$ac_exeext conftest.$ac_ext
15010LIBS=$ac_check_lib_save_LIBS
15011fi
15012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15013$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15014if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15015
15016$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15017
15018fi
15019
15020
Martin v. Löwis0daad592001-09-30 21:09:59 +000015021# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15023$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015024if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015026else
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015028LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032/* Override any GCC internal prototype to avoid an error.
15033 Use char because int might match the return type of a GCC
15034 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015035#ifdef __cplusplus
15036extern "C"
15037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015038char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015039int
15040main ()
15041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015052rm -f core conftest.err conftest.$ac_objext \
15053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015054LIBS=$ac_check_lib_save_LIBS
15055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15057$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015058if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015061
Guido van Rossum353ae582001-07-10 16:45:32 +000015062fi
15063
Jack Jansendd19cf82001-12-06 22:36:17 +000015064
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015065# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015067/* end confdefs.h. */
15068#include <readline/readline.h>
15069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015071 have_readline=yes
15072else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015073 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015074
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015075fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015076rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015077if test $have_readline = yes
15078then
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015080/* end confdefs.h. */
15081#include <readline/readline.h>
15082
15083_ACEOF
15084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015086
Matthias Kloseb9621712010-04-24 17:59:49 +000015087$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015088
15089fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015090rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015091
15092fi
15093
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15095$as_echo_n "checking for append_history in -lreadline... " >&6; }
15096if ${ac_cv_lib_readline_append_history+:} false; then :
15097 $as_echo_n "(cached) " >&6
15098else
15099 ac_check_lib_save_LIBS=$LIBS
15100LIBS="-lreadline $READLINE_LIBS $LIBS"
15101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102/* end confdefs.h. */
15103
15104/* Override any GCC internal prototype to avoid an error.
15105 Use char because int might match the return type of a GCC
15106 builtin and then its argument prototype would still apply. */
15107#ifdef __cplusplus
15108extern "C"
15109#endif
15110char append_history ();
15111int
15112main ()
15113{
15114return append_history ();
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_link "$LINENO"; then :
15120 ac_cv_lib_readline_append_history=yes
15121else
15122 ac_cv_lib_readline_append_history=no
15123fi
15124rm -f core conftest.err conftest.$ac_objext \
15125 conftest$ac_exeext conftest.$ac_ext
15126LIBS=$ac_check_lib_save_LIBS
15127fi
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15129$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15130if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15131
15132$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15133
15134fi
15135
15136
Martin v. Löwis82bca632006-02-10 20:49:30 +000015137# End of readline checks: restore LIBS
15138LIBS=$LIBS_no_readline
15139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15141$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015142if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015144else
Martin v. Löwis11437992002-04-12 09:54:03 +000015145
Matthias Kloseb9621712010-04-24 17:59:49 +000015146if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015147 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015148else
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015150/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015151
15152int main()
15153{
15154 int val1 = nice(1);
15155 if (val1 != -1 && val1 == nice(2))
15156 exit(0);
15157 exit(1);
15158}
15159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015161if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015162 ac_cv_broken_nice=yes
15163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015168fi
15169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170fi
15171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15173$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015174if test "$ac_cv_broken_nice" = yes
15175then
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Matthias Kloseb9621712010-04-24 17:59:49 +000015177$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015178
15179fi
15180
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15182$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015183if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015185else
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015187 ac_cv_broken_poll=no
15188else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015190/* end confdefs.h. */
15191
15192#include <poll.h>
15193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015194int main()
15195{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015196 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015197 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015198
15199 close (42);
15200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015201 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015202 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015203 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015204 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015205 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015206 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015207 return 1;
15208}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015209
15210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015211if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015212 ac_cv_broken_poll=yes
15213else
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015220fi
15221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15223$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015224if test "$ac_cv_broken_poll" = yes
15225then
15226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015228
15229fi
15230
Brett Cannon43802422005-02-10 20:48:03 +000015231# 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 +000015232# (which is not required by ISO C or UNIX spec) and/or if we support
15233# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015234ac_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 +000015235#include <$ac_cv_struct_tm>
15236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237"
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015239
15240cat >>confdefs.h <<_ACEOF
15241#define HAVE_STRUCT_TM_TM_ZONE 1
15242_ACEOF
15243
15244
15245fi
15246
15247if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015250
15251else
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15253"
Victor Stinnere0be4232011-10-25 13:06:09 +020015254if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256else
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258fi
15259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015261#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015262_ACEOF
15263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15265$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015270/* end confdefs.h. */
15271#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272#if !HAVE_DECL_TZNAME
15273extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015274#endif
15275
15276int
15277main ()
15278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015280 ;
15281 return 0;
15282}
15283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015285 ac_cv_var_tzname=yes
15286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015289rm -f core conftest.err conftest.$ac_objext \
15290 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15293$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015294 if test $ac_cv_var_tzname = yes; then
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015297
15298 fi
15299fi
15300
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015301
Martin v. Löwis1d459062005-03-14 21:23:33 +000015302# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15304$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015307else
15308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015310 ac_cv_working_tzset=no
15311else
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015313/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015314
15315#include <stdlib.h>
15316#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015317#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015318
15319#if HAVE_TZNAME
15320extern char *tzname[];
15321#endif
15322
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015323int main()
15324{
Brett Cannon18367812003-09-19 00:59:16 +000015325 /* Note that we need to ensure that not only does tzset(3)
15326 do 'something' with localtime, but it works as documented
15327 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015328 This includes making sure that tzname is set properly if
15329 tm->tm_zone does not exist since it is the alternative way
15330 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015331
15332 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015333 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015334 */
15335
Martin v. Löwis1d459062005-03-14 21:23:33 +000015336 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015337 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15338
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015339 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015340 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015341 if (localtime(&groundhogday)->tm_hour != 0)
15342 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015343#if HAVE_TZNAME
15344 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15345 if (strcmp(tzname[0], "UTC") ||
15346 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15347 exit(1);
15348#endif
Brett Cannon18367812003-09-19 00:59:16 +000015349
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015350 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015351 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015352 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015354#if HAVE_TZNAME
15355 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15356 exit(1);
15357#endif
Brett Cannon18367812003-09-19 00:59:16 +000015358
15359 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15360 tzset();
15361 if (localtime(&groundhogday)->tm_hour != 11)
15362 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015363#if HAVE_TZNAME
15364 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15365 exit(1);
15366#endif
15367
15368#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015369 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15370 exit(1);
15371 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15372 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015373#endif
Brett Cannon18367812003-09-19 00:59:16 +000015374
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015375 exit(0);
15376}
15377
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015380 ac_cv_working_tzset=yes
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015386fi
15387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388fi
15389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15391$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015392if test "$ac_cv_working_tzset" = yes
15393then
15394
Matthias Kloseb9621712010-04-24 17:59:49 +000015395$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015396
15397fi
15398
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015399# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15401$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015402if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015404else
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015406/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015407#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015408int
15409main ()
15410{
15411
15412struct stat st;
15413st.st_mtim.tv_nsec = 1;
15414
15415 ;
15416 return 0;
15417}
15418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015420 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015421else
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15425fi
15426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15428$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015429if test "$ac_cv_stat_tv_nsec" = yes
15430then
15431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015433
15434fi
15435
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015436# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15438$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015439if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015443/* end confdefs.h. */
15444#include <sys/stat.h>
15445int
15446main ()
15447{
15448
15449struct stat st;
15450st.st_mtimespec.tv_nsec = 1;
15451
15452 ;
15453 return 0;
15454}
15455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015457 ac_cv_stat_tv_nsec2=yes
15458else
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15462fi
15463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15465$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015466if test "$ac_cv_stat_tv_nsec2" = yes
15467then
15468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015470
15471fi
15472
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015473# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015474ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015475if test "$cross_compiling" = no; then
15476 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15477fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015478
15479for ac_header in curses.h ncurses.h
15480do :
15481 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15482ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15483if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15484 cat >>confdefs.h <<_ACEOF
15485#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15486_ACEOF
15487
15488fi
15489
15490done
15491
15492
15493# On Solaris, term.h requires curses.h
15494for ac_header in term.h
15495do :
15496 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15497#ifdef HAVE_CURSES_H
15498#include <curses.h>
15499#endif
15500
15501"
15502if test "x$ac_cv_header_term_h" = xyes; then :
15503 cat >>confdefs.h <<_ACEOF
15504#define HAVE_TERM_H 1
15505_ACEOF
15506
15507fi
15508
15509done
15510
15511
Jack Jansen666b1e72001-10-31 12:11:48 +000015512# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15514$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015515if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015519/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015520#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015521int
15522main ()
15523{
Jack Jansen666b1e72001-10-31 12:11:48 +000015524
15525 int rtn;
15526 rtn = mvwdelch(0,0,0);
15527
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ;
15529 return 0;
15530}
15531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015532if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015533 ac_cv_mvwdelch_is_expression=yes
15534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15538fi
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15541$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015542
15543if test "$ac_cv_mvwdelch_is_expression" = yes
15544then
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015547
15548fi
15549
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015550# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15551# structs since version 5.7. If the macro is defined as zero before including
15552# [n]curses.h, ncurses will expose fields of the structs regardless of the
15553# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15555$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015556if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015560/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015561
15562 #define NCURSES_OPAQUE 0
15563 #include <curses.h>
15564
Martin v. Löwis11437992002-04-12 09:54:03 +000015565int
15566main ()
15567{
Jack Jansen666b1e72001-10-31 12:11:48 +000015568
15569 WINDOW *w;
15570 w->_flags = 0;
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 ;
15573 return 0;
15574}
15575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015576if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015577 ac_cv_window_has_flags=yes
15578else
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15582fi
15583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15585$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015586
Jack Jansen666b1e72001-10-31 12:11:48 +000015587
15588if test "$ac_cv_window_has_flags" = yes
15589then
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015592
15593fi
15594
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15596$as_echo_n "checking for is_pad... " >&6; }
15597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15598/* end confdefs.h. */
15599#include <curses.h>
15600int
15601main ()
15602{
15603
15604#ifndef is_pad
15605void *x=is_pad
15606#endif
15607
15608 ;
15609 return 0;
15610}
15611_ACEOF
15612if ac_fn_c_try_compile "$LINENO"; then :
15613
15614$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15615
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15617$as_echo "yes" >&6; }
15618else
15619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15620$as_echo "no" >&6; }
15621
15622fi
15623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15624
Matthias Kloseb9621712010-04-24 17:59:49 +000015625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15626$as_echo_n "checking for is_term_resized... " >&6; }
15627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015628/* end confdefs.h. */
15629#include <curses.h>
15630int
15631main ()
15632{
15633void *x=is_term_resized
15634 ;
15635 return 0;
15636}
15637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015641
Matthias Kloseb159a552010-04-25 21:00:44 +000015642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15646$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015647
15648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15650
Matthias Kloseb9621712010-04-24 17:59:49 +000015651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15652$as_echo_n "checking for resize_term... " >&6; }
15653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015654/* end confdefs.h. */
15655#include <curses.h>
15656int
15657main ()
15658{
15659void *x=resize_term
15660 ;
15661 return 0;
15662}
15663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015667
Matthias Kloseb159a552010-04-25 21:00:44 +000015668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015669$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15672$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015673
15674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15678$as_echo_n "checking for resizeterm... " >&6; }
15679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015680/* end confdefs.h. */
15681#include <curses.h>
15682int
15683main ()
15684{
15685void *x=resizeterm
15686 ;
15687 return 0;
15688}
15689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015690if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015693
Matthias Kloseb159a552010-04-25 21:00:44 +000015694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015695$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15698$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015699
15700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015702
15703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15704$as_echo_n "checking for immedok... " >&6; }
15705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15706/* end confdefs.h. */
15707#include <curses.h>
15708int
15709main ()
15710{
15711
15712#ifndef immedok
15713void *x=immedok
15714#endif
15715
15716 ;
15717 return 0;
15718}
15719_ACEOF
15720if ac_fn_c_try_compile "$LINENO"; then :
15721
15722$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15723
15724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15725$as_echo "yes" >&6; }
15726else
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15728$as_echo "no" >&6; }
15729
15730fi
15731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15732
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15734$as_echo_n "checking for syncok... " >&6; }
15735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15736/* end confdefs.h. */
15737#include <curses.h>
15738int
15739main ()
15740{
15741
15742#ifndef syncok
15743void *x=syncok
15744#endif
15745
15746 ;
15747 return 0;
15748}
15749_ACEOF
15750if ac_fn_c_try_compile "$LINENO"; then :
15751
15752$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15753
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15755$as_echo "yes" >&6; }
15756else
15757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759
15760fi
15761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15762
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15764$as_echo_n "checking for wchgat... " >&6; }
15765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15766/* end confdefs.h. */
15767#include <curses.h>
15768int
15769main ()
15770{
15771
15772#ifndef wchgat
15773void *x=wchgat
15774#endif
15775
15776 ;
15777 return 0;
15778}
15779_ACEOF
15780if ac_fn_c_try_compile "$LINENO"; then :
15781
15782$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15783
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15785$as_echo "yes" >&6; }
15786else
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15788$as_echo "no" >&6; }
15789
15790fi
15791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15792
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15794$as_echo_n "checking for filter... " >&6; }
15795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15796/* end confdefs.h. */
15797#include <curses.h>
15798int
15799main ()
15800{
15801
15802#ifndef filter
15803void *x=filter
15804#endif
15805
15806 ;
15807 return 0;
15808}
15809_ACEOF
15810if ac_fn_c_try_compile "$LINENO"; then :
15811
15812$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15813
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15815$as_echo "yes" >&6; }
15816else
15817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15818$as_echo "no" >&6; }
15819
15820fi
15821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15822
15823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15824$as_echo_n "checking for has_key... " >&6; }
15825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15826/* end confdefs.h. */
15827#include <curses.h>
15828int
15829main ()
15830{
15831
15832#ifndef has_key
15833void *x=has_key
15834#endif
15835
15836 ;
15837 return 0;
15838}
15839_ACEOF
15840if ac_fn_c_try_compile "$LINENO"; then :
15841
15842$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15843
15844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15845$as_echo "yes" >&6; }
15846else
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15848$as_echo "no" >&6; }
15849
15850fi
15851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852
15853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15854$as_echo_n "checking for typeahead... " >&6; }
15855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15856/* end confdefs.h. */
15857#include <curses.h>
15858int
15859main ()
15860{
15861
15862#ifndef typeahead
15863void *x=typeahead
15864#endif
15865
15866 ;
15867 return 0;
15868}
15869_ACEOF
15870if ac_fn_c_try_compile "$LINENO"; then :
15871
15872$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15873
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15875$as_echo "yes" >&6; }
15876else
15877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15878$as_echo "no" >&6; }
15879
15880fi
15881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15882
15883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15884$as_echo_n "checking for use_env... " >&6; }
15885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15886/* end confdefs.h. */
15887#include <curses.h>
15888int
15889main ()
15890{
15891
15892#ifndef use_env
15893void *x=use_env
15894#endif
15895
15896 ;
15897 return 0;
15898}
15899_ACEOF
15900if ac_fn_c_try_compile "$LINENO"; then :
15901
15902$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15903
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15905$as_echo "yes" >&6; }
15906else
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15908$as_echo "no" >&6; }
15909
15910fi
15911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015912# last curses configure check
15913CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15916$as_echo "$as_me: checking for device files" >&6;}
15917
15918if test "x$cross_compiling" = xyes; then
15919 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15921$as_echo_n "checking for /dev/ptmx... " >&6; }
15922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15923$as_echo "not set" >&6; }
15924 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15925 fi
15926 if test "${ac_cv_file__dev_ptc+set}" != set; then
15927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15928$as_echo_n "checking for /dev/ptc... " >&6; }
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15930$as_echo "not set" >&6; }
15931 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15932 fi
15933fi
15934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15936$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015937if ${ac_cv_file__dev_ptmx+:} false; then :
15938 $as_echo_n "(cached) " >&6
15939else
15940 test "$cross_compiling" = yes &&
15941 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15942if test -r "/dev/ptmx"; then
15943 ac_cv_file__dev_ptmx=yes
15944else
15945 ac_cv_file__dev_ptmx=no
15946fi
15947fi
15948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15949$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15950if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015951
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015952fi
15953
15954if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015957
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15960$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015961if ${ac_cv_file__dev_ptc+:} false; then :
15962 $as_echo_n "(cached) " >&6
15963else
15964 test "$cross_compiling" = yes &&
15965 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15966if test -r "/dev/ptc"; then
15967 ac_cv_file__dev_ptc=yes
15968else
15969 ac_cv_file__dev_ptc=no
15970fi
15971fi
15972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15973$as_echo "$ac_cv_file__dev_ptc" >&6; }
15974if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015975
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015976fi
15977
15978if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015979
Matthias Kloseb9621712010-04-24 17:59:49 +000015980$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015981
Neal Norwitz865400f2003-03-21 01:42:58 +000015982fi
15983
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015984if test $ac_sys_system = Darwin
15985then
15986 LIBS="$LIBS -framework CoreFoundation"
15987fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15990$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015991if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015993else
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015995 ac_cv_have_size_t_format="cross -- assuming yes"
15996
Thomas Wouters477c8d52006-05-27 19:21:47 +000015997else
Matthias Kloseb9621712010-04-24 17:59:49 +000015998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015999/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016000
Thomas Wouters477c8d52006-05-27 19:21:47 +000016001#include <stdio.h>
16002#include <stddef.h>
16003#include <string.h>
16004
Christian Heimes2c181612007-12-17 20:04:13 +000016005#ifdef HAVE_SYS_TYPES_H
16006#include <sys/types.h>
16007#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016008
16009#ifdef HAVE_SSIZE_T
16010typedef ssize_t Py_ssize_t;
16011#elif SIZEOF_VOID_P == SIZEOF_LONG
16012typedef long Py_ssize_t;
16013#else
16014typedef int Py_ssize_t;
16015#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016016
Christian Heimes2c181612007-12-17 20:04:13 +000016017int main()
16018{
16019 char buffer[256];
16020
Thomas Wouters477c8d52006-05-27 19:21:47 +000016021 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16022 return 1;
16023
Thomas Wouters89f507f2006-12-13 04:49:30 +000016024 if (strcmp(buffer, "123"))
16025 return 1;
16026
16027 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16028 return 1;
16029
16030 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016031 return 1;
16032
16033 return 0;
16034}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016035
Thomas Wouters477c8d52006-05-27 19:21:47 +000016036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016037if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016038 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016044fi
16045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16048$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016049if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016052
16053fi
16054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016056#ifdef HAVE_SYS_TYPES_H
16057#include <sys/types.h>
16058#endif
16059#ifdef HAVE_SYS_SOCKET_H
16060#include <sys/socket.h>
16061#endif
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063"
Victor Stinnere0be4232011-10-25 13:06:09 +020016064if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016065
Martin v. Löwis11437992002-04-12 09:54:03 +000016066else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016069
16070fi
16071
Michael W. Hudson54241132001-12-07 15:38:26 +000016072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16074$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016075if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016076 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016077else
Matthias Kloseb9621712010-04-24 17:59:49 +000016078 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016079 ac_cv_broken_mbstowcs=no
16080else
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016082/* end confdefs.h. */
16083
Stefan Krah19c21392012-11-22 23:47:32 +010016084#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016085#include<stdlib.h>
16086int main() {
16087 size_t len = -1;
16088 const char *str = "text";
16089 len = mbstowcs(NULL, str, 0);
16090 return (len != 4);
16091}
16092
16093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016094if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016095 ac_cv_broken_mbstowcs=no
16096else
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016101fi
16102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016103fi
16104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16106$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016107if test "$ac_cv_broken_mbstowcs" = yes
16108then
16109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016111
16112fi
16113
Antoine Pitroub52ec782009-01-25 16:34:23 +000016114# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16116$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016117
16118# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016119if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016120 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016121if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016122then
16123
Matthias Kloseb9621712010-04-24 17:59:49 +000016124$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016125
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16127$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016128fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016129if test "$withval" = no
16130then
16131
16132$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16135$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016136fi
16137
Antoine Pitrou042b1282010-08-13 21:15:58 +000016138else
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16140$as_echo "no value specified" >&6; }
16141fi
16142
Antoine Pitroub52ec782009-01-25 16:34:23 +000016143
Matthias Kloseb17289e2012-03-15 19:51:34 +010016144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16145$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16146if ${ac_cv_computed_gotos+:} false; then :
16147 $as_echo_n "(cached) " >&6
16148else
16149 if test "$cross_compiling" = yes; then :
16150 if test "${with_computed_gotos+set}" = set; then
16151 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16152 else
16153 ac_cv_computed_gotos=no
16154 fi
16155else
16156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16157/* end confdefs.h. */
16158
16159int main(int argc, char **argv)
16160{
16161 static void *targets[1] = { &&LABEL1 };
16162 goto LABEL2;
16163LABEL1:
16164 return 0;
16165LABEL2:
16166 goto *targets[0];
16167 return 1;
16168}
16169
16170_ACEOF
16171if ac_fn_c_try_run "$LINENO"; then :
16172 ac_cv_computed_gotos=yes
16173else
16174 ac_cv_computed_gotos=no
16175fi
16176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16177 conftest.$ac_objext conftest.beam conftest.$ac_ext
16178fi
16179
16180fi
16181
16182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16183$as_echo "$ac_cv_computed_gotos" >&6; }
16184case "$ac_cv_computed_gotos" in yes*)
16185
16186$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16187
16188esac
16189
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016190case $ac_sys_system in
16191AIX*)
16192
16193$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16194 ;;
16195esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016196
Michael W. Hudson54241132001-12-07 15:38:26 +000016197
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016198
16199
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016200for h in `(cd $srcdir;echo Python/thread_*.h)`
16201do
16202 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16203done
16204
Michael W. Hudson54241132001-12-07 15:38:26 +000016205
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016206SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16208$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016209for dir in $SRCDIRS; do
16210 if test ! -d $dir; then
16211 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016212 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016213done
Matthias Kloseb9621712010-04-24 17:59:49 +000016214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16215$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016216
Stefan Krah1919b7e2012-03-21 18:25:23 +010016217# Availability of -O2:
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16219$as_echo_n "checking for -O2... " >&6; }
16220saved_cflags="$CFLAGS"
16221CFLAGS="-O2"
16222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16223/* end confdefs.h. */
16224
16225int
16226main ()
16227{
16228
16229
16230 ;
16231 return 0;
16232}
16233_ACEOF
16234if ac_fn_c_try_compile "$LINENO"; then :
16235 have_O2=yes
16236else
16237 have_O2=no
16238fi
16239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16241$as_echo "$have_O2" >&6; }
16242CFLAGS="$saved_cflags"
16243
16244# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16245# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16247$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16248saved_cflags="$CFLAGS"
16249CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16250if test "$have_O2" = no; then
16251 CFLAGS=""
16252fi
16253if test "$cross_compiling" = yes; then :
16254 have_glibc_memmove_bug=undefined
16255else
16256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257/* end confdefs.h. */
16258
16259#include <stdio.h>
16260#include <stdlib.h>
16261#include <string.h>
16262void foo(void *p, void *q) { memmove(p, q, 19); }
16263int main() {
16264 char a[32] = "123456789000000000";
16265 foo(&a[9], a);
16266 if (strcmp(a, "123456789123456789000000000") != 0)
16267 return 1;
16268 foo(a, &a[9]);
16269 if (strcmp(a, "123456789000000000") != 0)
16270 return 1;
16271 return 0;
16272}
16273
16274_ACEOF
16275if ac_fn_c_try_run "$LINENO"; then :
16276 have_glibc_memmove_bug=no
16277else
16278 have_glibc_memmove_bug=yes
16279fi
16280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16281 conftest.$ac_objext conftest.beam conftest.$ac_ext
16282fi
16283
16284CFLAGS="$saved_cflags"
16285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16286$as_echo "$have_glibc_memmove_bug" >&6; }
16287if test "$have_glibc_memmove_bug" = yes; then
16288
16289$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16290
16291fi
16292
16293if test "$have_gcc_asm_for_x87" = yes; then
16294 # Some versions of gcc miscompile inline asm:
16295 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16296 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16297 case $CC in
16298 *gcc*)
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16300$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16301 saved_cflags="$CFLAGS"
16302 CFLAGS="-O2"
16303 if test "$cross_compiling" = yes; then :
16304 have_ipa_pure_const_bug=undefined
16305else
16306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16307/* end confdefs.h. */
16308
16309 __attribute__((noinline)) int
16310 foo(int *p) {
16311 int r;
16312 asm ( "movl \$6, (%1)\n\t"
16313 "xorl %0, %0\n\t"
16314 : "=r" (r) : "r" (p) : "memory"
16315 );
16316 return r;
16317 }
16318 int main() {
16319 int p = 8;
16320 if ((foo(&p) ? : p) != 6)
16321 return 1;
16322 return 0;
16323 }
16324
16325_ACEOF
16326if ac_fn_c_try_run "$LINENO"; then :
16327 have_ipa_pure_const_bug=no
16328else
16329 have_ipa_pure_const_bug=yes
16330fi
16331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16332 conftest.$ac_objext conftest.beam conftest.$ac_ext
16333fi
16334
16335 CFLAGS="$saved_cflags"
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16337$as_echo "$have_ipa_pure_const_bug" >&6; }
16338 if test "$have_ipa_pure_const_bug" = yes; then
16339
16340$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16341
16342 fi
16343 ;;
16344 esac
16345fi
16346
Victor Stinner4f5366e2015-01-09 02:13:19 +010016347# Check for stdatomic.h
16348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16349$as_echo_n "checking for stdatomic.h... " >&6; }
16350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351/* end confdefs.h. */
16352
16353
16354 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016355 atomic_int value = ATOMIC_VAR_INIT(1);
16356 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016357 int main() {
16358 int loaded_value = atomic_load(&value);
16359 return 0;
16360 }
16361
16362
16363_ACEOF
16364if ac_fn_c_try_link "$LINENO"; then :
16365 have_stdatomic_h=yes
16366else
16367 have_stdatomic_h=no
16368fi
16369rm -f core conftest.err conftest.$ac_objext \
16370 conftest$ac_exeext conftest.$ac_ext
16371
16372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16373$as_echo "$have_stdatomic_h" >&6; }
16374
16375if test "$have_stdatomic_h" = yes; then
16376
16377$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16378
16379fi
16380
16381# Check for GCC >= 4.7 __atomic builtins
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16383$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385/* end confdefs.h. */
16386
16387
16388 volatile int val = 1;
16389 int main() {
16390 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16391 return 0;
16392 }
16393
16394
16395_ACEOF
16396if ac_fn_c_try_link "$LINENO"; then :
16397 have_builtin_atomic=yes
16398else
16399 have_builtin_atomic=no
16400fi
16401rm -f core conftest.err conftest.$ac_objext \
16402 conftest$ac_exeext conftest.$ac_ext
16403
16404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16405$as_echo "$have_builtin_atomic" >&6; }
16406
16407if test "$have_builtin_atomic" = yes; then
16408
16409$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16410
16411fi
16412
Ned Deily322f5ba2013-11-21 23:01:59 -080016413# ensurepip option
16414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16415$as_echo_n "checking for ensurepip... " >&6; }
16416
16417# Check whether --with-ensurepip was given.
16418if test "${with_ensurepip+set}" = set; then :
16419 withval=$with_ensurepip;
16420else
16421 with_ensurepip=upgrade
16422fi
16423
16424case $with_ensurepip in #(
16425 yes|upgrade) :
16426 ENSUREPIP=upgrade ;; #(
16427 install) :
16428 ENSUREPIP=install ;; #(
16429 no) :
16430 ENSUREPIP=no ;; #(
16431 *) :
16432 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16433esac
16434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16435$as_echo "$ENSUREPIP" >&6; }
16436
16437
Victor Stinner35a97c02015-03-08 02:59:09 +010016438# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16440$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16442/* end confdefs.h. */
16443
16444
16445 #include <dirent.h>
16446
16447 int main() {
16448 struct dirent entry;
16449 return entry.d_type == DT_UNKNOWN;
16450 }
16451
16452
16453_ACEOF
16454if ac_fn_c_try_link "$LINENO"; then :
16455 have_dirent_d_type=yes
16456else
16457 have_dirent_d_type=no
16458fi
16459rm -f core conftest.err conftest.$ac_objext \
16460 conftest$ac_exeext conftest.$ac_ext
16461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16462$as_echo "$have_dirent_d_type" >&6; }
16463
16464if test "$have_dirent_d_type" = yes; then
16465
16466$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16467
16468fi
16469
Victor Stinner9eb57c52015-03-19 22:21:49 +010016470# check if the Linux getrandom() syscall is available
16471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16472$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474/* end confdefs.h. */
16475
16476
Victor Stinner1b80b242016-04-12 22:34:58 +020016477 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016478 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016479 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016480
16481 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016482 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016483 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016484 const int flags = GRND_NONBLOCK;
16485 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016486 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016487 return 0;
16488 }
16489
16490
16491_ACEOF
16492if ac_fn_c_try_link "$LINENO"; then :
16493 have_getrandom_syscall=yes
16494else
16495 have_getrandom_syscall=no
16496fi
16497rm -f core conftest.err conftest.$ac_objext \
16498 conftest$ac_exeext conftest.$ac_ext
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16500$as_echo "$have_getrandom_syscall" >&6; }
16501
16502if test "$have_getrandom_syscall" = yes; then
16503
16504$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16505
16506fi
16507
Victor Stinner3abf44e2015-09-18 15:38:37 +020016508# check if the getrandom() function is available
16509# the test was written for the Solaris function of <sys/random.h>
16510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16511$as_echo_n "checking for the getrandom() function... " >&6; }
16512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513/* end confdefs.h. */
16514
16515
16516 #include <sys/random.h>
16517
16518 int main() {
16519 char buffer[1];
16520 const size_t buflen = sizeof(buffer);
16521 const int flags = 0;
16522 /* ignore the result, Python checks for ENOSYS at runtime */
16523 (void)getrandom(buffer, buflen, flags);
16524 return 0;
16525 }
16526
16527
16528_ACEOF
16529if ac_fn_c_try_link "$LINENO"; then :
16530 have_getrandom=yes
16531else
16532 have_getrandom=no
16533fi
16534rm -f core conftest.err conftest.$ac_objext \
16535 conftest$ac_exeext conftest.$ac_ext
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16537$as_echo "$have_getrandom" >&6; }
16538
16539if test "$have_getrandom" = yes; then
16540
16541$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16542
16543fi
16544
Christian Heimesff5be6e2018-01-20 13:19:21 +010016545# Check for usable OpenSSL
16546
16547 found=false
16548
16549# Check whether --with-openssl was given.
16550if test "${with_openssl+set}" = set; then :
16551 withval=$with_openssl;
16552 case "$withval" in
16553 "" | y | ye | yes | n | no)
16554 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16555 ;;
16556 *) ssldirs="$withval"
16557 ;;
16558 esac
16559
16560else
16561
16562 # if pkg-config is installed and openssl has installed a .pc file,
16563 # then use that information and don't search ssldirs
16564 if test -n "$ac_tool_prefix"; then
16565 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16566set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16568$as_echo_n "checking for $ac_word... " >&6; }
16569if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16570 $as_echo_n "(cached) " >&6
16571else
16572 if test -n "$PKG_CONFIG"; then
16573 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16574else
16575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16576for as_dir in $PATH
16577do
16578 IFS=$as_save_IFS
16579 test -z "$as_dir" && as_dir=.
16580 for ac_exec_ext in '' $ac_executable_extensions; do
16581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16582 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16584 break 2
16585 fi
16586done
16587 done
16588IFS=$as_save_IFS
16589
16590fi
16591fi
16592PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16593if test -n "$PKG_CONFIG"; then
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16595$as_echo "$PKG_CONFIG" >&6; }
16596else
16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16598$as_echo "no" >&6; }
16599fi
16600
16601
16602fi
16603if test -z "$ac_cv_prog_PKG_CONFIG"; then
16604 ac_ct_PKG_CONFIG=$PKG_CONFIG
16605 # Extract the first word of "pkg-config", so it can be a program name with args.
16606set dummy pkg-config; ac_word=$2
16607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16608$as_echo_n "checking for $ac_word... " >&6; }
16609if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16610 $as_echo_n "(cached) " >&6
16611else
16612 if test -n "$ac_ct_PKG_CONFIG"; then
16613 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16614else
16615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16616for as_dir in $PATH
16617do
16618 IFS=$as_save_IFS
16619 test -z "$as_dir" && as_dir=.
16620 for ac_exec_ext in '' $ac_executable_extensions; do
16621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16622 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16623 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16624 break 2
16625 fi
16626done
16627 done
16628IFS=$as_save_IFS
16629
16630fi
16631fi
16632ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16633if test -n "$ac_ct_PKG_CONFIG"; then
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16635$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16636else
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16638$as_echo "no" >&6; }
16639fi
16640
16641 if test "x$ac_ct_PKG_CONFIG" = x; then
16642 PKG_CONFIG=""
16643 else
16644 case $cross_compiling:$ac_tool_warned in
16645yes:)
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16647$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16648ac_tool_warned=yes ;;
16649esac
16650 PKG_CONFIG=$ac_ct_PKG_CONFIG
16651 fi
16652else
16653 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16654fi
16655
16656 if test x"$PKG_CONFIG" != x""; then
16657 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16658 if test $? = 0; then
16659 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16660 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16661 found=true
16662 fi
16663 fi
16664
16665 # no such luck; use some default ssldirs
16666 if ! $found; then
16667 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16668 fi
16669
16670
16671fi
16672
16673
16674
16675 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16676 # an 'openssl' subdirectory
16677
16678 if ! $found; then
16679 OPENSSL_INCLUDES=
16680 for ssldir in $ssldirs; do
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16682$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16683 if test -f "$ssldir/include/openssl/ssl.h"; then
16684 OPENSSL_INCLUDES="-I$ssldir/include"
16685 OPENSSL_LDFLAGS="-L$ssldir/lib"
16686 OPENSSL_LIBS="-lssl -lcrypto"
16687 found=true
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16689$as_echo "yes" >&6; }
16690 break
16691 else
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16693$as_echo "no" >&6; }
16694 fi
16695 done
16696
16697 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16698 # it will just work!
16699 fi
16700
16701 # try the preprocessor and linker with our new flags,
16702 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16703
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16705$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16706 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16707 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16708
16709 save_LIBS="$LIBS"
16710 save_LDFLAGS="$LDFLAGS"
16711 save_CPPFLAGS="$CPPFLAGS"
16712 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16713 LIBS="$OPENSSL_LIBS $LIBS"
16714 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16716/* end confdefs.h. */
16717#include <openssl/ssl.h>
16718int
16719main ()
16720{
16721SSL_new(NULL)
16722 ;
16723 return 0;
16724}
16725_ACEOF
16726if ac_fn_c_try_link "$LINENO"; then :
16727
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16729$as_echo "yes" >&6; }
16730 have_openssl=yes
16731
16732else
16733
16734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16735$as_echo "no" >&6; }
16736 have_openssl=no
16737
16738fi
16739rm -f core conftest.err conftest.$ac_objext \
16740 conftest$ac_exeext conftest.$ac_ext
16741 CPPFLAGS="$save_CPPFLAGS"
16742 LDFLAGS="$save_LDFLAGS"
16743 LIBS="$save_LIBS"
16744
16745
16746
16747
16748
16749
16750if test "$have_openssl" = yes; then
16751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16752$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16753
16754 save_LIBS="$LIBS"
16755 save_LDFLAGS="$LDFLAGS"
16756 save_CPPFLAGS="$CPPFLAGS"
16757 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16758 LIBS="$OPENSSL_LIBS $LIBS"
16759 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16760
16761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16762/* end confdefs.h. */
16763
16764 #include <openssl/x509_vfy.h>
16765
16766int
16767main ()
16768{
16769
16770 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16771 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16772 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16773 X509_VERIFY_PARAM_set_hostflags(p, 0);
16774
16775 ;
16776 return 0;
16777}
16778
16779_ACEOF
16780if ac_fn_c_try_link "$LINENO"; then :
16781
16782 ac_cv_has_x509_verify_param_set1_host=yes
16783
16784else
16785
16786 ac_cv_has_x509_verify_param_set1_host=no
16787
16788fi
16789rm -f core conftest.err conftest.$ac_objext \
16790 conftest$ac_exeext conftest.$ac_ext
16791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16792$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16793 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16794
16795$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16796
16797 fi
16798
16799 CPPFLAGS="$save_CPPFLAGS"
16800 LDFLAGS="$save_LDFLAGS"
16801 LIBS="$save_LIBS"
16802fi
16803
Christian Heimes892d66e2018-01-29 14:10:18 +010016804# ssl module default cipher suite string
16805
16806
16807
16808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16809$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16810
16811# Check whether --with-ssl-default-suites was given.
16812if test "${with_ssl_default_suites+set}" = set; then :
16813 withval=$with_ssl_default_suites;
16814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16815$as_echo "$withval" >&6; }
16816case "$withval" in
16817 python)
16818 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16819
16820 ;;
16821 openssl)
16822 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16823
16824 ;;
16825 *)
16826 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16827
16828 cat >>confdefs.h <<_ACEOF
16829#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16830_ACEOF
16831
16832 ;;
16833esac
16834
16835else
16836
16837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16838$as_echo "python" >&6; }
16839$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16840
16841
16842fi
16843
16844
16845
Guido van Rossum627b2d71993-12-24 10:39:16 +000016846# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016847ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016848
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016849ac_config_files="$ac_config_files Modules/ld_so_aix"
16850
Martin v. Löwis11437992002-04-12 09:54:03 +000016851cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016852# This file is a shell script that caches the results of configure
16853# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016854# scripts and configure runs, see configure's option --config-cache.
16855# It is not useful on other systems. If it contains results you don't
16856# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016857#
Martin v. Löwis11437992002-04-12 09:54:03 +000016858# config.status only pays attention to the cache file if you give it
16859# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016860#
Skip Montanaro6dead952003-09-25 14:50:04 +000016861# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016862# loading this file, other *unset* `ac_cv_foo' will be assigned the
16863# following values.
16864
16865_ACEOF
16866
Guido van Rossumf78abae1997-01-21 22:02:36 +000016867# The following way of writing the cache mishandles newlines in values,
16868# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016870# Ultrix sh set writes to stderr and can't be redirected directly,
16871# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872(
16873 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16874 eval ac_val=\$$ac_var
16875 case $ac_val in #(
16876 *${as_nl}*)
16877 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16879$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880 esac
16881 case $ac_var in #(
16882 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016883 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16884 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 esac ;;
16886 esac
16887 done
16888
Martin v. Löwis11437992002-04-12 09:54:03 +000016889 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16891 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016892 # `set' does not quote correctly, so add quotes: double-quote
16893 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 "s/'/'\\\\''/g;
16896 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 *)
16899 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 esac |
16903 sort
16904) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16910 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16912 :end' >>confcache
16913if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16914 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016915 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016916 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16917$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016918 if test ! -f "$cache_file" || test -h "$cache_file"; then
16919 cat confcache >"$cache_file"
16920 else
16921 case $cache_file in #(
16922 */* | ?:*)
16923 mv -f confcache "$cache_file"$$ &&
16924 mv -f "$cache_file"$$ "$cache_file" ;; #(
16925 *)
16926 mv -f confcache "$cache_file" ;;
16927 esac
16928 fi
16929 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016930 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16932$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016933 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016934fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016935rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016936
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016937test "x$prefix" = xNONE && prefix=$ac_default_prefix
16938# Let make expand exec_prefix.
16939test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016941DEFS=-DHAVE_CONFIG_H
16942
Skip Montanaro6dead952003-09-25 14:50:04 +000016943ac_libobjs=
16944ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016945U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016946for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16947 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16951 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16953 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016954done
16955LIBOBJS=$ac_libobjs
16956
16957LTLIBOBJS=$ac_ltlibobjs
16958
16959
Martin v. Löwis11437992002-04-12 09:54:03 +000016960
Matthias Kloseb9621712010-04-24 17:59:49 +000016961
Victor Stinnere0be4232011-10-25 13:06:09 +020016962: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016963ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016964ac_clean_files_save=$ac_clean_files
16965ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016966{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16967$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16968as_write_fail=0
16969cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016970#! $SHELL
16971# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016972# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016973# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016974# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016977ac_cs_recheck=false
16978ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016979
Matthias Kloseb9621712010-04-24 17:59:49 +000016980SHELL=\${CONFIG_SHELL-$SHELL}
16981export SHELL
16982_ASEOF
16983cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16984## -------------------- ##
16985## M4sh Initialization. ##
16986## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988# Be more Bourne compatible
16989DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016990if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 emulate sh
16992 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016993 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016994 # is contrary to our usage. Disable this feature.
16995 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016997else
Matthias Kloseb9621712010-04-24 17:59:49 +000016998 case `(set -o) 2>/dev/null` in #(
16999 *posix*) :
17000 set -o posix ;; #(
17001 *) :
17002 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017003esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017004fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017005
17006
Matthias Kloseb9621712010-04-24 17:59:49 +000017007as_nl='
17008'
17009export as_nl
17010# Printing a long string crashes Solaris 7 /usr/bin/printf.
17011as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17012as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17013as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17014# Prefer a ksh shell builtin over an external printf program on Solaris,
17015# but without wasting forks for bash or zsh.
17016if test -z "$BASH_VERSION$ZSH_VERSION" \
17017 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17018 as_echo='print -r --'
17019 as_echo_n='print -rn --'
17020elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17021 as_echo='printf %s\n'
17022 as_echo_n='printf %s'
17023else
17024 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17025 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17026 as_echo_n='/usr/ucb/echo -n'
17027 else
17028 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17029 as_echo_n_body='eval
17030 arg=$1;
17031 case $arg in #(
17032 *"$as_nl"*)
17033 expr "X$arg" : "X\\(.*\\)$as_nl";
17034 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17035 esac;
17036 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17037 '
17038 export as_echo_n_body
17039 as_echo_n='sh -c $as_echo_n_body as_echo'
17040 fi
17041 export as_echo_body
17042 as_echo='sh -c $as_echo_body as_echo'
17043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017044
17045# The user is always right.
17046if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 PATH_SEPARATOR=:
17048 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17049 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17050 PATH_SEPARATOR=';'
17051 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054
17055# IFS
17056# We need space, tab and new line, in precisely that order. Quoting is
17057# there to prevent editors from complaining about space-tab.
17058# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17059# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060IFS=" "" $as_nl"
17061
17062# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017063as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017064case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065 *[\\/]* ) as_myself=$0 ;;
17066 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017067for as_dir in $PATH
17068do
17069 IFS=$as_save_IFS
17070 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017071 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17072 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075 ;;
17076esac
17077# We did not find ourselves, most probably we were run as `sh COMMAND'
17078# in which case we are not to be found in the path.
17079if test "x$as_myself" = x; then
17080 as_myself=$0
17081fi
17082if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17084 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085fi
17086
Matthias Kloseb9621712010-04-24 17:59:49 +000017087# Unset variables that we do not need and which cause bugs (e.g. in
17088# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17089# suppresses any "Segmentation fault" message there. '((' could
17090# trigger a bug in pdksh 5.2.14.
17091for as_var in BASH_ENV ENV MAIL MAILPATH
17092do eval test x\${$as_var+set} = xset \
17093 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094done
17095PS1='$ '
17096PS2='> '
17097PS4='+ '
17098
17099# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017100LC_ALL=C
17101export LC_ALL
17102LANGUAGE=C
17103export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104
Matthias Kloseb9621712010-04-24 17:59:49 +000017105# CDPATH.
17106(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17107
17108
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017109# as_fn_error STATUS ERROR [LINENO LOG_FD]
17110# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017111# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17112# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017113# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017114as_fn_error ()
17115{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116 as_status=$1; test $as_status -eq 0 && as_status=1
17117 if test "$4"; then
17118 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17119 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017120 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017121 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 as_fn_exit $as_status
17123} # as_fn_error
17124
17125
17126# as_fn_set_status STATUS
17127# -----------------------
17128# Set $? to STATUS, without forking.
17129as_fn_set_status ()
17130{
17131 return $1
17132} # as_fn_set_status
17133
17134# as_fn_exit STATUS
17135# -----------------
17136# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17137as_fn_exit ()
17138{
17139 set +e
17140 as_fn_set_status $1
17141 exit $1
17142} # as_fn_exit
17143
17144# as_fn_unset VAR
17145# ---------------
17146# Portably unset VAR.
17147as_fn_unset ()
17148{
17149 { eval $1=; unset $1;}
17150}
17151as_unset=as_fn_unset
17152# as_fn_append VAR VALUE
17153# ----------------------
17154# Append the text in VALUE to the end of the definition contained in VAR. Take
17155# advantage of any shell optimizations that allow amortized linear growth over
17156# repeated appends, instead of the typical quadratic growth present in naive
17157# implementations.
17158if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17159 eval 'as_fn_append ()
17160 {
17161 eval $1+=\$2
17162 }'
17163else
17164 as_fn_append ()
17165 {
17166 eval $1=\$$1\$2
17167 }
17168fi # as_fn_append
17169
17170# as_fn_arith ARG...
17171# ------------------
17172# Perform arithmetic evaluation on the ARGs, and store the result in the
17173# global $as_val. Take advantage of shells that can avoid forks. The arguments
17174# must be portable across $(()) and expr.
17175if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17176 eval 'as_fn_arith ()
17177 {
17178 as_val=$(( $* ))
17179 }'
17180else
17181 as_fn_arith ()
17182 {
17183 as_val=`expr "$@" || test $? -eq 1`
17184 }
17185fi # as_fn_arith
17186
17187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188if expr a : '\(a\)' >/dev/null 2>&1 &&
17189 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17190 as_expr=expr
17191else
17192 as_expr=false
17193fi
17194
17195if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17196 as_basename=basename
17197else
17198 as_basename=false
17199fi
17200
Matthias Kloseb9621712010-04-24 17:59:49 +000017201if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17202 as_dirname=dirname
17203else
17204 as_dirname=false
17205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207as_me=`$as_basename -- "$0" ||
17208$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17209 X"$0" : 'X\(//\)$' \| \
17210 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017211$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017212 sed '/^.*\/\([^/][^/]*\)\/*$/{
17213 s//\1/
17214 q
17215 }
17216 /^X\/\(\/\/\)$/{
17217 s//\1/
17218 q
17219 }
17220 /^X\/\(\/\).*/{
17221 s//\1/
17222 q
17223 }
17224 s/.*/./; q'`
17225
Matthias Kloseb9621712010-04-24 17:59:49 +000017226# Avoid depending upon Character Ranges.
17227as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17228as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17229as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17230as_cr_digits='0123456789'
17231as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232
17233ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017234case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017236 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 xy) ECHO_C='\c';;
17239 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17240 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 esac;;
17242*)
17243 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017244esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247if test -d conf$$.dir; then
17248 rm -f conf$$.dir/conf$$.file
17249else
17250 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017251 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017253if (echo >conf$$.file) 2>/dev/null; then
17254 if ln -s conf$$.file conf$$ 2>/dev/null; then
17255 as_ln_s='ln -s'
17256 # ... but there are two gotchas:
17257 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17258 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017259 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017261 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017262 elif ln conf$$.file conf$$ 2>/dev/null; then
17263 as_ln_s=ln
17264 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017265 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017267else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017268 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17271rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017272
Matthias Kloseb9621712010-04-24 17:59:49 +000017273
17274# as_fn_mkdir_p
17275# -------------
17276# Create "$as_dir" as a directory, including parents if necessary.
17277as_fn_mkdir_p ()
17278{
17279
17280 case $as_dir in #(
17281 -*) as_dir=./$as_dir;;
17282 esac
17283 test -d "$as_dir" || eval $as_mkdir_p || {
17284 as_dirs=
17285 while :; do
17286 case $as_dir in #(
17287 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17288 *) as_qdir=$as_dir;;
17289 esac
17290 as_dirs="'$as_qdir' $as_dirs"
17291 as_dir=`$as_dirname -- "$as_dir" ||
17292$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17293 X"$as_dir" : 'X\(//\)[^/]' \| \
17294 X"$as_dir" : 'X\(//\)$' \| \
17295 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17296$as_echo X"$as_dir" |
17297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17298 s//\1/
17299 q
17300 }
17301 /^X\(\/\/\)[^/].*/{
17302 s//\1/
17303 q
17304 }
17305 /^X\(\/\/\)$/{
17306 s//\1/
17307 q
17308 }
17309 /^X\(\/\).*/{
17310 s//\1/
17311 q
17312 }
17313 s/.*/./; q'`
17314 test -d "$as_dir" && break
17315 done
17316 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017317 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017318
17319
17320} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017321if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017323else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017324 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017325 as_mkdir_p=false
17326fi
17327
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017328
17329# as_fn_executable_p FILE
17330# -----------------------
17331# Test if FILE is an executable regular file.
17332as_fn_executable_p ()
17333{
17334 test -f "$1" && test -x "$1"
17335} # as_fn_executable_p
17336as_test_x='test -x'
17337as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017338
17339# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017340as_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 +000017341
17342# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017344
17345
Martin v. Löwis11437992002-04-12 09:54:03 +000017346exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017347## ----------------------------------- ##
17348## Main body of $CONFIG_STATUS script. ##
17349## ----------------------------------- ##
17350_ASEOF
17351test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017352
Matthias Kloseb9621712010-04-24 17:59:49 +000017353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17354# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017355# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356# values after options handling.
17357ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017358This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017359generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017360
17361 CONFIG_FILES = $CONFIG_FILES
17362 CONFIG_HEADERS = $CONFIG_HEADERS
17363 CONFIG_LINKS = $CONFIG_LINKS
17364 CONFIG_COMMANDS = $CONFIG_COMMANDS
17365 $ $0 $@
17366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367on `(hostname || uname -n) 2>/dev/null | sed 1q`
17368"
17369
Martin v. Löwis11437992002-04-12 09:54:03 +000017370_ACEOF
17371
Matthias Kloseb9621712010-04-24 17:59:49 +000017372case $ac_config_files in *"
17373"*) set x $ac_config_files; shift; ac_config_files=$*;;
17374esac
17375
17376case $ac_config_headers in *"
17377"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17378esac
17379
17380
17381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017382# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017383config_files="$ac_config_files"
17384config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017387
Matthias Kloseb9621712010-04-24 17:59:49 +000017388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017389ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017390\`$as_me' instantiates files and other configuration actions
17391from templates according to the current configuration. Unless the files
17392and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017393
Matthias Kloseb9621712010-04-24 17:59:49 +000017394Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017395
17396 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 --config print configuration, then exit
17399 -q, --quiet, --silent
17400 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 -d, --debug don't remove temporary files
17402 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 --file=FILE[:TEMPLATE]
17404 instantiate the configuration file FILE
17405 --header=FILE[:TEMPLATE]
17406 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
17408Configuration files:
17409$config_files
17410
17411Configuration headers:
17412$config_headers
17413
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017414Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17418ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017419ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017420python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017421configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017422 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017423
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017424Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017425This config.status script is free software; the Free Software Foundation
17426gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427
17428ac_pwd='$ac_pwd'
17429srcdir='$srcdir'
17430INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017431MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017432test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017433_ACEOF
17434
Matthias Kloseb9621712010-04-24 17:59:49 +000017435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17436# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017437ac_need_defaults=:
17438while test $# != 0
17439do
17440 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017441 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17443 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017444 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017446 --*=)
17447 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17448 ac_optarg=
17449 ac_shift=:
17450 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017452 ac_option=$1
17453 ac_optarg=$2
17454 ac_shift=shift
17455 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 esac
17457
Skip Montanaro6dead952003-09-25 14:50:04 +000017458 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017460 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17461 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017463 $as_echo "$ac_cs_version"; exit ;;
17464 --config | --confi | --conf | --con | --co | --c )
17465 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 debug=: ;;
17468 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017469 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 case $ac_optarg in
17471 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 esac
17474 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 ac_need_defaults=false;;
17476 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017477 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 case $ac_optarg in
17479 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17480 esac
17481 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483 --he | --h)
17484 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017485 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017486Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017488 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17490 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17491 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017492
17493 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017494 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017495Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
Matthias Kloseb9621712010-04-24 17:59:49 +000017497 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
17500 esac
17501 shift
17502done
17503
Skip Montanaro6dead952003-09-25 14:50:04 +000017504ac_configure_extra_args=
17505
17506if $ac_cs_silent; then
17507 exec 6>/dev/null
17508 ac_configure_extra_args="$ac_configure_extra_args --silent"
17509fi
17510
17511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017513if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017514 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017515 shift
17516 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17517 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017519 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017520fi
17521
Martin v. Löwis11437992002-04-12 09:54:03 +000017522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524exec 5>>config.log
17525{
17526 echo
17527 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17528## Running $as_me. ##
17529_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017536
Matthias Kloseb9621712010-04-24 17:59:49 +000017537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538
17539# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017540for ac_config_target in $ac_config_targets
17541do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 case $ac_config_target in
17543 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17544 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17545 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017546 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17547 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017549 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017550 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017551 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552
Victor Stinnere0be4232011-10-25 13:06:09 +020017553 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 esac
17555done
17556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557
Martin v. Löwis11437992002-04-12 09:54:03 +000017558# If the user did not use the arguments to specify the items to instantiate,
17559# then the envvar interface is used. Set only those that are not.
17560# We use the long form for the default assignment because of an extremely
17561# bizarre bug on SunOS 4.1.3.
17562if $ac_need_defaults; then
17563 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17564 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17565fi
17566
Skip Montanaro6dead952003-09-25 14:50:04 +000017567# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017569# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570# Hook for its removal unless debugging.
17571# Note that there is a small window in which the directory will not be cleaned:
17572# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017573$debug ||
17574{
Victor Stinnere0be4232011-10-25 13:06:09 +020017575 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017577 : "${ac_tmp:=$tmp}"
17578 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017581}
Martin v. Löwis11437992002-04-12 09:54:03 +000017582# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017583
Martin v. Löwis11437992002-04-12 09:54:03 +000017584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017586 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017587} ||
17588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 tmp=./conf$$-$RANDOM
17590 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017592ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
Matthias Kloseb9621712010-04-24 17:59:49 +000017594# Set up the scripts for CONFIG_FILES section.
17595# No need to generate them if there are no CONFIG_FILES.
17596# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
Matthias Kloseb9621712010-04-24 17:59:49 +000017599
17600ac_cr=`echo X | tr X '\015'`
17601# On cygwin, bash can eat \r inside `` if the user requested igncr.
17602# But we know of no other shell where ac_cr would be empty at this
17603# point, so we can use a bashism as a fallback.
17604if test "x$ac_cr" = x; then
17605 eval ac_cr=\$\'\\r\'
17606fi
17607ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17608if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017609 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017610else
17611 ac_cs_awk_cr=$ac_cr
17612fi
17613
Victor Stinnere0be4232011-10-25 13:06:09 +020017614echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017615_ACEOF
17616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617
Matthias Kloseb9621712010-04-24 17:59:49 +000017618{
17619 echo "cat >conf$$subs.awk <<_ACEOF" &&
17620 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17621 echo "_ACEOF"
17622} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017623 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17624ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625ac_delim='%!_!# '
17626for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017628 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17631 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 break
17633 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017634 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635 else
17636 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638done
Matthias Kloseb9621712010-04-24 17:59:49 +000017639rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640
Matthias Kloseb9621712010-04-24 17:59:49 +000017641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017642cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017644sed -n '
17645h
17646s/^/S["/; s/!.*/"]=/
17647p
17648g
17649s/^[^!]*!//
17650:repl
17651t repl
17652s/'"$ac_delim"'$//
17653t delim
17654:nl
17655h
17656s/\(.\{148\}\)..*/\1/
17657t more1
17658s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17659p
17660n
17661b repl
17662:more1
17663s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17664p
17665g
17666s/.\{148\}//
17667t nl
17668:delim
17669h
17670s/\(.\{148\}\)..*/\1/
17671t more2
17672s/["\\]/\\&/g; s/^/"/; s/$/"/
17673p
17674b
17675:more2
17676s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17677p
17678g
17679s/.\{148\}//
17680t delim
17681' <conf$$subs.awk | sed '
17682/^[^""]/{
17683 N
17684 s/\n//
17685}
17686' >>$CONFIG_STATUS || ac_write_fail=1
17687rm -f conf$$subs.awk
17688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17689_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017690cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017691 for (key in S) S_is_set[key] = 1
17692 FS = ""
17693
17694}
17695{
17696 line = $ 0
17697 nfields = split(line, field, "@")
17698 substed = 0
17699 len = length(field[1])
17700 for (i = 2; i < nfields; i++) {
17701 key = field[i]
17702 keylen = length(key)
17703 if (S_is_set[key]) {
17704 value = S[key]
17705 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17706 len += length(value) + length(field[++i])
17707 substed = 1
17708 } else
17709 len += 1 + keylen
17710 }
17711
17712 print line
17713}
17714
17715_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17718if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17719 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17720else
17721 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017722fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017723 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017724_ACEOF
17725
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017726# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17727# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728# trailing colons and then remove the whole line if VPATH becomes empty
17729# (actually we leave an empty line to preserve line numbers).
17730if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017731 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17732h
17733s///
17734s/^/:/
17735s/[ ]*$/:/
17736s/:\$(srcdir):/:/g
17737s/:\${srcdir}:/:/g
17738s/:@srcdir@:/:/g
17739s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017741x
17742s/\(=[ ]*\).*/\1/
17743G
17744s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745s/^[^=]*=[ ]*$//
17746}'
17747fi
17748
Matthias Kloseb9621712010-04-24 17:59:49 +000017749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017750fi # test -n "$CONFIG_FILES"
17751
Matthias Kloseb9621712010-04-24 17:59:49 +000017752# Set up the scripts for CONFIG_HEADERS section.
17753# No need to generate them if there are no CONFIG_HEADERS.
17754# This happens for instance with `./config.status Makefile'.
17755if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017756cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017757BEGIN {
17758_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759
Matthias Kloseb9621712010-04-24 17:59:49 +000017760# Transform confdefs.h into an awk script `defines.awk', embedded as
17761# here-document in config.status, that substitutes the proper values into
17762# config.h.in to produce config.h.
17763
17764# Create a delimiter string that does not exist in confdefs.h, to ease
17765# handling of long lines.
17766ac_delim='%!_!# '
17767for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017768 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17769 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 break
17771 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017772 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 else
17774 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17775 fi
17776done
17777
17778# For the awk script, D is an array of macro values keyed by name,
17779# likewise P contains macro parameters if any. Preserve backslash
17780# newline sequences.
17781
17782ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17783sed -n '
17784s/.\{148\}/&'"$ac_delim"'/g
17785t rset
17786:rset
17787s/^[ ]*#[ ]*define[ ][ ]*/ /
17788t def
17789d
17790:def
17791s/\\$//
17792t bsnl
17793s/["\\]/\\&/g
17794s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17795D["\1"]=" \3"/p
17796s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17797d
17798:bsnl
17799s/["\\]/\\&/g
17800s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17801D["\1"]=" \3\\\\\\n"\\/p
17802t cont
17803s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17804t cont
17805d
17806:cont
17807n
17808s/.\{148\}/&'"$ac_delim"'/g
17809t clear
17810:clear
17811s/\\$//
17812t bsnlc
17813s/["\\]/\\&/g; s/^/"/; s/$/"/p
17814d
17815:bsnlc
17816s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17817b cont
17818' <confdefs.h | sed '
17819s/'"$ac_delim"'/"\\\
17820"/g' >>$CONFIG_STATUS || ac_write_fail=1
17821
17822cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17823 for (key in D) D_is_set[key] = 1
17824 FS = ""
17825}
17826/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17827 line = \$ 0
17828 split(line, arg, " ")
17829 if (arg[1] == "#") {
17830 defundef = arg[2]
17831 mac1 = arg[3]
17832 } else {
17833 defundef = substr(arg[1], 2)
17834 mac1 = arg[2]
17835 }
17836 split(mac1, mac2, "(") #)
17837 macro = mac2[1]
17838 prefix = substr(line, 1, index(line, defundef) - 1)
17839 if (D_is_set[macro]) {
17840 # Preserve the white space surrounding the "#".
17841 print prefix "define", macro P[macro] D[macro]
17842 next
17843 } else {
17844 # Replace #undef with comments. This is necessary, for example,
17845 # in the case of _POSIX_SOURCE, which is predefined and required
17846 # on some systems where configure will not decide to define it.
17847 if (defundef == "undef") {
17848 print "/*", prefix defundef, macro, "*/"
17849 next
17850 }
17851 }
17852}
17853{ print }
17854_ACAWK
17855_ACEOF
17856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017857 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017858fi # test -n "$CONFIG_HEADERS"
17859
17860
17861eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17862shift
17863for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864do
17865 case $ac_tag in
17866 :[FHLC]) ac_mode=$ac_tag; continue;;
17867 esac
17868 case $ac_mode$ac_tag in
17869 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017870 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871 :[FH]-) ac_tag=-:-;;
17872 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17873 esac
17874 ac_save_IFS=$IFS
17875 IFS=:
17876 set x $ac_tag
17877 IFS=$ac_save_IFS
17878 shift
17879 ac_file=$1
17880 shift
17881
17882 case $ac_mode in
17883 :L) ac_source=$1;;
17884 :[FH])
17885 ac_file_inputs=
17886 for ac_f
17887 do
17888 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017889 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890 *) # Look for the file first in the build tree, then in the source tree
17891 # (if the path is not absolute). The absolute path cannot be DOS-style,
17892 # because $ac_f cannot contain `:'.
17893 test -f "$ac_f" ||
17894 case $ac_f in
17895 [\\/$]*) false;;
17896 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17897 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017898 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17901 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 done
17903
17904 # Let's still pretend it is `configure' which instantiates (i.e., don't
17905 # use $as_me), people would be surprised to read:
17906 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017907 configure_input='Generated from '`
17908 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17909 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 if test x"$ac_file" != x-; then
17911 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17913$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 # Neutralize special characters interpreted by sed in replacement strings.
17916 case $configure_input in #(
17917 *\&* | *\|* | *\\* )
17918 ac_sed_conf_input=`$as_echo "$configure_input" |
17919 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17920 *) ac_sed_conf_input=$configure_input;;
17921 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922
17923 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017924 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17925 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 esac
17927 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 esac
17929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017931$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017932 X"$ac_file" : 'X\(//\)[^/]' \| \
17933 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017935$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17937 s//\1/
17938 q
17939 }
17940 /^X\(\/\/\)[^/].*/{
17941 s//\1/
17942 q
17943 }
17944 /^X\(\/\/\)$/{
17945 s//\1/
17946 q
17947 }
17948 /^X\(\/\).*/{
17949 s//\1/
17950 q
17951 }
17952 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 ac_builddir=.
17955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956case "$ac_dir" in
17957.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17958*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017959 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962 case $ac_top_builddir_sub in
17963 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17964 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17965 esac ;;
17966esac
17967ac_abs_top_builddir=$ac_pwd
17968ac_abs_builddir=$ac_pwd$ac_dir_suffix
17969# for backward compatibility:
17970ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017971
17972case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 ac_top_srcdir=$ac_top_builddir_sub
17976 ac_abs_top_srcdir=$ac_pwd ;;
17977 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017978 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 ac_top_srcdir=$srcdir
17980 ac_abs_top_srcdir=$srcdir ;;
17981 *) # Relative name.
17982 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17983 ac_top_srcdir=$ac_top_build_prefix$srcdir
17984 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017985esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017987
Martin v. Löwis11437992002-04-12 09:54:03 +000017988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989 case $ac_mode in
17990 :F)
17991 #
17992 # CONFIG_FILE
17993 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017994
17995 case $INSTALL in
17996 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017998 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017999 ac_MKDIR_P=$MKDIR_P
18000 case $MKDIR_P in
18001 [\\/$]* | ?:[\\/]* ) ;;
18002 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18003 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018004_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005
Matthias Kloseb9621712010-04-24 17:59:49 +000018006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007# If the template does not know about datarootdir, expand it.
18008# FIXME: This hack should be removed a few years after 2.60.
18009ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018010ac_sed_dataroot='
18011/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 p
18013 q
18014}
18015/@datadir@/p
18016/@docdir@/p
18017/@infodir@/p
18018/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018019/@mandir@/p'
18020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021*datarootdir*) ac_datarootdir_seen=yes;;
18022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 ac_datarootdir_hack='
18028 s&@datadir@&$datadir&g
18029 s&@docdir@&$docdir&g
18030 s&@infodir@&$infodir&g
18031 s&@localedir@&$localedir&g
18032 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018033 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034esac
18035_ACEOF
18036
18037# Neutralize VPATH when `$srcdir' = `.'.
18038# Shell code in configure.ac might set extrasub.
18039# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18041ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018042$extrasub
18043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018045:t
18046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018047s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018049s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050s&@srcdir@&$ac_srcdir&;t t
18051s&@abs_srcdir@&$ac_abs_srcdir&;t t
18052s&@top_srcdir@&$ac_top_srcdir&;t t
18053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18054s&@builddir@&$ac_builddir&;t t
18055s&@abs_builddir@&$ac_abs_builddir&;t t
18056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18057s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018058s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018060"
Victor Stinnere0be4232011-10-25 13:06:09 +020018061eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18062 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018065 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18066 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18067 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018069which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018070$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018071which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018072
Victor Stinnere0be4232011-10-25 13:06:09 +020018073 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018074 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018075 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18076 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018077 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018078 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 ;;
18080 :H)
18081 #
18082 # CONFIG_HEADER
18083 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018085 {
18086 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018087 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18088 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018089 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018090 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018091 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18092$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018095 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018096 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018097 fi
18098 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018099 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018100 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018101 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105
18106 esac
18107
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018108
18109 case $ac_file$ac_mode in
18110 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18111
18112 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113done # for ac_tag
18114
Guido van Rossum627b2d71993-12-24 10:39:16 +000018115
Matthias Kloseb9621712010-04-24 17:59:49 +000018116as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018117_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018118ac_clean_files=$ac_clean_files_save
18119
Matthias Kloseb9621712010-04-24 17:59:49 +000018120test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018121 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018122
Martin v. Löwis11437992002-04-12 09:54:03 +000018123
18124# configure is writing to config.log, and then calls config.status.
18125# config.status does its own redirection, appending to config.log.
18126# Unfortunately, on DOS this fails, as config.log is still kept open
18127# by configure, so config.status won't be able to write to it; its
18128# output is simply discarded. So we exec the FD to /dev/null,
18129# effectively closing config.log, so it can be properly (re)opened and
18130# appended to by config.status. When coming back to configure, we
18131# need to make the FD available again.
18132if test "$no_create" != yes; then
18133 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018134 ac_config_status_args=
18135 test "$silent" = yes &&
18136 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018137 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018138 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 exec 5>>config.log
18140 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18141 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018142 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018143fi
18144if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18146$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018147fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018148
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018149
Christian Heimes75ed8902013-11-20 01:11:18 +010018150echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018151if test ! -f Modules/Setup
18152then
18153 cp $srcdir/Modules/Setup.dist Modules/Setup
18154fi
18155
Christian Heimes75ed8902013-11-20 01:11:18 +010018156echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018157if test ! -f Modules/Setup.local
18158then
18159 echo "# Edit this file for local setup changes" >Modules/Setup.local
18160fi
18161
Christian Heimes75ed8902013-11-20 01:11:18 +010018162echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018163$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018164 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018165 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018166mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018167
18168if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18169 echo "" >&6
18170 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018171 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 +000018172 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018173 echo "" >&6
18174 echo "" >&6
18175fi
18176