blob: 8d3336387c34bafb2151ef4d11e484ccfbc3fa2e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700675LLVM_PROF_ERR
676LLVM_PROF_FILE
677LLVM_PROF_MERGER
678PGO_PROF_USE_FLAG
679PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200680LLVM_AR_FOUND
681target_os
682target_vendor
683target_cpu
684target
685LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300897runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
William Grzybowski23e65b22018-09-07 09:06:15 -03001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001409\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001476 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001490 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1491 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
1493 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --enable-ipv6 Enable ipv6 (with ipv4) support
1495 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001496 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499Optional Packages:
1500 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1501 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001502 --with-universal-archs=ARCH
1503 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001504 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1505 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001509 --with-cxx-main=<compiler>
1510 compile main() and link python executable with C++
1511 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-suffix=.exe set executable suffix
1513 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001514 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001515 --with-lto Enable Link Time Optimization in any build. Disabled
1516 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001517 --with-hash-algorithm=[fnv|siphash24]
1518 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001519 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001520 enable AddressSanitizer (asan)
1521 --with-memory-sanitizer enable MemorySanitizer (msan)
1522 --with-undefined-behavior-sanitizer
1523 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001525 --with-system-expat build pyexpat module using an installed expat
1526 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001527 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001528 --with-system-libmpdec build _decimal module using an installed libmpdec
1529 library
Ned Deilyd819b932013-09-06 01:07:05 -07001530 --with-tcltk-includes='-I...'
1531 override search for Tcl and Tk include files
1532 --with-tcltk-libs='-L...'
1533 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001534 --with-dbmliborder=db1:db2:...
1535 order to check db backends for dbm. Valid value is a
1536 colon separated string with the backend names
1537 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with(out)-doc-strings disable/enable documentation strings
1539 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001540 --with(out)-c-locale-coercion
1541 disable/enable C locale coercion to a UTF-8 based
1542 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001543 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001544 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001545 --with-libm=STRING math library
1546 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001547 --with(out)-computed-gotos
1548 Use computed gotos in evaluation loop (enabled by
1549 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001550 --with(out)-ensurepip=[=upgrade]
1551 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001552 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001553 --with-ssl-default-suites=[python|openssl|STRING]
1554 Override default cipher suites string, python: use
1555 Python's preferred selection (default), openssl:
1556 leave OpenSSL's defaults untouched, STRING: use a
1557 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001560 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CC C compiler command
1562 CFLAGS C compiler flags
1563 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1564 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001569 PKG_CONFIG path to pkg-config utility
1570 PKG_CONFIG_PATH
1571 directories to add to pkg-config's search path
1572 PKG_CONFIG_LIBDIR
1573 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001574
1575Use these variables to override the choices made by `configure' or to help
1576it to find libraries and programs with nonstandard names/locations.
1577
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001578Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001581fi
1582
1583if test "$ac_init_help" = "recursive"; then
1584 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 test -d "$ac_dir" ||
1587 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1588 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_builddir=.
1590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591case "$ac_dir" in
1592.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 case $ac_top_builddir_sub in
1598 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1600 esac ;;
1601esac
1602ac_abs_top_builddir=$ac_pwd
1603ac_abs_builddir=$ac_pwd$ac_dir_suffix
1604# for backward compatibility:
1605ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001606
1607case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001609 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 ac_top_srcdir=$ac_top_builddir_sub
1611 ac_abs_top_srcdir=$ac_pwd ;;
1612 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 ac_top_srcdir=$srcdir
1615 ac_abs_top_srcdir=$srcdir ;;
1616 *) # Relative name.
1617 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1618 ac_top_srcdir=$ac_top_build_prefix$srcdir
1619 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001620esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 cd "$ac_dir" || { ac_status=$?; continue; }
1624 # Check for guested configure.
1625 if test -f "$ac_srcdir/configure.gnu"; then
1626 echo &&
1627 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1628 elif test -f "$ac_srcdir/configure"; then
1629 echo &&
1630 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 fi || ac_status=$?
1634 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 done
1636fi
1637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001639if $ac_init_version; then
1640 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001641python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001642generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001643
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001645This configure script is free software; the Free Software Foundation
1646gives unlimited permission to copy, distribute and modify it.
1647_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001648 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001650
1651## ------------------------ ##
1652## Autoconf initialization. ##
1653## ------------------------ ##
1654
1655# ac_fn_c_try_compile LINENO
1656# --------------------------
1657# Try to compile conftest.$ac_ext, and return whether this succeeded.
1658ac_fn_c_try_compile ()
1659{
1660 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1661 rm -f conftest.$ac_objext
1662 if { { ac_try="$ac_compile"
1663case "(($ac_try" in
1664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1665 *) ac_try_echo=$ac_try;;
1666esac
1667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1668$as_echo "$ac_try_echo"; } >&5
1669 (eval "$ac_compile") 2>conftest.err
1670 ac_status=$?
1671 if test -s conftest.err; then
1672 grep -v '^ *+' conftest.err >conftest.er1
1673 cat conftest.er1 >&5
1674 mv -f conftest.er1 conftest.err
1675 fi
1676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1677 test $ac_status = 0; } && {
1678 test -z "$ac_c_werror_flag" ||
1679 test ! -s conftest.err
1680 } && test -s conftest.$ac_objext; then :
1681 ac_retval=0
1682else
1683 $as_echo "$as_me: failed program was:" >&5
1684sed 's/^/| /' conftest.$ac_ext >&5
1685
1686 ac_retval=1
1687fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001688 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001689 as_fn_set_status $ac_retval
1690
1691} # ac_fn_c_try_compile
1692
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001693# ac_fn_c_try_cpp LINENO
1694# ----------------------
1695# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1696ac_fn_c_try_cpp ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_cpp conftest.$ac_ext"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1707 ac_status=$?
1708 if test -s conftest.err; then
1709 grep -v '^ *+' conftest.err >conftest.er1
1710 cat conftest.er1 >&5
1711 mv -f conftest.er1 conftest.err
1712 fi
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; } > conftest.i && {
1715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1716 test ! -s conftest.err
1717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
1725 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1726 as_fn_set_status $ac_retval
1727
1728} # ac_fn_c_try_cpp
1729
Matthias Kloseb9621712010-04-24 17:59:49 +00001730# ac_fn_c_try_link LINENO
1731# -----------------------
1732# Try to link conftest.$ac_ext, and return whether this succeeded.
1733ac_fn_c_try_link ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 rm -f conftest.$ac_objext conftest$ac_exeext
1737 if { { ac_try="$ac_link"
1738case "(($ac_try" in
1739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 *) ac_try_echo=$ac_try;;
1741esac
1742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743$as_echo "$ac_try_echo"; } >&5
1744 (eval "$ac_link") 2>conftest.err
1745 ac_status=$?
1746 if test -s conftest.err; then
1747 grep -v '^ *+' conftest.err >conftest.er1
1748 cat conftest.er1 >&5
1749 mv -f conftest.er1 conftest.err
1750 fi
1751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752 test $ac_status = 0; } && {
1753 test -z "$ac_c_werror_flag" ||
1754 test ! -s conftest.err
1755 } && test -s conftest$ac_exeext && {
1756 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001757 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001758 }; then :
1759 ac_retval=0
1760else
1761 $as_echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
1763
1764 ac_retval=1
1765fi
1766 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1767 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1768 # interfere with the next link command; also delete a directory that is
1769 # left behind by Apple's compiler. We do this before executing the actions.
1770 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001772 as_fn_set_status $ac_retval
1773
1774} # ac_fn_c_try_link
1775
Matthias Kloseb9621712010-04-24 17:59:49 +00001776# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1777# -------------------------------------------------------
1778# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1779# the include files in INCLUDES and setting the cache variable VAR
1780# accordingly.
1781ac_fn_c_check_header_mongrel ()
1782{
1783 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001784 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1786$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001787if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001788 $as_echo_n "(cached) " >&6
1789fi
1790eval ac_res=\$$3
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1792$as_echo "$ac_res" >&6; }
1793else
1794 # Is the header compilable?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1796$as_echo_n "checking $2 usability... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799$4
1800#include <$2>
1801_ACEOF
1802if ac_fn_c_try_compile "$LINENO"; then :
1803 ac_header_compiler=yes
1804else
1805 ac_header_compiler=no
1806fi
1807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1809$as_echo "$ac_header_compiler" >&6; }
1810
1811# Is the header present?
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1813$as_echo_n "checking $2 presence... " >&6; }
1814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1815/* end confdefs.h. */
1816#include <$2>
1817_ACEOF
1818if ac_fn_c_try_cpp "$LINENO"; then :
1819 ac_header_preproc=yes
1820else
1821 ac_header_preproc=no
1822fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001823rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1825$as_echo "$ac_header_preproc" >&6; }
1826
1827# So? What about this header?
1828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1829 yes:no: )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1831$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1834 ;;
1835 no:yes:* )
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1837$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1839$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1841$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1843$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1845$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001846( $as_echo "## --------------------------------------- ##
1847## Report this to https://bugs.python.org/ ##
1848## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 ) | sed "s/^/$as_me: WARNING: /" >&2
1850 ;;
1851esac
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001854if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001855 $as_echo_n "(cached) " >&6
1856else
1857 eval "$3=\$ac_header_compiler"
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
1862fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001864
1865} # ac_fn_c_check_header_mongrel
1866
1867# ac_fn_c_try_run LINENO
1868# ----------------------
1869# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1870# that executables *can* be run.
1871ac_fn_c_try_run ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if { { ac_try="$ac_link"
1875case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_link") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1885 { { case "(($ac_try" in
1886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1887 *) ac_try_echo=$ac_try;;
1888esac
1889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1890$as_echo "$ac_try_echo"; } >&5
1891 (eval "$ac_try") 2>&5
1892 ac_status=$?
1893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1894 test $ac_status = 0; }; }; then :
1895 ac_retval=0
1896else
1897 $as_echo "$as_me: program exited with status $ac_status" >&5
1898 $as_echo "$as_me: failed program was:" >&5
1899sed 's/^/| /' conftest.$ac_ext >&5
1900
1901 ac_retval=$ac_status
1902fi
1903 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001904 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001905 as_fn_set_status $ac_retval
1906
1907} # ac_fn_c_try_run
1908
1909# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1910# -------------------------------------------------------
1911# Tests whether HEADER exists and can be compiled using the include files in
1912# INCLUDES, setting the cache variable VAR accordingly.
1913ac_fn_c_check_header_compile ()
1914{
1915 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1917$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001919 $as_echo_n "(cached) " >&6
1920else
1921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1922/* end confdefs.h. */
1923$4
1924#include <$2>
1925_ACEOF
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 eval "$3=yes"
1928else
1929 eval "$3=no"
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938} # ac_fn_c_check_header_compile
1939
Matthias Kloseb9621712010-04-24 17:59:49 +00001940# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1941# -------------------------------------------
1942# Tests whether TYPE exists after having included INCLUDES, setting cache
1943# variable VAR accordingly.
1944ac_fn_c_check_type ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=no"
1953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$4
1956int
1957main ()
1958{
1959if (sizeof ($2))
1960 return 0;
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$4
1969int
1970main ()
1971{
1972if (sizeof (($2)))
1973 return 0;
1974 ;
1975 return 0;
1976}
1977_ACEOF
1978if ac_fn_c_try_compile "$LINENO"; then :
1979
1980else
1981 eval "$3=yes"
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_check_type
1993
Matthias Kloseb9621712010-04-24 17:59:49 +00001994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_lo=0 ac_mid=0
2020 while :; do
2021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2022/* end confdefs.h. */
2023$4
2024int
2025main ()
2026{
2027static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002028test_array [0] = 0;
2029return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002030
2031 ;
2032 return 0;
2033}
2034_ACEOF
2035if ac_fn_c_try_compile "$LINENO"; then :
2036 ac_hi=$ac_mid; break
2037else
2038 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2039 if test $ac_lo -le $ac_mid; then
2040 ac_lo= ac_hi=
2041 break
2042 fi
2043 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2044fi
2045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2046 done
2047else
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=-1 ac_mid=-1
2064 while :; do
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$4
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002072test_array [0] = 0;
2073return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002074
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_lo=$ac_mid; break
2081else
2082 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2083 if test $ac_mid -le $ac_hi; then
2084 ac_lo= ac_hi=
2085 break
2086 fi
2087 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 done
2091else
2092 ac_lo= ac_hi=
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097# Binary search between lo and hi bounds.
2098while test "x$ac_lo" != "x$ac_hi"; do
2099 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002107test_array [0] = 0;
2108return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_hi=$ac_mid
2116else
2117 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120done
2121case $ac_lo in #((
2122?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2123'') ac_retval=1 ;;
2124esac
2125 else
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129static long int longval () { return $2; }
2130static unsigned long int ulongval () { return $2; }
2131#include <stdio.h>
2132#include <stdlib.h>
2133int
2134main ()
2135{
2136
2137 FILE *f = fopen ("conftest.val", "w");
2138 if (! f)
2139 return 1;
2140 if (($2) < 0)
2141 {
2142 long int i = longval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%ld", i);
2146 }
2147 else
2148 {
2149 unsigned long int i = ulongval ();
2150 if (i != ($2))
2151 return 1;
2152 fprintf (f, "%lu", i);
2153 }
2154 /* Do not output a trailing newline, as this causes \r\n confusion
2155 on some platforms. */
2156 return ferror (f) || fclose (f) != 0;
2157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_run "$LINENO"; then :
2163 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2164else
2165 ac_retval=1
2166fi
2167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2168 conftest.$ac_objext conftest.beam conftest.$ac_ext
2169rm -f conftest.val
2170
2171 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002172 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002173 as_fn_set_status $ac_retval
2174
2175} # ac_fn_c_compute_int
2176
2177# ac_fn_c_check_func LINENO FUNC VAR
2178# ----------------------------------
2179# Tests whether FUNC exists, setting the cache variable VAR accordingly
2180ac_fn_c_check_func ()
2181{
2182 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2184$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002185if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002186 $as_echo_n "(cached) " >&6
2187else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2192#define $2 innocuous_$2
2193
2194/* System header to define __stub macros and hopefully few prototypes,
2195 which can conflict with char $2 (); below.
2196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2197 <limits.h> exists even on freestanding compilers. */
2198
2199#ifdef __STDC__
2200# include <limits.h>
2201#else
2202# include <assert.h>
2203#endif
2204
2205#undef $2
2206
2207/* Override any GCC internal prototype to avoid an error.
2208 Use char because int might match the return type of a GCC
2209 builtin and then its argument prototype would still apply. */
2210#ifdef __cplusplus
2211extern "C"
2212#endif
2213char $2 ();
2214/* The GNU C library defines this for functions which it implements
2215 to always fail with ENOSYS. Some functions are actually named
2216 something starting with __ and the normal name is an alias. */
2217#if defined __stub_$2 || defined __stub___$2
2218choke me
2219#endif
2220
2221int
2222main ()
2223{
2224return $2 ();
2225 ;
2226 return 0;
2227}
2228_ACEOF
2229if ac_fn_c_try_link "$LINENO"; then :
2230 eval "$3=yes"
2231else
2232 eval "$3=no"
2233fi
2234rm -f core conftest.err conftest.$ac_objext \
2235 conftest$ac_exeext conftest.$ac_ext
2236fi
2237eval ac_res=\$$3
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002241
2242} # ac_fn_c_check_func
2243
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002244# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2245# ---------------------------------------------
2246# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2247# accordingly.
2248ac_fn_c_check_decl ()
2249{
2250 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2251 as_decl_name=`echo $2|sed 's/ *(.*//'`
2252 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2254$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2255if eval \${$3+:} false; then :
2256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$4
2261int
2262main ()
2263{
2264#ifndef $as_decl_name
2265#ifdef __cplusplus
2266 (void) $as_decl_use;
2267#else
2268 (void) $as_decl_name;
2269#endif
2270#endif
2271
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$3=yes"
2278else
2279 eval "$3=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$3
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2287
2288} # ac_fn_c_check_decl
2289
Matthias Kloseb9621712010-04-24 17:59:49 +00002290# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2291# ----------------------------------------------------
2292# Tries to find if the field MEMBER exists in type AGGR, after including
2293# INCLUDES, setting cache variable VAR accordingly.
2294ac_fn_c_check_member ()
2295{
2296 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2298$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002299if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002300 $as_echo_n "(cached) " >&6
2301else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304$5
2305int
2306main ()
2307{
2308static $2 ac_aggr;
2309if (ac_aggr.$3)
2310return 0;
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$4=yes"
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$5
2321int
2322main ()
2323{
2324static $2 ac_aggr;
2325if (sizeof ac_aggr.$3)
2326return 0;
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_compile "$LINENO"; then :
2332 eval "$4=yes"
2333else
2334 eval "$4=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340eval ac_res=\$$4
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2342$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002343 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002344
2345} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002347This file contains any messages produced by compilers while
2348running configure, to aid debugging if configure makes a mistake.
2349
Ned Deily5489bda2018-01-31 17:44:09 -05002350It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002351generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002352
2353 $ $0 $@
2354
2355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002357{
2358cat <<_ASUNAME
2359## --------- ##
2360## Platform. ##
2361## --------- ##
2362
2363hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2364uname -m = `(uname -m) 2>/dev/null || echo unknown`
2365uname -r = `(uname -r) 2>/dev/null || echo unknown`
2366uname -s = `(uname -s) 2>/dev/null || echo unknown`
2367uname -v = `(uname -v) 2>/dev/null || echo unknown`
2368
2369/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2370/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2371
2372/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2373/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2374/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002376/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2377/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2378/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2379
2380_ASUNAME
2381
2382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2383for as_dir in $PATH
2384do
2385 IFS=$as_save_IFS
2386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002387 $as_echo "PATH: $as_dir"
2388 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002390
2391} >&5
2392
2393cat >&5 <<_ACEOF
2394
2395
2396## ----------- ##
2397## Core tests. ##
2398## ----------- ##
2399
2400_ACEOF
2401
2402
2403# Keep a trace of the command line.
2404# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_configure_args0=
2410ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_must_keep_next=false
2412for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002413do
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 for ac_arg
2415 do
2416 case $ac_arg in
2417 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2418 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2419 | -silent | --silent | --silen | --sile | --sil)
2420 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002421 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 esac
2424 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 case $ac_arg in
2432 *=* | --config-cache | -C | -disable-* | --disable-* \
2433 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2434 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2435 | -with-* | --with-* | -without-* | --without-* | --x)
2436 case "$ac_configure_args0 " in
2437 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2438 esac
2439 ;;
2440 -* ) ac_must_keep_next=true ;;
2441 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 ;;
2445 esac
2446 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002447done
Matthias Kloseb9621712010-04-24 17:59:49 +00002448{ ac_configure_args0=; unset ac_configure_args0;}
2449{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451# When interrupted or exit'd, cleanup temporary files, and complete
2452# config.log. We remove comments because anyway the quotes in there
2453# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454# WARNING: Use '\'' to represent an apostrophe within the trap.
2455# 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 +00002456trap 'exit_status=$?
2457 # Save into config.log some information that might help in debugging.
2458 {
2459 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002460
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002461 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002462## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 echo
2465 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466(
2467 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2468 eval ac_val=\$$ac_var
2469 case $ac_val in #(
2470 *${as_nl}*)
2471 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2473$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac
2475 case $ac_var in #(
2476 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2478 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 esac ;;
2480 esac
2481 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2484 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 "s/'\''/'\''\\\\'\'''\''/g;
2487 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2488 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002489 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac |
2493 sort
2494)
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002496
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002498## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 echo
2501 for ac_var in $ac_subst_vars
2502 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 eval ac_val=\$$ac_var
2504 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 done | sort
2509 echo
2510
2511 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 echo
2516 for ac_var in $ac_subst_files
2517 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 eval ac_val=\$$ac_var
2519 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 done | sort
2524 echo
2525 fi
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002528 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002529## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
2534 fi
2535 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$as_me: caught signal $ac_signal"
2537 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 rm -f core *.core core.conftest.* &&
2540 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002543for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
2546ac_signal=0
2547
2548# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551$as_echo "/* confdefs.h */" > confdefs.h
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553# Predefined preprocessor variables.
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_NAME "$PACKAGE_NAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_STRING "$PACKAGE_STRING"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573_ACEOF
2574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_URL "$PACKAGE_URL"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002581# Prefer an explicitly selected file to automatically selected ones.
2582ac_site_file1=NONE
2583ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 # We do not want a PATH search for config.site.
2586 case $CONFIG_SITE in #((
2587 -*) ac_site_file1=./$CONFIG_SITE;;
2588 */*) ac_site_file1=$CONFIG_SITE;;
2589 *) ac_site_file1=./$CONFIG_SITE;;
2590 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 ac_site_file1=$prefix/share/config.site
2593 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594else
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 ac_site_file1=$ac_default_prefix/share/config.site
2596 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002598for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599do
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 test "x$ac_site_file" = xNONE && continue
2601 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2603$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002605 . "$ac_site_file" \
2606 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2608as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002609See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610 fi
2611done
2612
2613if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 # Some versions of bash will fail to source /dev/null (special files
2615 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2616 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2618$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2621 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 esac
2623 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624else
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2626$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 >$cache_file
2628fi
2629
2630# Check that the precious variables saved in the cache have kept the same
2631# value.
2632ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2635 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2637 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 case $ac_old_set,$ac_new_set in
2639 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2641$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 +00002642 ac_cache_corrupted=: ;;
2643 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2645$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_cache_corrupted=: ;;
2647 ,);;
2648 *)
2649 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 # differences in whitespace do not lead to failure.
2651 ac_old_val_w=`echo x $ac_old_val`
2652 ac_new_val_w=`echo x $ac_new_val`
2653 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2655$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2656 ac_cache_corrupted=:
2657 else
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2659$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2660 eval $ac_var=\$ac_old_val
2661 fi
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2663$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2665$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 fi;;
2667 esac
2668 # Pass precious variables to config.status.
2669 if test "$ac_new_set" = set; then
2670 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 *) ac_arg=$ac_var=$ac_new_val ;;
2673 esac
2674 case " $ac_configure_args " in
2675 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 esac
2678 fi
2679done
2680if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2684$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002685 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687## -------------------- ##
2688## Main body of script. ##
2689## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690
Guido van Rossum7f43da71994-08-01 12:15:30 +00002691ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2695ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696
Guido van Rossum627b2d71993-12-24 10:39:16 +00002697
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
Trent Nelson4d4ec652012-10-16 08:51:24 -04002699
Christian Heimesff5be6e2018-01-20 13:19:21 +01002700
2701
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002702if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703 # If we're building out-of-tree, we need to make sure the following
2704 # resources get picked up before their $srcdir counterparts.
2705 # Objects/ -> typeslots.inc
2706 # Include/ -> Python-ast.h, graminit.h
2707 # Python/ -> importlib.h
2708 # (A side effect of this is that these resources will automatically be
2709 # regenerated when building out-of-tree, regardless of whether or not
2710 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2711 # off.)
2712 BASECPPFLAGS="-IObjects -IInclude -IPython"
2713else
2714 BASECPPFLAGS=""
2715fi
2716
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717
2718
2719
2720
Victor Stinner9ed34a82017-05-02 22:35:58 +02002721if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723# Extract the first word of "git", so it can be a program name with args.
2724set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002728 $as_echo_n "(cached) " >&6
2729else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 if test -n "$HAS_GIT"; then
2731 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732else
2733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734for as_dir in $PATH
2735do
2736 IFS=$as_save_IFS
2737 test -z "$as_dir" && as_dir=.
2738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2742 break 2
2743 fi
2744done
2745 done
2746IFS=$as_save_IFS
2747
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
2750fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=$ac_cv_prog_HAS_GIT
2752if test -n "$HAS_GIT"; then
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2754$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755else
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2757$as_echo "no" >&6; }
2758fi
2759
2760
2761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765then
Xiang Zhang4c855572018-08-20 22:36:19 +08002766 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2767 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2768 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 GITVERSION=""
2771 GITTAG=""
2772 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773fi
2774
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
2778
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002779ac_aux_dir=
2780for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2781 if test -f "$ac_dir/install-sh"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/install-sh -c"
2784 break
2785 elif test -f "$ac_dir/install.sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install.sh -c"
2788 break
2789 elif test -f "$ac_dir/shtool"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/shtool install -c"
2792 break
2793 fi
2794done
2795if test -z "$ac_aux_dir"; then
2796 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2797fi
2798
2799# These three variables are undocumented and unsupported,
2800# and are intended to be withdrawn in a future Autoconf release.
2801# They can cause serious problems if a builder's source tree is in a directory
2802# whose full name contains unusual characters.
2803ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2804ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2805ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2806
2807
2808# Make sure we can run config.sub.
2809$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2810 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2811
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2813$as_echo_n "checking build system type... " >&6; }
2814if ${ac_cv_build+:} false; then :
2815 $as_echo_n "(cached) " >&6
2816else
2817 ac_build_alias=$build_alias
2818test "x$ac_build_alias" = x &&
2819 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2820test "x$ac_build_alias" = x &&
2821 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2822ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2823 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2824
2825fi
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2827$as_echo "$ac_cv_build" >&6; }
2828case $ac_cv_build in
2829*-*-*) ;;
2830*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2831esac
2832build=$ac_cv_build
2833ac_save_IFS=$IFS; IFS='-'
2834set x $ac_cv_build
2835shift
2836build_cpu=$1
2837build_vendor=$2
2838shift; shift
2839# Remember, the first character of IFS is used to create $*,
2840# except with old shells:
2841build_os=$*
2842IFS=$ac_save_IFS
2843case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2844
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2847$as_echo_n "checking host system type... " >&6; }
2848if ${ac_cv_host+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 if test "x$host_alias" = x; then
2852 ac_cv_host=$ac_cv_build
2853else
2854 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2855 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2856fi
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2860$as_echo "$ac_cv_host" >&6; }
2861case $ac_cv_host in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2864esac
2865host=$ac_cv_host
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_host
2868shift
2869host_cpu=$1
2870host_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874host_os=$*
2875IFS=$ac_save_IFS
2876case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2877
2878
2879
doko@python.orga10e4a92013-01-25 18:45:12 +01002880
2881
Ned Deilyfcbc2462014-08-22 13:32:49 -07002882# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2883rm -f pybuilddir.txt
2884
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885for ac_prog in python$PACKAGE_VERSION python3 python
2886do
2887 # Extract the first word of "$ac_prog", so it can be a program name with args.
2888set dummy $ac_prog; ac_word=$2
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2890$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002891if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002892 $as_echo_n "(cached) " >&6
2893else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 if test -n "$PYTHON_FOR_REGEN"; then
2895 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896else
2897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2898for as_dir in $PATH
2899do
2900 IFS=$as_save_IFS
2901 test -z "$as_dir" && as_dir=.
2902 for ac_exec_ext in '' $ac_executable_extensions; do
2903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2906 break 2
2907 fi
2908done
2909 done
2910IFS=$as_save_IFS
2911
2912fi
2913fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2915if test -n "$PYTHON_FOR_REGEN"; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2917$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918else
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2920$as_echo "no" >&6; }
2921fi
2922
2923
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
2929
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002930if test "$cross_compiling" = yes; then
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2932$as_echo_n "checking for python interpreter for cross build... " >&6; }
2933 if test -z "$PYTHON_FOR_BUILD"; then
2934 for interp in python$PACKAGE_VERSION python3 python; do
2935 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002936 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 +02002937 break
2938 fi
2939 interp=
2940 done
2941 if test x$interp = x; then
2942 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2943 fi
2944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2945$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002946 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 +02002947 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002948elif test "$cross_compiling" = maybe; then
2949 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002950else
2951 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily5489bda2018-01-31 17:44:09 -05002970VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001
3002
3003
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003004define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003005
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003006# Arguments passed to configure.
3007
3008CONFIG_ARGS="$ac_configure_args"
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3011$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003013if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003014 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003015 case $enableval in
3016 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003017 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 # information
3019 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003020 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3023 if test ! -d "${enableval}"
3024 then
3025 enableval=/
3026 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003028 ;;
3029 esac
3030 case $enableval in
3031 no)
3032 UNIVERSALSDK=
3033 enable_universalsdk=
3034 ;;
3035 *)
3036 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 if test ! -d "${UNIVERSALSDK}"
3038 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003039 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041 ;;
3042 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003043
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045else
3046
3047 UNIVERSALSDK=
3048 enable_universalsdk=
3049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052if test -n "${UNIVERSALSDK}"
3053then
Matthias Kloseb9621712010-04-24 17:59:49 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3055$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056else
Matthias Kloseb9621712010-04-24 17:59:49 +00003057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3058$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003062
Ned Deily87adb6e2013-10-18 21:09:56 -07003063ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003064
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065# For backward compatibility reasons we prefer to select '32-bit' if available,
3066# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003067UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068if test "`uname -s`" = "Darwin"
3069then
3070 if test -n "${UNIVERSALSDK}"
3071 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003072 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073 then
3074 UNIVERSAL_ARCHS="intel"
3075 fi
3076 fi
3077fi
3078
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3081$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082
3083# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003084if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 UNIVERSAL_ARCHS="$withval"
3087
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088fi
3089
Ned Deily87adb6e2013-10-18 21:09:56 -07003090if test -n "${UNIVERSALSDK}"
3091then
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3093$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3094else
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3096$as_echo "no" >&6; }
3097fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003098
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099
3100# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003101if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003102 withval=$with_framework_name;
3103 PYTHONFRAMEWORK=${withval}
3104 PYTHONFRAMEWORKDIR=${withval}.framework
3105 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3106
3107else
3108
3109 PYTHONFRAMEWORK=Python
3110 PYTHONFRAMEWORKDIR=Python.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3112
3113fi
3114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003118 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003119 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003120 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 esac
3122 case $enableval in
3123 no)
3124 PYTHONFRAMEWORK=
3125 PYTHONFRAMEWORKDIR=no-framework
3126 PYTHONFRAMEWORKPREFIX=
3127 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128 FRAMEWORKINSTALLFIRST=
3129 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 FRAMEWORKALTINSTALLFIRST=
3131 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003132 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003133 if test "x${prefix}" = "xNONE"; then
3134 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3135 else
3136 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3137 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003139 ;;
3140 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003143 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003144 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003145 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3146 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003147 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 if test "x${prefix}" = "xNONE" ; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 else
3154 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3155 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
3157 case "${enableval}" in
3158 /System*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 if test "${prefix}" = "NONE" ; then
3161 # See below
3162 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3163 fi
3164 ;;
3165
3166 /Library*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 ;;
3169
3170 */Library/Frameworks)
3171 MDIR="`dirname "${enableval}"`"
3172 MDIR="`dirname "${MDIR}"`"
3173 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3174
3175 if test "${prefix}" = "NONE"; then
3176 # User hasn't specified the
3177 # --prefix option, but wants to install
3178 # the framework in a non-default location,
3179 # ensure that the compatibility links get
3180 # installed relative to that prefix as well
3181 # instead of in /usr/local.
3182 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3183 fi
3184 ;;
3185
3186 *)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 ;;
3189 esac
3190
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3200
3201 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3202
Jack Jansene578a632001-08-15 01:27:14 +00003203 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Guido van Rossum563e7081996-09-10 18:20:48 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansene578a632001-08-15 01:27:14 +00003207 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003208 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORKPREFIX=
3210 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003211 FRAMEWORKINSTALLFIRST=
3212 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 FRAMEWORKALTINSTALLFIRST=
3214 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003215 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216 if test "x${prefix}" = "xNONE" ; then
3217 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3218 else
3219 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3220 fi
Jack Jansene578a632001-08-15 01:27:14 +00003221 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003222
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224fi
3225
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
3227
Michael W. Hudson54241132001-12-07 15:38:26 +00003228
3229
3230
3231
Jack Jansene578a632001-08-15 01:27:14 +00003232
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003233
3234
3235
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003236
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003237
Ned Deilyb8f944f2013-11-21 22:42:25 -08003238
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003239
3240cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003241#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003242_ACEOF
3243
3244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003261 *-*-linux-android*)
3262 ac_sys_system=Linux-android
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *-*-linux*)
3265 ac_sys_system=Linux
3266 ;;
3267 *-*-cygwin*)
3268 ac_sys_system=Cygwin
3269 ;;
3270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003292 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003295 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003297fi
Guido van Rossum91922671997-10-09 20:24:13 +00003298
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003299
3300if test "$cross_compiling" = yes; then
3301 case "$host" in
3302 *-*-linux*)
3303 case "$host_cpu" in
3304 arm*)
3305 _host_cpu=arm
3306 ;;
3307 *)
3308 _host_cpu=$host_cpu
3309 esac
3310 ;;
3311 *-*-cygwin*)
3312 _host_cpu=
3313 ;;
3314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3376 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3377 # identifies itself as Darwin/7.*
3378 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # disables platform specific features beyond repair.
3380 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # has no effect, don't bother defining them
3382 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003383 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003384 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3387 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3388 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003389 AIX/4)
3390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 AIX/5)
3392 if test `uname -r` -eq 1; then
3393 define_xopen_source=no
3394 fi
3395 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003396 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3397 # defining NI_NUMERICHOST.
3398 QNX/6.3.2)
3399 define_xopen_source=no
3400 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003401
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003402esac
3403
3404if test $define_xopen_source = yes
3405then
Victor Stinner14d098d2011-09-07 22:29:43 +02003406 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Victor Stinner14d098d2011-09-07 22:29:43 +02003408$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003409
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
3411 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3412 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3413 # several APIs are not declared. Since this is also needed in some
3414 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Matthias Kloseb9621712010-04-24 17:59:49 +00003416$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
3418
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003420$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003422fi
3423
Christian Heimes647cd872013-12-07 23:39:33 +01003424# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3425case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003426 hp*|HP*)
3427 define_stdc_a1=yes;;
3428 *)
3429 define_stdc_a1=no;;
3430esac
3431
3432if test $define_stdc_a1 = yes
3433then
Christian Heimes647cd872013-12-07 23:39:33 +01003434
3435$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3436
Christian Heimesb02bcae2013-12-08 15:21:08 +01003437fi
Christian Heimes647cd872013-12-07 23:39:33 +01003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3440# it may influence the way we can build extensions, so distutils
3441# needs to check it
3442
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003445EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003446
Guido van Rossum627b2d71993-12-24 10:39:16 +00003447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003448
3449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3450# for debug/optimization stuff. BASECFLAGS is for flags that are required
3451# just to get things to compile and link. Users are free to override OPT
3452# when running configure or make. The build should not break if they do.
3453# BASECFLAGS should generally not be messed with, however.
3454
Guido van Rossum8b131c51995-03-09 14:10:13 +00003455# If the user switches compilers, we can't believe the cache
3456if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3457then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003458 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003459(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460fi
3461
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003462# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3463# when the compiler supports them, but we don't always want -O2, and
3464# we set -g later.
3465if test -z "$CFLAGS"; then
3466 CFLAGS=
3467fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003468
3469if test "$ac_sys_system" = "Darwin"
3470then
3471 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003472 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473 # information
3474 if test -z "${CC}"
3475 then
3476 found_gcc=
3477 found_clang=
3478 as_save_IFS=$IFS; IFS=:
3479 for as_dir in $PATH
3480 do
3481 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003482 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003483 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003484 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003485 fi
3486 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 fi
3491 fi
3492 done
3493 IFS=$as_save_IFS
3494
3495 if test -n "$found_gcc" -a -n "$found_clang"
3496 then
3497 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3498 then
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3500$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3501 CC="$found_clang"
3502 CXX="$found_clang++"
3503 fi
3504
3505
3506 elif test -z "$found_gcc" -a -n "$found_clang"
3507 then
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3509$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3510 CC="$found_clang"
3511 CXX="$found_clang++"
3512
3513 elif test -z "$found_gcc" -a -z "$found_clang"
3514 then
3515 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3516 if test -n "${found_clang}"
3517 then
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3519$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3520 CC="${found_clang}"
3521 CXX="`/usr/bin/xcrun -find clang++`"
3522
3523 # else: use default behaviour
3524 fi
3525 fi
3526 fi
3527fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003528ac_ext=c
3529ac_cpp='$CPP $CPPFLAGS'
3530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3532ac_compiler_gnu=$ac_cv_c_compiler_gnu
3533if test -n "$ac_tool_prefix"; then
3534 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3535set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003538if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540else
3541 if test -n "$CC"; then
3542 ac_cv_prog_CC="$CC" # Let the user override the test.
3543else
Martin v. Löwis11437992002-04-12 09:54:03 +00003544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $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 +00003553 break 2
3554 fi
3555done
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003558
Jack Jansendd19cf82001-12-06 22:36:17 +00003559fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003562if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3564$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003565else
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003568fi
3569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572if test -z "$ac_cv_prog_CC"; then
3573 ac_ct_CC=$CC
3574 # Extract the first word of "gcc", so it can be a program name with args.
3575set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003580else
3581 if test -n "$ac_ct_CC"; then
3582 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3583else
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $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 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
3599fi
3600fi
3601ac_ct_CC=$ac_cv_prog_ac_ct_CC
3602if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3604$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 if test "x$ac_ct_CC" = x; then
3611 CC=""
3612 else
3613 case $cross_compiling:$ac_tool_warned in
3614yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617ac_tool_warned=yes ;;
3618esac
3619 CC=$ac_ct_CC
3620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624
Jack Jansendd19cf82001-12-06 22:36:17 +00003625if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 if test -n "$ac_tool_prefix"; then
3627 # 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 +00003628set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666if test -z "$CC"; then
3667 # Extract the first word of "cc", so it can be a program name with args.
3668set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003677 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3686 ac_prog_rejected=yes
3687 continue
3688 fi
3689 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697if test $ac_prog_rejected = yes; then
3698 # We found a bogon in the path, so make sure we never use it.
3699 set dummy $ac_cv_prog_CC
3700 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702 # We chose a different compiler from the bogus one.
3703 # However, it has the same basename, so the bogon will be chosen
3704 # first if we set CC to just the basename; use the full file name.
3705 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003706 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 fi
3708fi
3709fi
3710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715else
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 do
3726 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
3751fi
3752fi
3753CC=$ac_cv_prog_CC
3754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 test -n "$CC" && break
3764 done
3765fi
3766if test -z "$CC"; then
3767 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769do
3770 # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003776else
3777 if test -n "$ac_ct_CC"; then
3778 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $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 +00003789 break 2
3790 fi
3791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
3796fi
3797ac_ct_CC=$ac_cv_prog_ac_ct_CC
3798if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3800$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$ac_ct_CC" && break
3808done
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 if test "x$ac_ct_CC" = x; then
3811 CC=""
3812 else
3813 case $cross_compiling:$ac_tool_warned in
3814yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817ac_tool_warned=yes ;;
3818esac
3819 CC=$ac_ct_CC
3820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822
3823fi
3824
3825
Matthias Kloseb9621712010-04-24 17:59:49 +00003826test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003828as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003829See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
3831# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3833set X $ac_compile
3834ac_compiler=$2
3835for ac_option in --version -v -V -qversion; do
3836 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837case "(($ac_try" in
3838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3839 *) ac_try_echo=$ac_try;;
3840esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3842$as_echo "$ac_try_echo"; } >&5
3843 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 if test -s conftest.err; then
3846 sed '10a\
3847... rest of stderr output deleted ...
3848 10q' conftest.err >conftest.er1
3849 cat conftest.er1 >&5
3850 fi
3851 rm -f conftest.er1 conftest.err
3852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3853 test $ac_status = 0; }
3854done
Martin v. Löwis11437992002-04-12 09:54:03 +00003855
Matthias Kloseb9621712010-04-24 17:59:49 +00003856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003857/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859int
3860main ()
3861{
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003868ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003869# Try to create an executable without -o first, disregard a.out.
3870# It will help us diagnose broken compilers, and finding out an intuition
3871# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3873$as_echo_n "checking whether the C compiler works... " >&6; }
3874ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3875
3876# The possible output files:
3877ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_rmfiles=
3880for ac_file in $ac_files
3881do
3882 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3885 esac
3886done
3887rm -f $ac_rmfiles
3888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890case "(($ac_try" in
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3893esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3901# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3902# in a Makefile. We should not override ac_cv_exeext if it was cached,
3903# so that the user can short-circuit this test for compilers unknown to
3904# Autoconf.
3905for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003906do
3907 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910 ;;
3911 [ab].out )
3912 # We found the default executable, but exeext='' is most
3913 # certainly right.
3914 break;;
3915 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 then :; else
3918 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3919 fi
3920 # We set ac_cv_exeext here because the later test for it is not
3921 # safe: cross compilers may not add the suffix if given an `-o'
3922 # argument, so we may need to know it at that point already.
3923 # Even if this section looks crufty: it has the advantage of
3924 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925 break;;
3926 * )
3927 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 esac
3929done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930test "$ac_cv_exeext" = no && ac_cv_exeext=
3931
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003932else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_file=''
3934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if test -z "$ac_file"; then :
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003939sed 's/^/| /' conftest.$ac_ext >&5
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003945else
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3947$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3950$as_echo_n "checking for C compiler default output file name... " >&6; }
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3952$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954
Matthias Kloseb9621712010-04-24 17:59:49 +00003955rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3958$as_echo_n "checking for suffix of executables... " >&6; }
3959if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3971# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3972# work properly (i.e., refer to `conftest.exe'), while it won't with
3973# `rm'.
3974for ac_file in conftest.exe conftest conftest.*; do
3975 test -f "$ac_file" || continue
3976 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3979 break;;
3980 * ) break;;
3981 esac
3982done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f conftest conftest$ac_cv_exeext
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3991$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992
3993rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003994EXEEXT=$ac_cv_exeext
3995ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997/* end confdefs.h. */
3998#include <stdio.h>
3999int
4000main ()
4001{
4002FILE *f = fopen ("conftest.out", "w");
4003 return ferror (f) || fclose (f) != 0;
4004
4005 ;
4006 return 0;
4007}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files conftest.out"
4010# Check that the compiler produces executables we can run. If not, either
4011# the compiler is broken, or we cross compile.
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4013$as_echo_n "checking whether we are cross compiling... " >&6; }
4014if test "$cross_compiling" != yes; then
4015 { { ac_try="$ac_link"
4016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
4020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_link") 2>&5
4023 ac_status=$?
4024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }
4026 if { ac_try='./conftest$ac_cv_exeext'
4027 { { case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_try") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; }; then
4037 cross_compiling=no
4038 else
4039 if test "$cross_compiling" = maybe; then
4040 cross_compiling=yes
4041 else
4042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004045If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004046See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 fi
4048 fi
4049fi
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4051$as_echo "$cross_compiling" >&6; }
4052
4053rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4054ac_clean_files=$ac_clean_files_save
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4056$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004057if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 $as_echo_n "(cached) " >&6
4059else
4060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061/* end confdefs.h. */
4062
4063int
4064main ()
4065{
4066
4067 ;
4068 return 0;
4069}
4070_ACEOF
4071rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004072if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 for ac_file in conftest.o conftest.obj conftest.*; do
4084 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4088 break;;
4089 esac
4090done
4091else
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004093sed 's/^/| /' conftest.$ac_ext >&5
4094
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004097as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004099fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4103$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104OBJEXT=$ac_cv_objext
4105ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4107$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004108if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004113
Martin v. Löwis11437992002-04-12 09:54:03 +00004114int
4115main ()
4116{
4117#ifndef __GNUC__
4118 choke me
4119#endif
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_compiler_gnu=yes
4127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004131ac_cv_c_compiler_gnu=$ac_compiler_gnu
4132
4133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4135$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4136if test $ac_compiler_gnu = yes; then
4137 GCC=yes
4138else
4139 GCC=
4140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141ac_test_CFLAGS=${CFLAGS+set}
4142ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4144$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004145if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004147else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 ac_save_c_werror_flag=$ac_c_werror_flag
4149 ac_c_werror_flag=yes
4150 ac_cv_prog_cc_g=no
4151 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004164 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 CFLAGS=""
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180else
4181 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184/* end confdefs.h. */
4185
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202 ac_c_werror_flag=$ac_save_c_werror_flag
4203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4205$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004208elif test $ac_cv_prog_cc_g = yes; then
4209 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 CFLAGS="-g -O2"
4211 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 fi
4214else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 if test "$GCC" = yes; then
4216 CFLAGS="-O2"
4217 else
4218 CFLAGS=
4219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4222$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004223if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004227ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
4230#include <stdarg.h>
4231#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004232struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004233/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4234struct buf { int x; };
4235FILE * (*rcsopen) (struct buf *, struct stat *, int);
4236static char *e (p, i)
4237 char **p;
4238 int i;
4239{
4240 return p[i];
4241}
4242static char *f (char * (*g) (char **, int), char **p, ...)
4243{
4244 char *s;
4245 va_list v;
4246 va_start (v,p);
4247 s = g (p, va_arg (v,int));
4248 va_end (v);
4249 return s;
4250}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004251
4252/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4253 function prototypes and stuff, but not '\xHH' hex character constants.
4254 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4257 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004259int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4262 inside strings and character constants. */
4263#define FOO(x) 'x'
4264int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4265
Skip Montanaro6dead952003-09-25 14:50:04 +00004266int test (int i, double x);
4267struct s1 {int (*f) (int a);};
4268struct s2 {int (*f) (double a);};
4269int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4270int argc;
4271char **argv;
4272int
4273main ()
4274{
4275return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4276 ;
4277 return 0;
4278}
4279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4281 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004282do
4283 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287rm -f core conftest.err conftest.$ac_objext
4288 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004289done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291CC=$ac_save_CC
4292
4293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294# AC_CACHE_VAL
4295case "x$ac_cv_prog_cc_c89" in
4296 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4298$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4301$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004302 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4305$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004307if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004308
Matthias Kloseb9621712010-04-24 17:59:49 +00004309fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004310
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_ext=c
4312ac_cpp='$CPP $CPPFLAGS'
4313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4315ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004317ac_ext=c
4318ac_cpp='$CPP $CPPFLAGS'
4319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4321ac_compiler_gnu=$ac_cv_c_compiler_gnu
4322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4323$as_echo_n "checking how to run the C preprocessor... " >&6; }
4324# On Suns, sometimes $CPP names a directory.
4325if test -n "$CPP" && test -d "$CPP"; then
4326 CPP=
4327fi
4328if test -z "$CPP"; then
4329 if ${ac_cv_prog_CPP+:} false; then :
4330 $as_echo_n "(cached) " >&6
4331else
4332 # Double quotes because CPP needs to be expanded
4333 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4334 do
4335 ac_preproc_ok=false
4336for ac_c_preproc_warn_flag in '' yes
4337do
4338 # Use a header file that comes with gcc, so configuring glibc
4339 # with a fresh cross-compiler works.
4340 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4341 # <limits.h> exists even on freestanding compilers.
4342 # On the NeXT, cc -E runs the code through the compiler's parser,
4343 # not just through cpp. "Syntax error" is here to catch this case.
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345/* end confdefs.h. */
4346#ifdef __STDC__
4347# include <limits.h>
4348#else
4349# include <assert.h>
4350#endif
4351 Syntax error
4352_ACEOF
4353if ac_fn_c_try_cpp "$LINENO"; then :
4354
4355else
4356 # Broken: fails on valid input.
4357continue
4358fi
4359rm -f conftest.err conftest.i conftest.$ac_ext
4360
4361 # OK, works on sane cases. Now check whether nonexistent headers
4362 # can be detected and how.
4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364/* end confdefs.h. */
4365#include <ac_nonexistent.h>
4366_ACEOF
4367if ac_fn_c_try_cpp "$LINENO"; then :
4368 # Broken: success on invalid input.
4369continue
4370else
4371 # Passes both tests.
4372ac_preproc_ok=:
4373break
4374fi
4375rm -f conftest.err conftest.i conftest.$ac_ext
4376
4377done
4378# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4379rm -f conftest.i conftest.err conftest.$ac_ext
4380if $ac_preproc_ok; then :
4381 break
4382fi
4383
4384 done
4385 ac_cv_prog_CPP=$CPP
4386
4387fi
4388 CPP=$ac_cv_prog_CPP
4389else
4390 ac_cv_prog_CPP=$CPP
4391fi
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4393$as_echo "$CPP" >&6; }
4394ac_preproc_ok=false
4395for ac_c_preproc_warn_flag in '' yes
4396do
4397 # Use a header file that comes with gcc, so configuring glibc
4398 # with a fresh cross-compiler works.
4399 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4400 # <limits.h> exists even on freestanding compilers.
4401 # On the NeXT, cc -E runs the code through the compiler's parser,
4402 # not just through cpp. "Syntax error" is here to catch this case.
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404/* end confdefs.h. */
4405#ifdef __STDC__
4406# include <limits.h>
4407#else
4408# include <assert.h>
4409#endif
4410 Syntax error
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413
4414else
4415 # Broken: fails on valid input.
4416continue
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420 # OK, works on sane cases. Now check whether nonexistent headers
4421 # can be detected and how.
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4423/* end confdefs.h. */
4424#include <ac_nonexistent.h>
4425_ACEOF
4426if ac_fn_c_try_cpp "$LINENO"; then :
4427 # Broken: success on invalid input.
4428continue
4429else
4430 # Passes both tests.
4431ac_preproc_ok=:
4432break
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436done
4437# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4438rm -f conftest.i conftest.err conftest.$ac_ext
4439if $ac_preproc_ok; then :
4440
4441else
4442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4444as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4445See \`config.log' for more details" "$LINENO" 5; }
4446fi
4447
4448ac_ext=c
4449ac_cpp='$CPP $CPPFLAGS'
4450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452ac_compiler_gnu=$ac_cv_c_compiler_gnu
4453
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4455$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4456if ${ac_cv_path_GREP+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458else
4459 if test -z "$GREP"; then
4460 ac_path_GREP_found=false
4461 # Loop through the user's path and test for each of PROGNAME-LIST
4462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4464do
4465 IFS=$as_save_IFS
4466 test -z "$as_dir" && as_dir=.
4467 for ac_prog in grep ggrep; do
4468 for ac_exec_ext in '' $ac_executable_extensions; do
4469 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4470 as_fn_executable_p "$ac_path_GREP" || continue
4471# Check for GNU ac_path_GREP and select it if it is found.
4472 # Check for GNU $ac_path_GREP
4473case `"$ac_path_GREP" --version 2>&1` in
4474*GNU*)
4475 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4476*)
4477 ac_count=0
4478 $as_echo_n 0123456789 >"conftest.in"
4479 while :
4480 do
4481 cat "conftest.in" "conftest.in" >"conftest.tmp"
4482 mv "conftest.tmp" "conftest.in"
4483 cp "conftest.in" "conftest.nl"
4484 $as_echo 'GREP' >> "conftest.nl"
4485 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4486 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4487 as_fn_arith $ac_count + 1 && ac_count=$as_val
4488 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4489 # Best one so far, save it but keep looking for a better one
4490 ac_cv_path_GREP="$ac_path_GREP"
4491 ac_path_GREP_max=$ac_count
4492 fi
4493 # 10*(2^10) chars as input seems more than enough
4494 test $ac_count -gt 10 && break
4495 done
4496 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4497esac
4498
4499 $ac_path_GREP_found && break 3
4500 done
4501 done
4502 done
4503IFS=$as_save_IFS
4504 if test -z "$ac_cv_path_GREP"; then
4505 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4506 fi
4507else
4508 ac_cv_path_GREP=$GREP
4509fi
4510
4511fi
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4513$as_echo "$ac_cv_path_GREP" >&6; }
4514 GREP="$ac_cv_path_GREP"
4515
4516
Łukasz Langaa785c872016-09-09 17:37:37 -07004517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4518$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4519if ${ac_cv_path_SED+:} false; then :
4520 $as_echo_n "(cached) " >&6
4521else
4522 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4523 for ac_i in 1 2 3 4 5 6 7; do
4524 ac_script="$ac_script$as_nl$ac_script"
4525 done
4526 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4527 { ac_script=; unset ac_script;}
4528 if test -z "$SED"; then
4529 ac_path_SED_found=false
4530 # Loop through the user's path and test for each of PROGNAME-LIST
4531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534 IFS=$as_save_IFS
4535 test -z "$as_dir" && as_dir=.
4536 for ac_prog in sed gsed; do
4537 for ac_exec_ext in '' $ac_executable_extensions; do
4538 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4539 as_fn_executable_p "$ac_path_SED" || continue
4540# Check for GNU ac_path_SED and select it if it is found.
4541 # Check for GNU $ac_path_SED
4542case `"$ac_path_SED" --version 2>&1` in
4543*GNU*)
4544 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4545*)
4546 ac_count=0
4547 $as_echo_n 0123456789 >"conftest.in"
4548 while :
4549 do
4550 cat "conftest.in" "conftest.in" >"conftest.tmp"
4551 mv "conftest.tmp" "conftest.in"
4552 cp "conftest.in" "conftest.nl"
4553 $as_echo '' >> "conftest.nl"
4554 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4555 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4556 as_fn_arith $ac_count + 1 && ac_count=$as_val
4557 if test $ac_count -gt ${ac_path_SED_max-0}; then
4558 # Best one so far, save it but keep looking for a better one
4559 ac_cv_path_SED="$ac_path_SED"
4560 ac_path_SED_max=$ac_count
4561 fi
4562 # 10*(2^10) chars as input seems more than enough
4563 test $ac_count -gt 10 && break
4564 done
4565 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4566esac
4567
4568 $ac_path_SED_found && break 3
4569 done
4570 done
4571 done
4572IFS=$as_save_IFS
4573 if test -z "$ac_cv_path_SED"; then
4574 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4575 fi
4576else
4577 ac_cv_path_SED=$SED
4578fi
4579
4580fi
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4582$as_echo "$ac_cv_path_SED" >&6; }
4583 SED="$ac_cv_path_SED"
4584 rm -f conftest.sed
4585
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004586
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004587
4588
Matthias Kloseb9621712010-04-24 17:59:49 +00004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4590$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004593if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004594 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595
4596 case $withval in
4597 no) with_cxx_main=no
4598 MAINCC='$(CC)';;
4599 yes) with_cxx_main=yes
4600 MAINCC='$(CXX)';;
4601 *) with_cxx_main=yes
4602 MAINCC=$withval
4603 if test -z "$CXX"
4604 then
4605 CXX=$withval
4606 fi;;
4607 esac
4608else
4609
4610 with_cxx_main=no
4611 MAINCC='$(CC)'
4612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613fi
4614
Matthias Kloseb9621712010-04-24 17:59:49 +00004615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4616$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618preset_cxx="$CXX"
4619if test -z "$CXX"
4620then
4621 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004622 gcc) if test -n "$ac_tool_prefix"; then
4623 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4624set dummy ${ac_tool_prefix}g++; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_CXX+:} false; then :
4628 $as_echo_n "(cached) " >&6
4629else
4630 case $CXX in
4631 [\\/]* | ?:[\\/]*)
4632 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4633 ;;
4634 *)
4635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in notfound
4637do
4638 IFS=$as_save_IFS
4639 test -z "$as_dir" && as_dir=.
4640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004642 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644 break 2
4645 fi
4646done
4647 done
4648IFS=$as_save_IFS
4649
4650 ;;
4651esac
4652fi
4653CXX=$ac_cv_path_CXX
4654if test -n "$CXX"; then
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4656$as_echo "$CXX" >&6; }
4657else
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663fi
4664if test -z "$ac_cv_path_CXX"; then
4665 ac_pt_CXX=$CXX
4666 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670if ${ac_cv_path_ac_pt_CXX+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 case $ac_pt_CXX in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in notfound
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004685 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687 break 2
4688 fi
4689done
4690 done
4691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4697if test -n "$ac_pt_CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4699$as_echo "$ac_pt_CXX" >&6; }
4700else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705 if test "x$ac_pt_CXX" = x; then
4706 CXX="g++"
4707 else
4708 case $cross_compiling:$ac_tool_warned in
4709yes:)
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4712ac_tool_warned=yes ;;
4713esac
4714 CXX=$ac_pt_CXX
4715 fi
4716else
4717 CXX="$ac_cv_path_CXX"
4718fi
4719 ;;
4720 cc) if test -n "$ac_tool_prefix"; then
4721 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4722set dummy ${ac_tool_prefix}c++; ac_word=$2
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004725if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004726 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004727else
4728 case $CXX in
4729 [\\/]* | ?:[\\/]*)
4730 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4731 ;;
4732 *)
4733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734for as_dir in notfound
4735do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 break 2
4743 fi
4744done
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 ;;
4749esac
4750fi
4751CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004752if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4754$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004755else
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004759
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760
4761fi
4762if test -z "$ac_cv_path_CXX"; then
4763 ac_pt_CXX=$CXX
4764 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773 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 +00004774 ;;
4775 *)
4776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in notfound
4778do
4779 IFS=$as_save_IFS
4780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004783 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 break 2
4786 fi
4787done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ;;
4792esac
4793fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4795if test -n "$ac_pt_CXX"; then
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4797$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803 if test "x$ac_pt_CXX" = x; then
4804 CXX="c++"
4805 else
4806 case $cross_compiling:$ac_tool_warned in
4807yes:)
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4810ac_tool_warned=yes ;;
4811esac
4812 CXX=$ac_pt_CXX
4813 fi
4814else
4815 CXX="$ac_cv_path_CXX"
4816fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 clang|*/clang) if test -n "$ac_tool_prefix"; then
4819 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4820set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if ${ac_cv_path_CXX+:} false; then :
4824 $as_echo_n "(cached) " >&6
4825else
4826 case $CXX in
4827 [\\/]* | ?:[\\/]*)
4828 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4829 ;;
4830 *)
4831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in notfound
4833do
4834 IFS=$as_save_IFS
4835 test -z "$as_dir" && as_dir=.
4836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004838 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4840 break 2
4841 fi
4842done
4843 done
4844IFS=$as_save_IFS
4845
Ned Deilycbfb9a52012-06-23 16:02:19 -07004846 ;;
4847esac
4848fi
4849CXX=$ac_cv_path_CXX
4850if test -n "$CXX"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4852$as_echo "$CXX" >&6; }
4853else
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858
4859fi
4860if test -z "$ac_cv_path_CXX"; then
4861 ac_pt_CXX=$CXX
4862 # Extract the first word of "clang++", so it can be a program name with args.
4863set dummy clang++; ac_word=$2
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_ac_pt_CXX+:} false; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 case $ac_pt_CXX in
4870 [\\/]* | ?:[\\/]*)
4871 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4872 ;;
4873 *)
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in notfound
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004881 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
4889 ;;
4890esac
4891fi
4892ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4893if test -n "$ac_pt_CXX"; then
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4895$as_echo "$ac_pt_CXX" >&6; }
4896else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
4901 if test "x$ac_pt_CXX" = x; then
4902 CXX="clang++"
4903 else
4904 case $cross_compiling:$ac_tool_warned in
4905yes:)
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4908ac_tool_warned=yes ;;
4909esac
4910 CXX=$ac_pt_CXX
4911 fi
4912else
4913 CXX="$ac_cv_path_CXX"
4914fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004915 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004916 icc|*/icc) if test -n "$ac_tool_prefix"; then
4917 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4918set dummy ${ac_tool_prefix}icpc; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_CXX+:} false; then :
4922 $as_echo_n "(cached) " >&6
4923else
4924 case $CXX in
4925 [\\/]* | ?:[\\/]*)
4926 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4927 ;;
4928 *)
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in notfound
4931do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_exec_ext in '' $ac_executable_extensions; do
4935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938 break 2
4939 fi
4940done
4941 done
4942IFS=$as_save_IFS
4943
4944 ;;
4945esac
4946fi
4947CXX=$ac_cv_path_CXX
4948if test -n "$CXX"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4950$as_echo "$CXX" >&6; }
4951else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957fi
4958if test -z "$ac_cv_path_CXX"; then
4959 ac_pt_CXX=$CXX
4960 # Extract the first word of "icpc", so it can be a program name with args.
4961set dummy icpc; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_ac_pt_CXX+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966else
4967 case $ac_pt_CXX in
4968 [\\/]* | ?:[\\/]*)
4969 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4970 ;;
4971 *)
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in notfound
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987 ;;
4988esac
4989fi
4990ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4991if test -n "$ac_pt_CXX"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4993$as_echo "$ac_pt_CXX" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999 if test "x$ac_pt_CXX" = x; then
5000 CXX="icpc"
5001 else
5002 case $cross_compiling:$ac_tool_warned in
5003yes:)
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5006ac_tool_warned=yes ;;
5007esac
5008 CXX=$ac_pt_CXX
5009 fi
5010else
5011 CXX="$ac_cv_path_CXX"
5012fi
5013 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014 esac
5015 if test "$CXX" = "notfound"
5016 then
5017 CXX=""
5018 fi
5019fi
5020if test -z "$CXX"
5021then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005022 if test -n "$ac_tool_prefix"; then
5023 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5024 do
5025 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005029if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005031else
5032 if test -n "$CXX"; then
5033 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5034else
5035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038 IFS=$as_save_IFS
5039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005042 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005044 break 2
5045 fi
5046done
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049
5050fi
5051fi
5052CXX=$ac_cv_prog_CXX
5053if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5055$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056else
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059fi
5060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005062 test -n "$CXX" && break
5063 done
5064fi
5065if test -z "$CXX"; then
5066 ac_ct_CXX=$CXX
5067 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5068do
5069 # Extract the first word of "$ac_prog", so it can be a program name with args.
5070set dummy $ac_prog; ac_word=$2
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072$as_echo_n "checking for $ac_word... " >&6; }
5073if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5074 $as_echo_n "(cached) " >&6
5075else
5076 if test -n "$ac_ct_CXX"; then
5077 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5078else
5079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 ac_cv_prog_ac_ct_CXX="$ac_prog"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5089 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 done
5092IFS=$as_save_IFS
5093
5094fi
5095fi
5096ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5097if test -n "$ac_ct_CXX"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5099$as_echo "$ac_ct_CXX" >&6; }
5100else
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106 test -n "$ac_ct_CXX" && break
5107done
5108
5109 if test "x$ac_ct_CXX" = x; then
5110 CXX="notfound"
5111 else
5112 case $cross_compiling:$ac_tool_warned in
5113yes:)
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5116ac_tool_warned=yes ;;
5117esac
5118 CXX=$ac_ct_CXX
5119 fi
5120fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122 if test "$CXX" = "notfound"
5123 then
5124 CXX=""
5125 fi
5126fi
5127if test "$preset_cxx" != "$CXX"
5128then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005129 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005130
5131 By default, distutils will build C++ extension modules with \"$CXX\".
5132 If this is not intended, then set CXX on the configure command line.
5133 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005134$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135
5136 By default, distutils will build C++ extension modules with \"$CXX\".
5137 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005138 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139fi
5140
5141
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005142MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5143
5144
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5146$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5147cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef bfin
5149#undef cris
5150#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005152#undef hppa
5153#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005154#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005156#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005157#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005158#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005159#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005160 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005161#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162# if defined(__x86_64__) && defined(__LP64__)
5163 x86_64-linux-gnu
5164# elif defined(__x86_64__) && defined(__ILP32__)
5165 x86_64-linux-gnux32
5166# elif defined(__i386__)
5167 i386-linux-gnu
5168# elif defined(__aarch64__) && defined(__AARCH64EL__)
5169# if defined(__ILP32__)
5170 aarch64_ilp32-linux-gnu
5171# else
5172 aarch64-linux-gnu
5173# endif
5174# elif defined(__aarch64__) && defined(__AARCH64EB__)
5175# if defined(__ILP32__)
5176 aarch64_be_ilp32-linux-gnu
5177# else
5178 aarch64_be-linux-gnu
5179# endif
5180# elif defined(__alpha__)
5181 alpha-linux-gnu
5182# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5183# if defined(__ARMEL__)
5184 arm-linux-gnueabihf
5185# else
5186 armeb-linux-gnueabihf
5187# endif
5188# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5189# if defined(__ARMEL__)
5190 arm-linux-gnueabi
5191# else
5192 armeb-linux-gnueabi
5193# endif
5194# elif defined(__hppa__)
5195 hppa-linux-gnu
5196# elif defined(__ia64__)
5197 ia64-linux-gnu
5198# elif defined(__m68k__) && !defined(__mcoldfire__)
5199 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005200# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5201# if _MIPS_SIM == _ABIO32
5202 mipsisa32r6el-linux-gnu
5203# elif _MIPS_SIM == _ABIN32
5204 mipsisa64r6el-linux-gnuabin32
5205# elif _MIPS_SIM == _ABI64
5206 mipsisa64r6el-linux-gnuabi64
5207# else
5208# error unknown platform triplet
5209# endif
5210# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5211# if _MIPS_SIM == _ABIO32
5212 mipsisa32r6-linux-gnu
5213# elif _MIPS_SIM == _ABIN32
5214 mipsisa64r6-linux-gnuabin32
5215# elif _MIPS_SIM == _ABI64
5216 mipsisa64r6-linux-gnuabi64
5217# else
5218# error unknown platform triplet
5219# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005262# elif defined(__riscv)
5263# if __riscv_xlen == 32
5264 riscv32-linux-gnu
5265# elif __riscv_xlen == 64
5266 riscv64-linux-gnu
5267# else
5268# error unknown platform triplet
5269# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__FreeBSD_kernel__)
5274# if defined(__LP64__)
5275 x86_64-kfreebsd-gnu
5276# elif defined(__i386__)
5277 i386-kfreebsd-gnu
5278# else
5279# error unknown platform triplet
5280# endif
5281#elif defined(__gnu_hurd__)
5282 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005283#elif defined(__APPLE__)
5284 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005285#else
5286# error unknown platform triplet
5287#endif
5288
5289EOF
5290
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005291if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5294$as_echo "$PLATFORM_TRIPLET" >&6; }
5295else
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5297$as_echo "none" >&6; }
5298fi
5299rm -f conftest.c conftest.out
5300
5301if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5302 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5303 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5304 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005305elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5306 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005308
doko@ubuntu.com55532312016-06-14 08:55:19 +02005309if test x$MULTIARCH != x; then
5310 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5311fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312
5313
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5315$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5316save_LDFLAGS="$LDFLAGS"
5317LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005318
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320/* end confdefs.h. */
5321
5322int
5323main ()
5324{
5325
5326 ;
5327 return 0;
5328}
5329_ACEOF
5330if ac_fn_c_try_link "$LINENO"; then :
5331 NO_AS_NEEDED="-Wl,--no-as-needed"
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5333$as_echo "yes" >&6; }
5334else
5335 NO_AS_NEEDED=""
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5337$as_echo "no" >&6; }
5338fi
5339rm -f core conftest.err conftest.$ac_objext \
5340 conftest$ac_exeext conftest.$ac_ext
5341LDFLAGS="$save_LDFLAGS"
5342
5343
5344
5345# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5348$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005349if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005351else
5352 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5353 then ac_cv_path_EGREP="$GREP -E"
5354 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 # Loop through the user's path and test for each of PROGNAME-LIST
5358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5360do
5361 IFS=$as_save_IFS
5362 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 for ac_prog in egrep; do
5364 for ac_exec_ext in '' $ac_executable_extensions; do
5365 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005366 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005367# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 # Check for GNU $ac_path_EGREP
5369case `"$ac_path_EGREP" --version 2>&1` in
5370*GNU*)
5371 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5372*)
5373 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 while :
5376 do
5377 cat "conftest.in" "conftest.in" >"conftest.tmp"
5378 mv "conftest.tmp" "conftest.in"
5379 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5382 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5385 # Best one so far, save it but keep looking for a better one
5386 ac_cv_path_EGREP="$ac_path_EGREP"
5387 ac_path_EGREP_max=$ac_count
5388 fi
5389 # 10*(2^10) chars as input seems more than enough
5390 test $ac_count -gt 10 && break
5391 done
5392 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5393esac
5394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $ac_path_EGREP_found && break 3
5396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005401 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 +00005402 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403else
5404 ac_cv_path_EGREP=$EGREP
5405fi
5406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407 fi
5408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5410$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005412
5413
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5415$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005416if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 $as_echo_n "(cached) " >&6
5418else
5419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005420/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005421#include <stdlib.h>
5422#include <stdarg.h>
5423#include <string.h>
5424#include <float.h>
5425
5426int
5427main ()
5428{
5429
5430 ;
5431 return 0;
5432}
5433_ACEOF
5434if ac_fn_c_try_compile "$LINENO"; then :
5435 ac_cv_header_stdc=yes
5436else
5437 ac_cv_header_stdc=no
5438fi
5439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5440
5441if test $ac_cv_header_stdc = yes; then
5442 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5444/* end confdefs.h. */
5445#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005446
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005447_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451else
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005454rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
Matthias Kloseb9621712010-04-24 17:59:49 +00005456fi
5457
5458if test $ac_cv_header_stdc = yes; then
5459 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h. */
5462#include <stdlib.h>
5463
5464_ACEOF
5465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5466 $EGREP "free" >/dev/null 2>&1; then :
5467
5468else
5469 ac_cv_header_stdc=no
5470fi
5471rm -f conftest*
5472
5473fi
5474
5475if test $ac_cv_header_stdc = yes; then
5476 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5477 if test "$cross_compiling" = yes; then :
5478 :
5479else
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <ctype.h>
5483#include <stdlib.h>
5484#if ((' ' & 0x0FF) == 0x020)
5485# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5486# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5487#else
5488# define ISLOWER(c) \
5489 (('a' <= (c) && (c) <= 'i') \
5490 || ('j' <= (c) && (c) <= 'r') \
5491 || ('s' <= (c) && (c) <= 'z'))
5492# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5493#endif
5494
5495#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5496int
5497main ()
5498{
5499 int i;
5500 for (i = 0; i < 256; i++)
5501 if (XOR (islower (i), ISLOWER (i))
5502 || toupper (i) != TOUPPER (i))
5503 return 2;
5504 return 0;
5505}
5506_ACEOF
5507if ac_fn_c_try_run "$LINENO"; then :
5508
5509else
5510 ac_cv_header_stdc=no
5511fi
5512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5513 conftest.$ac_objext conftest.beam conftest.$ac_ext
5514fi
5515
5516fi
5517fi
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5519$as_echo "$ac_cv_header_stdc" >&6; }
5520if test $ac_cv_header_stdc = yes; then
5521
5522$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5523
5524fi
5525
5526# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5527for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5528 inttypes.h stdint.h unistd.h
5529do :
5530 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5532"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005533if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005534 cat >>confdefs.h <<_ACEOF
5535#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5536_ACEOF
5537
5538fi
5539
5540done
5541
5542
5543
5544 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 +02005545if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 MINIX=yes
5547else
5548 MINIX=
5549fi
5550
5551
5552 if test "$MINIX" = yes; then
5553
5554$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5555
5556
5557$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5558
5559
5560$as_echo "#define _MINIX 1" >>confdefs.h
5561
5562 fi
5563
5564
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5566$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005567if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 $as_echo_n "(cached) " >&6
5569else
5570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5571/* end confdefs.h. */
5572
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005573# define __EXTENSIONS__ 1
5574 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005575int
5576main ()
5577{
5578
5579 ;
5580 return 0;
5581}
5582_ACEOF
5583if ac_fn_c_try_compile "$LINENO"; then :
5584 ac_cv_safe_to_define___extensions__=yes
5585else
5586 ac_cv_safe_to_define___extensions__=no
5587fi
5588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5589fi
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5591$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5592 test $ac_cv_safe_to_define___extensions__ = yes &&
5593 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5594
5595 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5596
5597 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5598
5599 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5600
5601 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5602
5603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604
Xavier de Gaye95750b12016-07-09 11:05:42 +02005605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5606$as_echo_n "checking for the Android API level... " >&6; }
5607cat >> conftest.c <<EOF
5608#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005609android_api = __ANDROID_API__
5610arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005611#else
5612#error not Android
5613#endif
5614EOF
5615
5616if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005617 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5618 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5620$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005621 if test -z "$ANDROID_API_LEVEL"; then
5622 echo 'Fatal: you must define __ANDROID_API__'
5623 exit 1
5624 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625
5626cat >>confdefs.h <<_ACEOF
5627#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5628_ACEOF
5629
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005630
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5632$as_echo_n "checking for the Android arm ABI... " >&6; }
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5634$as_echo "$_arm_arch" >&6; }
5635 if test "$_arm_arch" = 7; then
5636 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5637 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5638 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639else
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5641$as_echo "not Android" >&6; }
5642fi
5643rm -f conftest.c conftest.out
5644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645# Check for unsupported systems
5646case $ac_sys_system/$ac_sys_release in
5647atheos*|Linux*/1*)
5648 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5649 echo See README for details.
5650 exit 1;;
5651esac
5652
5653
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5655$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656
5657# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005658if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 withval=$with_suffix;
5660 case $withval in
5661 no) EXEEXT=;;
5662 yes) EXEEXT=.exe;;
5663 *) EXEEXT=$withval;;
5664 esac
5665fi
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5668$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669
5670# Test whether we're running on a non-case-sensitive system, in which
5671# case we give a warning if no ext is given
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5674$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675if test ! -d CaseSensitiveTestDir; then
5676mkdir CaseSensitiveTestDir
5677fi
5678
5679if test -d casesensitivetestdir
5680then
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5682$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 BUILDEXEEXT=.exe
5684else
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5686$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 BUILDEXEEXT=$EXEEXT
5688fi
5689rmdir CaseSensitiveTestDir
5690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691case $ac_sys_system in
5692hp*|HP*)
5693 case $CC in
5694 cc|*/cc) CC="$CC -Ae";;
5695 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696esac
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5700$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701if test -z "$LIBRARY"
5702then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005703 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5706$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708# LDLIBRARY is the name of the library to link against (as opposed to the
5709# name of the library into which to insert object files). BLDLIBRARY is also
5710# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5711# is blank as the main program is not linked directly against LDLIBRARY.
5712# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5713# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5714# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5715# DLLLIBRARY is the shared (i.e., DLL) library.
5716#
5717# RUNSHARED is used to run shared python without installed libraries
5718#
5719# INSTSONAME is the name of the shared library that will be use to install
5720# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005721#
5722# LDVERSION is the shared library version number, normally the Python version
5723# with the ABI build flags appended.
5724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726
5727
5728
5729
5730
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732LDLIBRARY="$LIBRARY"
5733BLDLIBRARY='$(LDLIBRARY)'
5734INSTSONAME='$(LDLIBRARY)'
5735DLLLIBRARY=''
5736LDLIBRARYDIR=''
5737RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005738LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740# LINKCC is the command that links the python executable -- default is $(CC).
5741# If CXX is set, and if it is needed to link a main function that was
5742# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5743# python might then depend on the C++ runtime
5744# This is altered for AIX in order to build the export list before
5745# linking.
5746
Matthias Kloseb9621712010-04-24 17:59:49 +00005747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5748$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749if test -z "$LINKCC"
5750then
5751 LINKCC='$(PURIFY) $(MAINCC)'
5752 case $ac_sys_system in
5753 AIX*)
5754 exp_extra="\"\""
5755 if test $ac_sys_release -ge 5 -o \
5756 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5757 exp_extra="."
5758 fi
5759 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760 QNX*)
5761 # qcc must be used because the other compilers do not
5762 # support -N.
5763 LINKCC=qcc;;
5764 esac
5765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5767$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768
5769# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5770# make sure we default having it set to "no": this is used by
5771# distutils.unixccompiler to know if it should add --enable-new-dtags
5772# to linker command lines, and failing to detect GNU ld simply results
5773# in the same bahaviour as before.
5774
Matthias Kloseb9621712010-04-24 17:59:49 +00005775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5776$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777ac_prog=ld
5778if test "$GCC" = yes; then
5779 ac_prog=`$CC -print-prog-name=ld`
5780fi
5781case `"$ac_prog" -V 2>&1 < /dev/null` in
5782 *GNU*)
5783 GNULD=yes;;
5784 *)
5785 GNULD=no;;
5786esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5788$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5791$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005793if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794 enableval=$enable_shared;
5795fi
5796
5797
5798if test -z "$enable_shared"
5799then
5800 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005801 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 enable_shared="yes";;
5803 *)
5804 enable_shared="no";;
5805 esac
5806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5808$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5811$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005814 enableval=$enable_profiling;
5815fi
5816
5817if test "x$enable_profiling" = xyes; then
5818 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005819 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822int main() { return 0; }
5823_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005824if ac_fn_c_try_link "$LINENO"; then :
5825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829rm -f core conftest.err conftest.$ac_objext \
5830 conftest$ac_exeext conftest.$ac_ext
5831 CC="$ac_save_cc"
5832else
5833 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5836$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838if test "x$enable_profiling" = xyes; then
5839 BASECFLAGS="-pg $BASECFLAGS"
5840 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
5842
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5844$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
5846# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5847# library that we build, but we do not want to link against it (we
5848# will find it with a -framework option). For this reason there is an
5849# extra variable BLDLIBRARY against which Python and the extension
5850# modules are linked, BLDLIBRARY. This is normally the same as
5851# LDLIBRARY, but empty for MacOSX framework builds.
5852if test "$enable_framework"
5853then
5854 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005855 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856 BLDLIBRARY=''
5857else
5858 BLDLIBRARY='$(LDLIBRARY)'
5859fi
5860
5861# Other platforms follow
5862if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005863 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
5867 case $ac_sys_system in
5868 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005869 LDLIBRARY='libpython$(LDVERSION).dll.a'
5870 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871 ;;
5872 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005873 LDLIBRARY='libpython$(LDVERSION).so'
5874 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005875 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005877 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005878 then
5879 PY3LIBRARY=libpython3.so
5880 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005882 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 LDLIBRARY='libpython$(LDVERSION).so'
5884 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005885 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005887 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005888 then
5889 PY3LIBRARY=libpython3.so
5890 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 hp*|HP*)
5893 case `uname -m` in
5894 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
5897 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ;;
5900 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005902 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).dylib'
5906 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005909 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005911 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005912 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
5914 esac
5915else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005916 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 case $ac_sys_system in
5918 CYGWIN*)
5919 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
5922 esac
5923fi
5924
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005925if test "$cross_compiling" = yes; then
5926 RUNSHARED=
5927fi
5928
Matthias Kloseb9621712010-04-24 17:59:49 +00005929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5930$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005933if test -n "$ac_tool_prefix"; then
5934 for ac_prog in ar aal
5935 do
5936 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5937set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5939$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005940if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942else
5943 if test -n "$AR"; then
5944 ac_cv_prog_AR="$AR" # Let the user override the test.
5945else
5946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949 IFS=$as_save_IFS
5950 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 break 2
5956 fi
5957done
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959IFS=$as_save_IFS
5960
5961fi
5962fi
5963AR=$ac_cv_prog_AR
5964if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5966$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
5972
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 test -n "$AR" && break
5974 done
5975fi
5976if test -z "$AR"; then
5977 ac_ct_AR=$AR
5978 for ac_prog in ar aal
5979do
5980 # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_ac_ct_AR+:} false; then :
5985 $as_echo_n "(cached) " >&6
5986else
5987 if test -n "$ac_ct_AR"; then
5988 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
5995 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005997 ac_cv_prog_ac_ct_AR="$ac_prog"
5998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999 break 2
6000 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002 done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007ac_ct_AR=$ac_cv_prog_ac_ct_AR
6008if test -n "$ac_ct_AR"; then
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6010$as_echo "$ac_ct_AR" >&6; }
6011else
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017 test -n "$ac_ct_AR" && break
6018done
6019
6020 if test "x$ac_ct_AR" = x; then
6021 AR="ar"
6022 else
6023 case $cross_compiling:$ac_tool_warned in
6024yes:)
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6026$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6027ac_tool_warned=yes ;;
6028esac
6029 AR=$ac_ct_AR
6030 fi
6031fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033
6034# tweak ARFLAGS only if the user didn't set it on the command line
6035
6036if test -z "$ARFLAGS"
6037then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006038 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
6040
doko@ubuntu.com58844492012-06-30 18:25:32 +02006041if test -n "$ac_tool_prefix"; then
6042 for ac_prog in readelf
6043 do
6044 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6047$as_echo_n "checking for $ac_word... " >&6; }
6048if ${ac_cv_prog_READELF+:} false; then :
6049 $as_echo_n "(cached) " >&6
6050else
6051 if test -n "$READELF"; then
6052 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6053else
6054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057 IFS=$as_save_IFS
6058 test -z "$as_dir" && as_dir=.
6059 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063 break 2
6064 fi
6065done
6066 done
6067IFS=$as_save_IFS
6068
6069fi
6070fi
6071READELF=$ac_cv_prog_READELF
6072if test -n "$READELF"; then
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6074$as_echo "$READELF" >&6; }
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081 test -n "$READELF" && break
6082 done
6083fi
6084if test -z "$READELF"; then
6085 ac_ct_READELF=$READELF
6086 for ac_prog in readelf
6087do
6088 # Extract the first word of "$ac_prog", so it can be a program name with args.
6089set dummy $ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6093 $as_echo_n "(cached) " >&6
6094else
6095 if test -n "$ac_ct_READELF"; then
6096 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6097else
6098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101 IFS=$as_save_IFS
6102 test -z "$as_dir" && as_dir=.
6103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006105 ac_cv_prog_ac_ct_READELF="$ac_prog"
6106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107 break 2
6108 fi
6109done
6110 done
6111IFS=$as_save_IFS
6112
6113fi
6114fi
6115ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6116if test -n "$ac_ct_READELF"; then
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6118$as_echo "$ac_ct_READELF" >&6; }
6119else
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121$as_echo "no" >&6; }
6122fi
6123
6124
6125 test -n "$ac_ct_READELF" && break
6126done
6127
6128 if test "x$ac_ct_READELF" = x; then
6129 READELF=":"
6130 else
6131 case $cross_compiling:$ac_tool_warned in
6132yes:)
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6135ac_tool_warned=yes ;;
6136esac
6137 READELF=$ac_ct_READELF
6138 fi
6139fi
6140
6141if test "$cross_compiling" = yes; then
6142 case "$READELF" in
6143 readelf|:)
6144 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6145 ;;
6146 esac
6147fi
6148
6149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006152hp*|HP*)
6153 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154 if test -z "$INSTALL"
6155 then
6156 INSTALL="${srcdir}/install-sh -c"
6157 fi
6158esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159# Find a good install program. We prefer a C program (faster),
6160# so one script is as good as another. But avoid the broken or
6161# incompatible versions:
6162# SysV /etc/install, /usr/sbin/install
6163# SunOS /usr/etc/install
6164# IRIX /sbin/install
6165# AIX /bin/install
6166# AmigaOS /C/install, which installs bootblocks on floppy discs
6167# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6168# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6169# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6170# OS/2's system install, which has a completely different semantic
6171# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006172# Reject install programs that cannot install multiple files.
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6174$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006176if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178else
6179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182 IFS=$as_save_IFS
6183 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 # Account for people who put trailing slashes in PATH elements.
6185case $as_dir/ in #((
6186 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006188 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189 /usr/ucb/* ) ;;
6190 *)
6191 # OSF1 and SCO ODT 3.0 have their own names for install.
6192 # Don't use installbsd from OSF since it installs stuff as root
6193 # by default.
6194 for ac_prog in ginstall scoinst install; do
6195 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006196 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197 if test $ac_prog = install &&
6198 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6199 # AIX install. It has an incompatible calling convention.
6200 :
6201 elif test $ac_prog = install &&
6202 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6203 # program-specific install script used by HP pwplus--don't use.
6204 :
6205 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006206 rm -rf conftest.one conftest.two conftest.dir
6207 echo one > conftest.one
6208 echo two > conftest.two
6209 mkdir conftest.dir
6210 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6211 test -s conftest.one && test -s conftest.two &&
6212 test -s conftest.dir/conftest.one &&
6213 test -s conftest.dir/conftest.two
6214 then
6215 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6216 break 3
6217 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 fi
6219 fi
6220 done
6221 done
6222 ;;
6223esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006224
6225 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226IFS=$as_save_IFS
6227
Matthias Kloseb9621712010-04-24 17:59:49 +00006228rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229
6230fi
6231 if test "${ac_cv_path_install+set}" = set; then
6232 INSTALL=$ac_cv_path_install
6233 else
6234 # As a last resort, use the slow shell script. Don't cache a
6235 # value for INSTALL within a source directory, because that will
6236 # break other packages using the cache if that directory is
6237 # removed, or if the value is a relative name.
6238 INSTALL=$ac_install_sh
6239 fi
6240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6242$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243
6244# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6245# It thinks the first close brace ends the variable substitution.
6246test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6247
6248test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6249
6250test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6251
Matthias Klose93a0ef12012-03-15 18:08:34 +01006252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6253$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6254if test -z "$MKDIR_P"; then
6255 if ${ac_cv_path_mkdir+:} false; then :
6256 $as_echo_n "(cached) " >&6
6257else
6258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6260do
6261 IFS=$as_save_IFS
6262 test -z "$as_dir" && as_dir=.
6263 for ac_prog in mkdir gmkdir; do
6264 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006265 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006266 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6267 'mkdir (GNU coreutils) '* | \
6268 'mkdir (coreutils) '* | \
6269 'mkdir (fileutils) '4.1*)
6270 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6271 break 3;;
6272 esac
6273 done
6274 done
6275 done
6276IFS=$as_save_IFS
6277
6278fi
6279
6280 test -d ./--version && rmdir ./--version
6281 if test "${ac_cv_path_mkdir+set}" = set; then
6282 MKDIR_P="$ac_cv_path_mkdir -p"
6283 else
6284 # As a last resort, use the slow shell script. Don't cache a
6285 # value for MKDIR_P within a source directory, because that will
6286 # break other packages using the cache if that directory is
6287 # removed, or if the value is a relative name.
6288 MKDIR_P="$ac_install_sh -d"
6289 fi
6290fi
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6292$as_echo "$MKDIR_P" >&6; }
6293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294
6295# Not every filesystem supports hard links
6296
6297if test -z "$LN" ; then
6298 case $ac_sys_system in
6299 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 *) LN=ln;;
6301 esac
6302fi
6303
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006304# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006305
6306ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6310$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311
6312# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006313if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 withval=$with_pydebug;
6315if test "$withval" != no
6316then
6317
Matthias Kloseb9621712010-04-24 17:59:49 +00006318$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6321$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006323 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006324else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6325$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326fi
6327else
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6329$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330fi
6331
6332
T. Woutersddbfa2c2017-05-23 01:30:49 +02006333# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6334# the ABI. This allows enabling assertions without changing the ABI.
6335assertions='false'
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6337$as_echo_n "checking for --with-assertions... " >&6; }
6338
6339# Check whether --with-assertions was given.
6340if test "${with_assertions+set}" = set; then :
6341 withval=$with_assertions;
6342if test "$withval" != no
6343then
6344 assertions='true'
6345fi
6346fi
6347
6348if test "$assertions" = 'true'; then
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6350$as_echo "yes" >&6; }
6351elif test "$Py_DEBUG" = 'true'; then
6352 assertions='true'
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6354$as_echo "implied by --with-pydebug" >&6; }
6355else
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357$as_echo "no" >&6; }
6358fi
6359
Brett Cannon63d98bc2016-09-06 17:12:40 -07006360# Enable optimization flags
6361
6362
6363Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6365$as_echo_n "checking for --enable-optimizations... " >&6; }
6366# Check whether --enable-optimizations was given.
6367if test "${enable_optimizations+set}" = set; then :
6368 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006369if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006370then
6371 Py_OPT='true'
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6373$as_echo "yes" >&6; };
6374else
6375 Py_OPT='false'
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6377$as_echo "no" >&6; };
6378fi
6379else
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381$as_echo "no" >&6; }
6382fi
6383
6384if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006385 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6386 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006387 # 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 +00006388 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006390 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006391 DEF_MAKE_RULE="build_all"
6392else
6393 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006394 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006395 DEF_MAKE_RULE="all"
6396fi
6397
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006398# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6399# normal names in the default $PATH (ie: Ubuntu). They exist under the
6400# non-suffixed name in their versioned llvm directory.
6401
6402llvm_bin_dir=''
6403llvm_path="${PATH}"
6404if test "${CC}" = "clang"
6405then
6406 clang_bin=`which clang`
6407 # Some systems install clang elsewhere as a symlink to the real path
6408 # which is where the related llvm tools are located.
6409 if test -L "${clang_bin}"
6410 then
6411 clang_dir=`dirname "${clang_bin}"`
6412 clang_bin=`readlink "${clang_bin}"`
6413 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6414 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6415 fi
6416fi
6417
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006418# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6420$as_echo_n "checking for --with-lto... " >&6; }
6421
6422# Check whether --with-lto was given.
6423if test "${with_lto+set}" = set; then :
6424 withval=$with_lto;
6425if test "$withval" != no
6426then
6427 Py_LTO='true'
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6429$as_echo "yes" >&6; };
6430else
6431 Py_LTO='false'
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; };
6434fi
6435else
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6437$as_echo "no" >&6; }
6438fi
6439
6440if test "$Py_LTO" = 'true' ; then
6441 case $CC in
6442 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006443
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006445$as_echo_n "checking target system type... " >&6; }
6446if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006447 $as_echo_n "(cached) " >&6
6448else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006449 if test "x$target_alias" = x; then
6450 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006451else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006452 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6453 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6454fi
6455
6456fi
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6458$as_echo "$ac_cv_target" >&6; }
6459case $ac_cv_target in
6460*-*-*) ;;
6461*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6462esac
6463target=$ac_cv_target
6464ac_save_IFS=$IFS; IFS='-'
6465set x $ac_cv_target
6466shift
6467target_cpu=$1
6468target_vendor=$2
6469shift; shift
6470# Remember, the first character of IFS is used to create $*,
6471# except with old shells:
6472target_os=$*
6473IFS=$ac_save_IFS
6474case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6475
6476
6477# The aliases save the names the user supplied, while $host etc.
6478# will get canonicalized.
6479test -n "$target_alias" &&
6480 test "$program_prefix$program_suffix$program_transform_name" = \
6481 NONENONEs,x,x, &&
6482 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006483# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6484set dummy $target_alias-llvm-ar; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
6487if ${ac_cv_path_LLVM_AR+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489else
6490 case $LLVM_AR in
6491 [\\/]* | ?:[\\/]*)
6492 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6493 ;;
6494 *)
6495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in ${llvm_path}
6497do
6498 IFS=$as_save_IFS
6499 test -z "$as_dir" && as_dir=.
6500 for ac_exec_ext in '' $ac_executable_extensions; do
6501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6502 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504 break 2
6505 fi
6506done
6507 done
6508IFS=$as_save_IFS
6509
6510 ;;
6511esac
6512fi
6513LLVM_AR=$ac_cv_path_LLVM_AR
6514if test -n "$LLVM_AR"; then
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6516$as_echo "$LLVM_AR" >&6; }
6517else
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
6520fi
6521
6522
6523if test -z "$ac_cv_path_LLVM_AR"; then
6524 if test "$build" = "$target"; then
6525 ac_pt_LLVM_AR=$LLVM_AR
6526 # Extract the first word of "llvm-ar", so it can be a program name with args.
6527set dummy llvm-ar; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532else
6533 case $ac_pt_LLVM_AR in
6534 [\\/]* | ?:[\\/]*)
6535 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6536 ;;
6537 *)
6538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539for as_dir in ${llvm_path}
6540do
6541 IFS=$as_save_IFS
6542 test -z "$as_dir" && as_dir=.
6543 for ac_exec_ext in '' $ac_executable_extensions; do
6544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6545 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547 break 2
6548 fi
6549done
6550 done
6551IFS=$as_save_IFS
6552
6553 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6554 ;;
6555esac
6556fi
6557ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6558if test -n "$ac_pt_LLVM_AR"; then
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6560$as_echo "$ac_pt_LLVM_AR" >&6; }
6561else
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
6564fi
6565
6566 LLVM_AR=$ac_pt_LLVM_AR
6567 else
6568 LLVM_AR="''"
6569 fi
6570else
6571 LLVM_AR="$ac_cv_path_LLVM_AR"
6572fi
6573
6574
6575 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6576 then
6577 LLVM_AR_FOUND="found"
6578 else
6579 LLVM_AR_FOUND="not-found"
6580 fi
6581 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6582 then
6583 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6584 if test -n "${found_llvm_ar}"
6585 then
6586 LLVM_AR='/usr/bin/xcrun llvm-ar'
6587 LLVM_AR_FOUND=found
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6589$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6590 fi
6591 fi
6592 if test $LLVM_AR_FOUND = not-found
6593 then
6594 LLVM_PROFR_ERR=yes
6595 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6596 else
6597 LLVM_AR_ERR=no
6598 fi
6599 AR="${LLVM_AR}"
6600 case $ac_sys_system in
6601 Darwin*)
6602 # Any changes made here should be reflected in the GCC+Darwin case below
6603 LTOFLAGS="-flto -Wl,-export_dynamic"
6604 ;;
6605 *)
6606 LTOFLAGS="-flto"
6607 ;;
6608 esac
6609 ;;
6610 *gcc*)
6611 case $ac_sys_system in
6612 Darwin*)
6613 LTOFLAGS="-flto -Wl,-export_dynamic"
6614 ;;
6615 *)
6616 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6617 ;;
6618 esac
6619 ;;
6620 esac
6621
6622 if test "$ac_cv_prog_cc_g" = "yes"
6623 then
6624 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6625 # to get debug symbols.
6626 LTOFLAGS="$LTOFLAGS -g"
6627 fi
6628
stratakisf92c7aa2018-12-04 15:54:01 +01006629 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006630 LDFLAGS="$LDFLAGS $LTOFLAGS"
6631fi
6632
6633# Enable PGO flags.
6634
6635
6636
6637
6638
6639
Gregory P. Smith799520c2016-09-07 16:10:00 -07006640# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6641set dummy $target_alias-llvm-profdata; ac_word=$2
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6643$as_echo_n "checking for $ac_word... " >&6; }
6644if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6645 $as_echo_n "(cached) " >&6
6646else
6647 case $LLVM_PROFDATA in
6648 [\\/]* | ?:[\\/]*)
6649 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6650 ;;
6651 *)
6652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6653for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006654do
6655 IFS=$as_save_IFS
6656 test -z "$as_dir" && as_dir=.
6657 for ac_exec_ext in '' $ac_executable_extensions; do
6658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006659 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6661 break 2
6662 fi
6663done
6664 done
6665IFS=$as_save_IFS
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667 ;;
6668esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006670LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6671if test -n "$LLVM_PROFDATA"; then
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6673$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006674else
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6676$as_echo "no" >&6; }
6677fi
6678
6679
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6681 if test "$build" = "$target"; then
6682 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6683 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6684set dummy llvm-profdata; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6688 $as_echo_n "(cached) " >&6
6689else
6690 case $ac_pt_LLVM_PROFDATA in
6691 [\\/]* | ?:[\\/]*)
6692 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6693 ;;
6694 *)
6695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in ${llvm_path}
6697do
6698 IFS=$as_save_IFS
6699 test -z "$as_dir" && as_dir=.
6700 for ac_exec_ext in '' $ac_executable_extensions; do
6701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704 break 2
6705 fi
6706done
6707 done
6708IFS=$as_save_IFS
6709
6710 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6711 ;;
6712esac
6713fi
6714ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6715if test -n "$ac_pt_LLVM_PROFDATA"; then
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6717$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6718else
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6720$as_echo "no" >&6; }
6721fi
6722
6723 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6724 else
6725 LLVM_PROFDATA="''"
6726 fi
6727else
6728 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6729fi
6730
6731
6732if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6733then
6734 LLVM_PROF_FOUND="found"
6735else
6736 LLVM_PROF_FOUND="not-found"
6737fi
6738if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6739then
6740 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6741 if test -n "${found_llvm_profdata}"
6742 then
6743 # llvm-profdata isn't directly in $PATH in some cases.
6744 # https://apple.stackexchange.com/questions/197053/
6745 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6746 LLVM_PROF_FOUND=found
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6748$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6749 fi
6750fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006751LLVM_PROF_ERR=no
6752case $CC in
6753 *clang*)
6754 # Any changes made here should be reflected in the GCC+Darwin case below
6755 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6756 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006758 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6759 if test $LLVM_PROF_FOUND = not-found
6760 then
6761 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 if test "${REQUIRE_PGO}" = "yes"
6763 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006764 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 -07006765 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006766 fi
6767 ;;
6768 *gcc*)
6769 case $ac_sys_system in
6770 Darwin*)
6771 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6772 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006774 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006775 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776 then
6777 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 if test "${REQUIRE_PGO}" = "yes"
6779 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006780 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 -07006781 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006782 fi
6783 ;;
6784 *)
6785 PGO_PROF_GEN_FLAG="-fprofile-generate"
6786 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6787 LLVM_PROF_MERGER="true"
6788 LLVM_PROF_FILE=""
6789 ;;
6790 esac
6791 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006792 *icc*)
6793 PGO_PROF_GEN_FLAG="-prof-gen"
6794 PGO_PROF_USE_FLAG="-prof-use"
6795 LLVM_PROF_MERGER="true"
6796 LLVM_PROF_FILE=""
6797 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006798esac
6799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6801# merged with this chunk of code?
6802
6803# Optimizer/debugger flags
6804# ------------------------
6805# (The following bit of code is complicated enough - please keep things
6806# indented properly. Just pretend you're editing Python code. ;-)
6807
6808# There are two parallel sets of case statements below, one that checks to
6809# see if OPT was set and one that does BASECFLAGS setting based upon
6810# compiler and platform. BASECFLAGS tweaks need to be made even if the
6811# user set OPT.
6812
6813# tweak OPT based on compiler and platform, only if the user didn't set
6814# it on the command line
6815
Victor Stinner9ed34a82017-05-02 22:35:58 +02006816
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006817if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818then
6819 case $GCC in
6820 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6822 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6823 WRAP="-fwrapv"
6824 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006825
Stefan Krahaf04ff22011-12-08 22:20:31 +01006826 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006827 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006828 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006829 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006830 *)
6831 if $CC --version 2>&1 | grep -q clang
6832 then
6833 cc_is_clang=1
6834 else
6835 cc_is_clang=
6836 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006837 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006838
Victor Stinner35f3d242017-04-21 12:35:24 +02006839 if test -n "${cc_is_clang}"
6840 then
6841 # Clang also needs -fwrapv
6842 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006843 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6844 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006845 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006846 fi
6847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848 case $ac_cv_prog_cc_g in
6849 yes)
6850 if test "$Py_DEBUG" = 'true' ; then
6851 # Optimization messes up debuggers, so turn it off for
6852 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006853 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006854 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006855 else
Victor Stinner28205b22017-04-21 11:24:34 +02006856 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006857 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 else
Victor Stinner28205b22017-04-21 11:24:34 +02006859 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 fi
6861 ;;
6862 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006863 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864 ;;
6865 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 case $ac_sys_system in
6868 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6869 ;;
6870 esac
6871 ;;
6872
6873 *)
6874 OPT="-O"
6875 ;;
6876 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877fi
6878
6879
6880
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882# The -arch flags for universal builds on OSX
6883UNIVERSAL_ARCH_FLAGS=
6884
6885
6886# tweak BASECFLAGS based on compiler and platform
6887case $GCC in
6888yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006889 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006890
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6892$as_echo_n "checking for -Wextra... " >&6; }
6893 ac_save_cc="$CC"
6894 CC="$CC -Wextra -Werror"
6895 if ${ac_cv_extra_warnings+:} false; then :
6896 $as_echo_n "(cached) " >&6
6897else
6898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899/* end confdefs.h. */
6900
6901
6902int
6903main ()
6904{
6905
6906 ;
6907 return 0;
6908}
6909
6910_ACEOF
6911if ac_fn_c_try_compile "$LINENO"; then :
6912
6913 ac_cv_extra_warnings=yes
6914
6915else
6916
6917 ac_cv_extra_warnings=no
6918
6919fi
6920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6921fi
6922
6923 CC="$ac_save_cc"
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6925$as_echo "$ac_cv_extra_warnings" >&6; }
6926
6927 if test $ac_cv_extra_warnings = yes
6928 then
6929 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6930 fi
6931
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006932 # Python doesn't violate C99 aliasing rules, but older versions of
6933 # GCC produce warnings for legal Python code. Enable
6934 # -fno-strict-aliasing on versions of GCC that support but produce
6935 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6937$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 ac_save_cc="$CC"
6939 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006940 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006941 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006946
Matthias Kloseb159a552010-04-25 21:00:44 +00006947
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006948int
6949main ()
6950{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006951
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006952 ;
6953 return 0;
6954}
Matthias Kloseb159a552010-04-25 21:00:44 +00006955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006957if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
6959 CC="$ac_save_cc -fstrict-aliasing"
6960 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962/* end confdefs.h. */
6963
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006964 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965int
6966main ()
6967{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006968double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969 ;
6970 return 0;
6971}
Matthias Kloseb159a552010-04-25 21:00:44 +00006972
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
6976 ac_cv_no_strict_aliasing=no
6977
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978else
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
6980 ac_cv_no_strict_aliasing=yes
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006984
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985else
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 ac_cv_no_strict_aliasing=no
6988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006991fi
6992
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6996$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998 then
6999 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7000 fi
7001
Zachary Ware5af85642015-12-21 12:09:17 -06007002 # ICC doesn't recognize the option, but only emits a warning
7003 ## XXX does it emit an unused result warning and can it be disabled?
7004 case "$CC" in
7005 *icc*)
7006 ac_cv_disable_unused_result_warning=no
7007 ;;
7008 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7010$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7011 ac_save_cc="$CC"
7012 CC="$CC -Wunused-result -Werror"
7013 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007014 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007015 $as_echo_n "(cached) " >&6
7016else
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018/* end confdefs.h. */
7019
7020
7021int
7022main ()
7023{
7024
7025 ;
7026 return 0;
7027}
7028
7029_ACEOF
7030if ac_fn_c_try_compile "$LINENO"; then :
7031
7032 ac_cv_disable_unused_result_warning=yes
7033
7034else
7035
7036 ac_cv_disable_unused_result_warning=no
7037
7038fi
7039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7040fi
7041
7042 CFLAGS="$save_CFLAGS"
7043 CC="$ac_save_cc"
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7045$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007046 ;;
7047 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007048
7049 if test $ac_cv_disable_unused_result_warning = yes
7050 then
7051 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007052 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7053 fi
7054
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7056$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7057 ac_save_cc="$CC"
7058 CC="$CC -Wunused-parameter -Werror"
7059 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065
7066int
7067main ()
7068{
7069
7070 ;
7071 return 0;
7072}
7073
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076
7077 ac_cv_disable_unused_parameter_warning=yes
7078
7079else
7080
7081 ac_cv_disable_unused_parameter_warning=no
7082
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086
7087 CC="$ac_save_cc"
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7089$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7090
7091 if test $ac_cv_disable_unused_parameter_warning = yes
7092 then
7093 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7094 fi
7095
7096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7097$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7098 ac_save_cc="$CC"
7099 CC="$CC -Wmissing-field-initializers -Werror"
7100 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7101 $as_echo_n "(cached) " >&6
7102else
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7104/* end confdefs.h. */
7105
7106
7107int
7108main ()
7109{
7110
7111 ;
7112 return 0;
7113}
7114
7115_ACEOF
7116if ac_fn_c_try_compile "$LINENO"; then :
7117
7118 ac_cv_disable_missing_field_initializers=yes
7119
7120else
7121
7122 ac_cv_disable_missing_field_initializers=no
7123
7124fi
7125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7126fi
7127
7128 CC="$ac_save_cc"
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7130$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7131
7132 if test $ac_cv_disable_missing_field_initializers = yes
7133 then
7134 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007135 fi
7136
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7138$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7139 ac_save_cc="$CC"
7140 CC="$CC -Wsign-compare"
7141 save_CFLAGS="$CFLAGS"
7142 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7143 $as_echo_n "(cached) " >&6
7144else
7145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7146/* end confdefs.h. */
7147
7148
7149int
7150main ()
7151{
7152
7153 ;
7154 return 0;
7155}
7156
7157_ACEOF
7158if ac_fn_c_try_compile "$LINENO"; then :
7159
7160 ac_cv_enable_sign_compare_warning=yes
7161
7162else
7163
7164 ac_cv_enable_sign_compare_warning=no
7165
7166fi
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7168fi
7169
7170 CFLAGS="$save_CFLAGS"
7171 CC="$ac_save_cc"
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7173$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7174
7175 if test $ac_cv_enable_sign_compare_warning = yes
7176 then
7177 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7178 fi
7179
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7181$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7182 ac_save_cc="$CC"
7183 CC="$CC -Wunreachable-code"
7184 save_CFLAGS="$CFLAGS"
7185 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7186 $as_echo_n "(cached) " >&6
7187else
7188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7189/* end confdefs.h. */
7190
7191
7192int
7193main ()
7194{
7195
7196 ;
7197 return 0;
7198}
7199
7200_ACEOF
7201if ac_fn_c_try_compile "$LINENO"; then :
7202
7203 ac_cv_enable_unreachable_code_warning=yes
7204
7205else
7206
7207 ac_cv_enable_unreachable_code_warning=no
7208
7209fi
7210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7211fi
7212
7213 CFLAGS="$save_CFLAGS"
7214 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007215
7216 # Don't enable unreachable code warning in debug mode, since it usually
7217 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007218 # Issue #24324: Unfortunately, the unreachable code warning does not work
7219 # correctly on gcc and has been silently removed from the compiler.
7220 # It is supported on clang but on OS X systems gcc may be an alias
7221 # for clang. Try to determine if the compiler is not really gcc and,
7222 # if so, only then enable the warning.
7223 if test $ac_cv_enable_unreachable_code_warning = yes && \
7224 test "$Py_DEBUG" != "true" && \
7225 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007226 then
7227 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007228 else
7229 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007230 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7232$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007233
INADA Naokie3364842018-06-05 20:40:53 +09007234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7235$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7236 ac_save_cc="$CC"
7237 CC="$CC -Werror -Wstrict-prototypes"
7238 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7239 $as_echo_n "(cached) " >&6
7240else
7241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7242/* end confdefs.h. */
7243
7244
7245int
7246main ()
7247{
7248
7249 ;
7250 return 0;
7251}
7252
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
7255
7256 ac_cv_enable_strict_prototypes_warning=yes
7257
7258else
7259
7260 ac_cv_enable_strict_prototypes_warning=no
7261
7262fi
7263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7264fi
7265
7266 CC="$ac_save_cc"
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7268$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7269
7270 if test $ac_cv_enable_strict_prototypes_warning = yes
7271 then
7272 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7273 fi
7274
Victor Stinner193ee0a2017-02-06 14:24:00 +01007275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7276$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7277 ac_save_cc="$CC"
7278 CC="$CC -Werror=implicit-function-declaration"
7279 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7280 $as_echo_n "(cached) " >&6
7281else
7282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283/* end confdefs.h. */
7284
7285
7286int
7287main ()
7288{
7289
7290 ;
7291 return 0;
7292}
7293
7294_ACEOF
7295if ac_fn_c_try_compile "$LINENO"; then :
7296
7297 ac_cv_enable_implicit_function_declaration_error=yes
7298
7299else
7300
7301 ac_cv_enable_implicit_function_declaration_error=no
7302
7303fi
7304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7305fi
7306
7307 CC="$ac_save_cc"
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7309$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7310
7311 if test $ac_cv_enable_implicit_function_declaration_error = yes
7312 then
7313 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7314 fi
7315
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7317 # support. Without this, treatment of subnormals doesn't follow
7318 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007319 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320 alpha*)
7321 BASECFLAGS="$BASECFLAGS -mieee"
7322 ;;
7323 esac
7324
7325 case $ac_sys_system in
7326 SCO_SV*)
7327 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7328 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007329
Ned Deily87adb6e2013-10-18 21:09:56 -07007330 Darwin*)
7331 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7332 # used to be here, but non-Apple gcc doesn't accept them.
7333 if test "${CC}" = gcc
7334 then
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007336$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007337 case "${UNIVERSALSDK}" in
7338 */MacOSX10.4u.sdk)
7339 # Build using 10.4 SDK, force usage of gcc when the
7340 # compiler is gcc, otherwise the user will get very
7341 # confusing error messages when building on OSX 10.6
7342 CC=gcc-4.0
7343 CPP=cpp-4.0
7344 ;;
7345 esac
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007347$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007348 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349
Ned Deily87adb6e2013-10-18 21:09:56 -07007350 if test "${enable_universalsdk}"
7351 then
7352 case "$UNIVERSAL_ARCHS" in
7353 32-bit)
7354 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7355 LIPO_32BIT_FLAGS=""
7356 ARCH_RUN_32BIT=""
7357 ;;
7358 64-bit)
7359 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7360 LIPO_32BIT_FLAGS=""
7361 ARCH_RUN_32BIT="true"
7362 ;;
7363 all)
7364 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7365 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7366 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7367 ;;
7368 intel)
7369 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7370 LIPO_32BIT_FLAGS="-extract i386"
7371 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7372 ;;
7373 intel-32)
7374 UNIVERSAL_ARCH_FLAGS="-arch i386"
7375 LIPO_32BIT_FLAGS=""
7376 ARCH_RUN_32BIT=""
7377 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007378 intel-64)
7379 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7380 LIPO_32BIT_FLAGS=""
7381 ARCH_RUN_32BIT="true"
7382 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007383 3-way)
7384 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7385 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7386 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7387 ;;
7388 *)
7389 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7390 ;;
7391 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392
Ned Deily87adb6e2013-10-18 21:09:56 -07007393 if test "${UNIVERSALSDK}" != "/"
7394 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007395 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7396 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007397 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007398 else
7399 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7400 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007401 fi
7402 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403
Ned Deily87adb6e2013-10-18 21:09:56 -07007404 # Calculate an appropriate deployment target for this build:
7405 # The deployment target value is used explicitly to enable certain
7406 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007407 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007408 # component of the string returned by distutils.get_platform().
7409 #
7410 # Use the value from:
7411 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7412 # 2. the operating system version of the build machine if >= 10.6
7413 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7414 # below to pick either 10.3, 10.4, or 10.5 as the target.
7415 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7418$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007419 cur_target_major=`sw_vers -productVersion | \
7420 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7421 cur_target_minor=`sw_vers -productVersion | \
7422 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7423 cur_target="${cur_target_major}.${cur_target_minor}"
7424 if test ${cur_target_major} -eq 10 && \
7425 test ${cur_target_minor} -ge 3 && \
7426 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 then
Ned Deily36820b62014-06-25 13:44:22 -07007428 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 cur_target=10.3
7430 if test ${enable_universalsdk}
7431 then
7432 case "$UNIVERSAL_ARCHS" in
7433 all|3-way|intel|64-bit)
7434 # These configurations were first supported in 10.5
7435 cur_target='10.5'
7436 ;;
7437 esac
7438 else
7439 if test `/usr/bin/arch` = "i386"
7440 then
7441 # 10.4 was the first release to support Intel archs
7442 cur_target="10.4"
7443 fi
7444 fi
7445 fi
7446 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007447
Ned Deily87adb6e2013-10-18 21:09:56 -07007448 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7449 # environment with a value that is the same as what we'll use
7450 # in the Makefile to ensure that we'll get the same compiler
7451 # environment during configure and build time.
7452 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7453 export MACOSX_DEPLOYMENT_TARGET
7454 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7456$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007457
Ned Deily87adb6e2013-10-18 21:09:56 -07007458 # end of Darwin* tests
7459 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460 esac
7461 ;;
7462
7463*)
7464 case $ac_sys_system in
7465 OpenUNIX*|UnixWare*)
7466 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7467 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468 SCO_SV*)
7469 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7470 ;;
7471 esac
7472 ;;
7473esac
7474
Zachary Ware5af85642015-12-21 12:09:17 -06007475# ICC needs -fp-model strict or floats behave badly
7476case "$CC" in
7477*icc*)
7478 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7479 ;;
7480esac
7481
T. Woutersddbfa2c2017-05-23 01:30:49 +02007482if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483 :
7484else
7485 OPT="-DNDEBUG $OPT"
7486fi
7487
7488if test "$ac_arch_flags"
7489then
7490 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7491fi
7492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493# On some compilers, pthreads are available without further options
7494# (e.g. MacOS X). On some of these systems, the compiler will not
7495# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7496# So we have to see first whether pthreads are available without
7497# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7499$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007500if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_pthread_is_default=no
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507/* end confdefs.h. */
7508
Stefan Krah7dba5942012-11-22 22:49:11 +01007509#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510#include <pthread.h>
7511
7512void* routine(void* p){return NULL;}
7513
7514int main(){
7515 pthread_t p;
7516 if(pthread_create(&p,NULL,routine,NULL)!=0)
7517 return 1;
7518 (void)pthread_detach(p);
7519 return 0;
7520}
7521
7522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007523if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524
7525 ac_cv_pthread_is_default=yes
7526 ac_cv_kthread=no
7527 ac_cv_pthread=no
7528
7529else
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7533 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534fi
7535
7536
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537fi
7538
Matthias Kloseb9621712010-04-24 17:59:49 +00007539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7540$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541
7542
7543if test $ac_cv_pthread_is_default = yes
7544then
7545 ac_cv_kpthread=no
7546else
7547# -Kpthread, if available, provides the right #defines
7548# and linker options to make pthread_create available
7549# Some compilers won't report that they do not support -Kpthread,
7550# so we need to run a program to see whether it really made the
7551# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7553$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007554if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556else
7557 ac_save_cc="$CC"
7558CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007559if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560 ac_cv_kpthread=no
7561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563/* end confdefs.h. */
7564
Stefan Krah7dba5942012-11-22 22:49:11 +01007565#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566#include <pthread.h>
7567
7568void* routine(void* p){return NULL;}
7569
7570int main(){
7571 pthread_t p;
7572 if(pthread_create(&p,NULL,routine,NULL)!=0)
7573 return 1;
7574 (void)pthread_detach(p);
7575 return 0;
7576}
7577
7578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007579if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580 ac_cv_kpthread=yes
7581else
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
7587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588CC="$ac_save_cc"
7589fi
7590
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7592$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593fi
7594
7595if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7596then
7597# -Kthread, if available, provides the right #defines
7598# and linker options to make pthread_create available
7599# Some compilers won't report that they do not support -Kthread,
7600# so we need to run a program to see whether it really made the
7601# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7603$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606else
7607 ac_save_cc="$CC"
7608CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007609if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 ac_cv_kthread=no
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613/* end confdefs.h. */
7614
Stefan Krah7dba5942012-11-22 22:49:11 +01007615#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616#include <pthread.h>
7617
7618void* routine(void* p){return NULL;}
7619
7620int main(){
7621 pthread_t p;
7622 if(pthread_create(&p,NULL,routine,NULL)!=0)
7623 return 1;
7624 (void)pthread_detach(p);
7625 return 0;
7626}
7627
7628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630 ac_cv_kthread=yes
7631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638CC="$ac_save_cc"
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7642$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
7644
7645if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7646then
7647# -pthread, if available, provides the right #defines
7648# and linker options to make pthread_create available
7649# Some compilers won't report that they do not support -pthread,
7650# so we need to run a program to see whether it really made the
7651# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7653$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007654if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656else
7657 ac_save_cc="$CC"
7658CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 ac_cv_pthread=no
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663/* end confdefs.h. */
7664
Stefan Krah7dba5942012-11-22 22:49:11 +01007665#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666#include <pthread.h>
7667
7668void* routine(void* p){return NULL;}
7669
7670int main(){
7671 pthread_t p;
7672 if(pthread_create(&p,NULL,routine,NULL)!=0)
7673 return 1;
7674 (void)pthread_detach(p);
7675 return 0;
7676}
7677
7678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007679if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680 ac_cv_pthread=yes
7681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688CC="$ac_save_cc"
7689fi
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7692$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
7695# If we have set a CC compiler flag for thread support then
7696# check if it works for CXX, too.
7697ac_cv_cxx_thread=no
7698if test ! -z "$CXX"
7699then
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7701$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702ac_save_cxx="$CXX"
7703
7704if test "$ac_cv_kpthread" = "yes"
7705then
7706 CXX="$CXX -Kpthread"
7707 ac_cv_cxx_thread=yes
7708elif test "$ac_cv_kthread" = "yes"
7709then
7710 CXX="$CXX -Kthread"
7711 ac_cv_cxx_thread=yes
7712elif test "$ac_cv_pthread" = "yes"
7713then
7714 CXX="$CXX -pthread"
7715 ac_cv_cxx_thread=yes
7716fi
7717
7718if test $ac_cv_cxx_thread = yes
7719then
7720 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7721 $CXX -c conftest.$ac_ext 2>&5
7722 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7723 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7724 then
7725 ac_cv_cxx_thread=yes
7726 else
7727 ac_cv_cxx_thread=no
7728 fi
7729 rm -fr conftest*
7730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7732$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
7734CXX="$ac_save_cxx"
7735
7736
7737# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7739$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007740if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745#include <stdlib.h>
7746#include <stdarg.h>
7747#include <string.h>
7748#include <float.h>
7749
7750int
7751main ()
7752{
7753
7754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759 ac_cv_header_stdc=yes
7760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7764
7765if test $ac_cv_header_stdc = yes; then
7766 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768/* end confdefs.h. */
7769#include <string.h>
7770
7771_ACEOF
7772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 $EGREP "memchr" >/dev/null 2>&1; then :
7774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775else
7776 ac_cv_header_stdc=no
7777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007778rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779
7780fi
7781
7782if test $ac_cv_header_stdc = yes; then
7783 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007785/* end confdefs.h. */
7786#include <stdlib.h>
7787
7788_ACEOF
7789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 $EGREP "free" >/dev/null 2>&1; then :
7791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792else
7793 ac_cv_header_stdc=no
7794fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007795rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796
7797fi
7798
7799if test $ac_cv_header_stdc = yes; then
7800 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802 :
7803else
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805/* end confdefs.h. */
7806#include <ctype.h>
7807#include <stdlib.h>
7808#if ((' ' & 0x0FF) == 0x020)
7809# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7810# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7811#else
7812# define ISLOWER(c) \
7813 (('a' <= (c) && (c) <= 'i') \
7814 || ('j' <= (c) && (c) <= 'r') \
7815 || ('s' <= (c) && (c) <= 'z'))
7816# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7817#endif
7818
7819#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7820int
7821main ()
7822{
7823 int i;
7824 for (i = 0; i < 256; i++)
7825 if (XOR (islower (i), ISLOWER (i))
7826 || toupper (i) != TOUPPER (i))
7827 return 2;
7828 return 0;
7829}
7830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007831if ac_fn_c_try_run "$LINENO"; then :
7832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838fi
7839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840fi
7841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7843$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844if test $ac_cv_header_stdc = yes; then
7845
Matthias Kloseb9621712010-04-24 17:59:49 +00007846$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847
7848fi
7849
stratakise768c862018-01-23 16:11:24 +01007850for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007851fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007852ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007853sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007854utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007855poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007856sys/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 +01007857sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007858sys/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 +01007859sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007860sys/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 -07007861libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007862linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007863sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007864do :
7865 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7866ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007867if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007870_ACEOF
7871
7872fi
7873
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874done
7875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007876ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007877for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7880$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007881if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007886#include <sys/types.h>
7887#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889int
7890main ()
7891{
7892if ((DIR *) 0)
7893return 0;
7894 ;
7895 return 0;
7896}
7897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007898if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905eval ac_res=\$$as_ac_Header
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7907$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007908if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007910#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007911_ACEOF
7912
7913ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007914fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916done
7917# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7918if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7920$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007921if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007923else
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928/* Override any GCC internal prototype to avoid an error.
7929 Use char because int might match the return type of a GCC
7930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931#ifdef __cplusplus
7932extern "C"
7933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007934char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ;
7940 return 0;
7941}
7942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943for ac_lib in '' dir; do
7944 if test -z "$ac_lib"; then
7945 ac_res="none required"
7946 else
7947 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007955 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958done
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961else
7962 ac_cv_search_opendir=no
7963fi
7964rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007965LIBS=$ac_func_search_save_LIBS
7966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7968$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007970if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
Michael W. Hudson54241132001-12-07 15:38:26 +00007975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7977$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007980else
7981 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985/* Override any GCC internal prototype to avoid an error.
7986 Use char because int might match the return type of a GCC
7987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007988#ifdef __cplusplus
7989extern "C"
7990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007991char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992int
7993main ()
7994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 ;
7997 return 0;
7998}
7999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000for ac_lib in '' x; do
8001 if test -z "$ac_lib"; then
8002 ac_res="none required"
8003 else
8004 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010rm -f core conftest.err conftest.$ac_objext \
8011 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008012 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015done
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008017
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018else
8019 ac_cv_search_opendir=no
8020fi
8021rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008022LIBS=$ac_func_search_save_LIBS
8023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8025$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008027if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030fi
8031
8032fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8035$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008041#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008042int
8043main ()
8044{
8045return makedev(0, 0);
8046 ;
8047 return 0;
8048}
8049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008051 ac_cv_header_sys_types_h_makedev=yes
8052else
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055rm -f core conftest.err conftest.$ac_objext \
8056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008057
8058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8060$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008061
8062if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008063ac_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 +02008064if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008067
8068fi
8069
8070
8071
8072 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 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 +02008074if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008077
8078fi
8079
8080
8081 fi
8082fi
8083
Michael W. Hudson54241132001-12-07 15:38:26 +00008084
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008085# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8086# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8087SAVE_CFLAGS=$CFLAGS
8088CFLAGS="-std=c99 $CFLAGS"
8089for ac_header in bluetooth/bluetooth.h
8090do :
8091 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8092if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8093 cat >>confdefs.h <<_ACEOF
8094#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8095_ACEOF
8096
8097fi
8098
8099done
8100
8101CFLAGS=$SAVE_CFLAGS
8102
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008103# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8104for ac_header in net/if.h
8105do :
8106 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8107#ifdef STDC_HEADERS
8108# include <stdlib.h>
8109# include <stddef.h>
8110#else
8111# ifdef HAVE_STDLIB_H
8112# include <stdlib.h>
8113# endif
8114#endif
8115#ifdef HAVE_SYS_SOCKET_H
8116# include <sys/socket.h>
8117#endif
8118
8119"
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_NET_IF_H 1
8123_ACEOF
8124
8125fi
8126
8127done
8128
8129
Martin v. Löwis11017b12006-01-14 18:12:57 +00008130# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008131for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008132do :
8133 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 +00008134#ifdef HAVE_ASM_TYPES_H
8135#include <asm/types.h>
8136#endif
8137#ifdef HAVE_SYS_SOCKET_H
8138#include <sys/socket.h>
8139#endif
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141"
Victor Stinnere0be4232011-10-25 13:06:09 +02008142if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008143 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008144#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008145_ACEOF
8146
8147fi
8148
8149done
8150
8151
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008152# On Linux, qrtr.h requires asm/types.h
8153for ac_header in linux/qrtr.h
8154do :
8155 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8156#ifdef HAVE_ASM_TYPES_H
8157#include <asm/types.h>
8158#endif
8159#ifdef HAVE_SYS_SOCKET_H
8160#include <sys/socket.h>
8161#endif
8162
8163"
8164if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8165 cat >>confdefs.h <<_ACEOF
8166#define HAVE_LINUX_QRTR_H 1
8167_ACEOF
8168
8169fi
8170
8171done
8172
8173
caaveryeffc12f2017-09-06 18:18:10 -04008174for ac_header in linux/vm_sockets.h
8175do :
8176 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8177#ifdef HAVE_SYS_SOCKET_H
8178#include <sys/socket.h>
8179#endif
8180
8181"
8182if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8183 cat >>confdefs.h <<_ACEOF
8184#define HAVE_LINUX_VM_SOCKETS_H 1
8185_ACEOF
8186
8187fi
8188
8189done
8190
8191
Charles-François Natali47413c12011-10-06 19:47:44 +02008192# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008193for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008194do :
8195 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8196ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8197#ifdef HAVE_SYS_SOCKET_H
8198#include <sys/socket.h>
8199#endif
8200
8201"
8202if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8203 cat >>confdefs.h <<_ACEOF
8204#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8205_ACEOF
8206
8207fi
8208
8209done
8210
8211
Guido van Rossum627b2d71993-12-24 10:39:16 +00008212# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008213was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8215$as_echo_n "checking for clock_t in time.h... " >&6; }
8216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008218#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
8220_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008223 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008224else
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
8226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008228
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008229
Guido van Rossum627b2d71993-12-24 10:39:16 +00008230fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008231rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8234$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8237$as_echo_n "checking for makedev... " >&6; }
8238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008239/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008240
Jesus Cea740f53a2010-04-28 11:35:30 +00008241#if defined(MAJOR_IN_MKDEV)
8242#include <sys/mkdev.h>
8243#elif defined(MAJOR_IN_SYSMACROS)
8244#include <sys/sysmacros.h>
8245#else
8246#include <sys/types.h>
8247#endif
8248
Neal Norwitz11690112002-07-30 01:08:28 +00008249int
8250main ()
8251{
Jesus Cea740f53a2010-04-28 11:35:30 +00008252
8253 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008254 ;
8255 return 0;
8256}
Matthias Kloseb159a552010-04-25 21:00:44 +00008257
Neal Norwitz11690112002-07-30 01:08:28 +00008258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008259if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008260 ac_cv_has_makedev=yes
8261else
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264rm -f core conftest.err conftest.$ac_objext \
8265 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8267$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008268if test "$ac_cv_has_makedev" = "yes"; then
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008271
8272fi
8273
Christian Heimes985ecdc2013-11-20 11:46:18 +01008274# byte swapping
8275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8276$as_echo_n "checking for le64toh... " >&6; }
8277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8278/* end confdefs.h. */
8279
8280#ifdef HAVE_ENDIAN_H
8281#include <endian.h>
8282#elif defined(HAVE_SYS_ENDIAN_H)
8283#include <sys/endian.h>
8284#endif
8285
8286int
8287main ()
8288{
8289
8290 le64toh(1)
8291 ;
8292 return 0;
8293}
8294
8295_ACEOF
8296if ac_fn_c_try_link "$LINENO"; then :
8297 ac_cv_has_le64toh=yes
8298else
8299 ac_cv_has_le64toh=no
8300fi
8301rm -f core conftest.err conftest.$ac_objext \
8302 conftest$ac_exeext conftest.$ac_ext
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8304$as_echo "$ac_cv_has_le64toh" >&6; }
8305if test "$ac_cv_has_le64toh" = "yes"; then
8306
8307$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8308
8309fi
8310
Martin v. Löwis399a6892002-10-04 10:22:02 +00008311use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008312# Don't use largefile support for GNU/Hurd
8313case $ac_sys_system in GNU*)
8314 use_lfs=no
8315esac
8316
Martin v. Löwis399a6892002-10-04 10:22:02 +00008317if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008318# Two defines needed to enable largefile support on various platforms
8319# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008320case $ac_sys_system/$ac_sys_release in
8321AIX*)
8322
8323$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8324
8325 ;;
8326esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
8330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008332
Martin v. Löwis399a6892002-10-04 10:22:02 +00008333fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008334
Guido van Rossum84e7b241996-08-19 21:59:00 +00008335# Add some code to confdefs.h so that the test for off_t works on SCO
8336cat >> confdefs.h <<\EOF
8337#if defined(SCO_DS)
8338#undef _OFF_T
8339#endif
8340EOF
8341
Guido van Rossumef2255b2000-03-10 22:30:29 +00008342# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008343ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008344if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008345
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347
8348cat >>confdefs.h <<_ACEOF
8349#define mode_t int
8350_ACEOF
8351
8352fi
8353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008355if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008357else
Martin v. Löwis11437992002-04-12 09:54:03 +00008358
8359cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008361_ACEOF
8362
8363fi
8364
Matthias Kloseb9621712010-04-24 17:59:49 +00008365ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008366if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008368else
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
8370cat >>confdefs.h <<_ACEOF
8371#define pid_t int
8372_ACEOF
8373
8374fi
8375
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008376
Martin v. Löwis11437992002-04-12 09:54:03 +00008377cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008378#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008379_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008382if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
8386cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
8389
8390fi
8391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8393$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008396else
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008399#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008400
8401_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008404 ac_cv_type_uid_t=yes
8405else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406 ac_cv_type_uid_t=no
8407fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008408rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008409
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8412$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008413if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417
Matthias Kloseb9621712010-04-24 17:59:49 +00008418$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008419
8420fi
8421
Mark Dickinson983bc162012-12-02 12:11:38 +00008422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
Matthias Kloseb9621712010-04-24 17:59:49 +00008426$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008427
8428fi
8429
Stefan Krah1919b7e2012-03-21 18:25:23 +01008430ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8431if test "x$ac_cv_type___uint128_t" = xyes; then :
8432
8433$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8434
8435fi
8436
Jack Jansendd19cf82001-12-06 22:36:17 +00008437
Michael W. Hudson54241132001-12-07 15:38:26 +00008438# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008439# ANSI C requires sizeof(char) == 1, so no need to check it
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 int" >&5
8445$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008446if ${ac_cv_sizeof_int+:} 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 (int))" "ac_cv_sizeof_int" "$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_int" = 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 (int)
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_int=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_int" >&5
8464$as_echo "$ac_cv_sizeof_int" >&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 Rossumccaf3b61996-12-06 21:19:16 +00008469#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008470_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +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 long" >&5
8478$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008479if ${ac_cv_sizeof_long+:} 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 (long))" "ac_cv_sizeof_long" "$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_long" = 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 (long)
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_long=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_long" >&5
8497$as_echo "$ac_cv_sizeof_long" >&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 Rossumccaf3b61996-12-06 21:19:16 +00008502#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008503_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008504
8505
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.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8511$as_echo_n "checking size of long long... " >&6; }
8512if ${ac_cv_sizeof_long_long+:} false; then :
8513 $as_echo_n "(cached) " >&6
8514else
8515 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8516
8517else
8518 if test "$ac_cv_type_long_long" = 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;}
8521as_fn_error 77 "cannot compute sizeof (long long)
8522See \`config.log' for more details" "$LINENO" 5; }
8523 else
8524 ac_cv_sizeof_long_long=0
8525 fi
8526fi
8527
8528fi
8529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8530$as_echo "$ac_cv_sizeof_long_long" >&6; }
8531
8532
8533
8534cat >>confdefs.h <<_ACEOF
8535#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8536_ACEOF
8537
8538
8539# 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 void *" >&5
8544$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008545if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 +00008549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 if test "$ac_cv_type_void_p" = 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 (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008555See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 else
8557 ac_cv_sizeof_void_p=0
8558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8563$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
8565
8566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008568#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008570
8571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572# 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.
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8577$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008578if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 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 +00008582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 if test "$ac_cv_type_short" = 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;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008587as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008588See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 else
8590 ac_cv_sizeof_short=0
8591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8596$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597
8598
8599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008601#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008602_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008603
8604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605# The cast to long int works around a bug in the HP C Compiler
8606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8608# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8610$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008611if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 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 +00008615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 if test "$ac_cv_type_float" = yes; then
8618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008620as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008621See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 else
8623 ac_cv_sizeof_float=0
8624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8629$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630
8631
8632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008634#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008635_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008636
8637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638# The cast to long int works around a bug in the HP C Compiler
8639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8641# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8643$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008644if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 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 +00008648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 if test "$ac_cv_type_double" = yes; then
8651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008653as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008654See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655 else
8656 ac_cv_sizeof_double=0
8657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8662$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663
8664
8665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008667#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008668_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669
8670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671# The cast to long int works around a bug in the HP C Compiler
8672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8676$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008677if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 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 +00008681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 if test "$ac_cv_type_fpos_t" = yes; then
8684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008686as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008687See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688 else
8689 ac_cv_sizeof_fpos_t=0
8690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8695$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696
8697
8698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008700#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008701_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008702
Michael W. Hudson54241132001-12-07 15:38:26 +00008703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704# The cast to long int works around a bug in the HP C Compiler
8705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8707# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8709$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008712else
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 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 +00008714
Martin v. Löwis18e16552006-02-15 17:27:45 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 if test "$ac_cv_type_size_t" = yes; then
8717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008719as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008720See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721 else
8722 ac_cv_sizeof_size_t=0
8723 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725
Martin v. Löwis18e16552006-02-15 17:27:45 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8728$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729
8730
8731
Martin v. Löwis18e16552006-02-15 17:27:45 +00008732cat >>confdefs.h <<_ACEOF
8733#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8734_ACEOF
8735
8736
Christian Heimes400adb02008-02-01 08:12:03 +00008737# The cast to long int works around a bug in the HP C Compiler
8738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8740# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8742$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008743if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 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 +00008747
Christian Heimes400adb02008-02-01 08:12:03 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 if test "$ac_cv_type_pid_t" = yes; then
8750 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008752as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008753See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008754 else
8755 ac_cv_sizeof_pid_t=0
8756 fi
8757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758
Christian Heimes400adb02008-02-01 08:12:03 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8761$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008762
8763
8764
8765cat >>confdefs.h <<_ACEOF
8766#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8767_ACEOF
8768
8769
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008770# The cast to long int works around a bug in the HP C Compiler
8771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8773# This bug is HP SR number 8606223364.
8774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8775$as_echo_n "checking size of uintptr_t... " >&6; }
8776if ${ac_cv_sizeof_uintptr_t+:} false; then :
8777 $as_echo_n "(cached) " >&6
8778else
8779 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8780
8781else
8782 if test "$ac_cv_type_uintptr_t" = yes; then
8783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8785as_fn_error 77 "cannot compute sizeof (uintptr_t)
8786See \`config.log' for more details" "$LINENO" 5; }
8787 else
8788 ac_cv_sizeof_uintptr_t=0
8789 fi
8790fi
8791
8792fi
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8794$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8795
8796
8797
8798cat >>confdefs.h <<_ACEOF
8799#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8800_ACEOF
8801
8802
Michael W. Hudson54241132001-12-07 15:38:26 +00008803
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008804
Eitan Adler3055c942018-05-15 22:58:09 -07008805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8806$as_echo_n "checking for long double... " >&6; }
8807if ${ac_cv_type_long_double+:} false; then :
8808 $as_echo_n "(cached) " >&6
8809else
8810 if test "$GCC" = yes; then
8811 ac_cv_type_long_double=yes
8812 else
8813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8814/* end confdefs.h. */
8815/* The Stardent Vistra knows sizeof (long double), but does
8816 not support it. */
8817 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008818int
8819main ()
8820{
Eitan Adler3055c942018-05-15 22:58:09 -07008821static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8822 sizeof (double) <= sizeof (long double))];
8823test_array [0] = 0;
8824return test_array [0];
8825
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008826 ;
8827 return 0;
8828}
8829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008831 ac_cv_type_long_double=yes
8832else
8833 ac_cv_type_long_double=no
8834fi
8835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8836 fi
8837fi
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8839$as_echo "$ac_cv_type_long_double" >&6; }
8840 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008843
Eitan Adler3055c942018-05-15 22:58:09 -07008844 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008845
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008846# The cast to long int works around a bug in the HP C Compiler
8847# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8848# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8849# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8851$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008852if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008854else
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 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 +00008856
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 if test "$ac_cv_type_long_double" = yes; then
8859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008861as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008862See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008863 else
8864 ac_cv_sizeof_long_double=0
8865 fi
8866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8870$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008871
8872
8873
8874cat >>confdefs.h <<_ACEOF
8875#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8876_ACEOF
8877
8878
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880# The cast to long int works around a bug in the HP C Compiler
8881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8885$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008886if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 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 +00008890
Thomas Woutersb2137042007-02-01 18:02:27 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if test "$ac_cv_type__Bool" = yes; then
8893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008895as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008896See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897 else
8898 ac_cv_sizeof__Bool=0
8899 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901
Thomas Woutersb2137042007-02-01 18:02:27 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8904$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905
8906
8907
Thomas Woutersb2137042007-02-01 18:02:27 +00008908cat >>confdefs.h <<_ACEOF
8909#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8910_ACEOF
8911
8912
Thomas Woutersb2137042007-02-01 18:02:27 +00008913
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914# The cast to long int works around a bug in the HP C Compiler
8915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8917# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8919$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008920if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008922else
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924#ifdef HAVE_SYS_TYPES_H
8925#include <sys/types.h>
8926#endif
8927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930else
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 if test "$ac_cv_type_off_t" = yes; then
8932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008934as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008935See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008936 else
8937 ac_cv_sizeof_off_t=0
8938 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8943$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945
8946
Martin v. Löwis11437992002-04-12 09:54:03 +00008947cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008948#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950
Michael W. Hudson54241132001-12-07 15:38:26 +00008951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8954$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008955if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008956 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8961$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8964$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008965fi
8966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967# The cast to long int works around a bug in the HP C Compiler
8968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8970# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8972$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008973if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975else
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977#ifdef HAVE_SYS_TYPES_H
8978#include <sys/types.h>
8979#endif
8980#ifdef HAVE_TIME_H
8981#include <time.h>
8982#endif
8983
Matthias Kloseb9621712010-04-24 17:59:49 +00008984"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 if test "$ac_cv_type_time_t" = yes; then
8988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008990as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008991See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008992 else
8993 ac_cv_sizeof_time_t=0
8994 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8999$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
9002
Martin v. Löwis11437992002-04-12 09:54:03 +00009003cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009004#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009005_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006
Michael W. Hudson54241132001-12-07 15:38:26 +00009007
9008
Trent Mick635f6fb2000-08-23 21:33:05 +00009009# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009010ac_save_cc="$CC"
9011if test "$ac_cv_kpthread" = "yes"
9012then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009013elif test "$ac_cv_kthread" = "yes"
9014then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009015elif test "$ac_cv_pthread" = "yes"
9016then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009017fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009018
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9020$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009021have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009023/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
9025 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009026int
9027main ()
9028{
Guido van Rossum12580492000-09-24 16:47:19 +00009029pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 ;
9031 return 0;
9032}
Matthias Kloseb159a552010-04-25 21:00:44 +00009033
Martin v. Löwis11437992002-04-12 09:54:03 +00009034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009035if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009036 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9040$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009041if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9047$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009048if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009050else
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052#ifdef HAVE_PTHREAD_H
9053#include <pthread.h>
9054#endif
9055
Matthias Kloseb9621712010-04-24 17:59:49 +00009056"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 if test "$ac_cv_type_pthread_t" = yes; then
9060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009062as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009063See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064 else
9065 ac_cv_sizeof_pthread_t=0
9066 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009068
Trent Mick635f6fb2000-08-23 21:33:05 +00009069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9071$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073
9074
Martin v. Löwis11437992002-04-12 09:54:03 +00009075cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009076#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009077_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009079
Trent Mick635f6fb2000-08-23 21:33:05 +00009080fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009081
9082# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9083# This checking will be unnecessary after removing deprecated TLS API.
9084# The cast to long int works around a bug in the HP C Compiler
9085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9087# This bug is HP SR number 8606223364.
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9089$as_echo_n "checking size of pthread_key_t... " >&6; }
9090if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9091 $as_echo_n "(cached) " >&6
9092else
9093 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9094"; then :
9095
9096else
9097 if test "$ac_cv_type_pthread_key_t" = yes; then
9098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9100as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9101See \`config.log' for more details" "$LINENO" 5; }
9102 else
9103 ac_cv_sizeof_pthread_key_t=0
9104 fi
9105fi
9106
9107fi
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9109$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9110
9111
9112
9113cat >>confdefs.h <<_ACEOF
9114#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9115_ACEOF
9116
9117
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9119$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9120if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9122/* end confdefs.h. */
9123#include <pthread.h>
9124int
9125main ()
9126{
9127pthread_key_t k; k * 1;
9128 ;
9129 return 0;
9130}
9131_ACEOF
9132if ac_fn_c_try_compile "$LINENO"; then :
9133 ac_pthread_key_t_is_arithmetic_type=yes
9134else
9135 ac_pthread_key_t_is_arithmetic_type=no
9136
9137fi
9138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9140$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9141 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9142
9143$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9144
9145 fi
9146else
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
9149fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009150CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009151
Michael W. Hudson54241132001-12-07 15:38:26 +00009152
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009153case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009154 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009155 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9156 ;;
9157 Darwin/*)
9158 OTHER_LIBTOOL_OPT=""
9159 ;;
9160esac
9161
9162
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009163
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009164case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009165 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009166 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9167 if test "${enable_universalsdk}"; then
9168 :
9169 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009170 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009171 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009172 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009173 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009174 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009175 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009176 if test ${gcc_version} '<' 4.0
9177 then
9178 LIBTOOL_CRUFT="-lcc_dynamic"
9179 else
9180 LIBTOOL_CRUFT=""
9181 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009183 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009184else
Matthias Kloseb9621712010-04-24 17:59:49 +00009185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009186/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009187
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009188 #include <unistd.h>
9189 int main(int argc, char*argv[])
9190 {
9191 if (sizeof(long) == 4) {
9192 return 0;
9193 } else {
9194 return 1;
9195 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009196 }
9197
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009199if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009200 ac_osx_32bit=yes
9201else
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009206fi
9207
9208
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009209 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009210 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009211 i386)
9212 MACOSX_DEFAULT_ARCH="i386"
9213 ;;
9214 ppc)
9215 MACOSX_DEFAULT_ARCH="ppc"
9216 ;;
9217 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009218 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009219 ;;
9220 esac
9221 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009222 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009223 i386)
9224 MACOSX_DEFAULT_ARCH="x86_64"
9225 ;;
9226 ppc)
9227 MACOSX_DEFAULT_ARCH="ppc64"
9228 ;;
9229 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009230 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009231 ;;
9232 esac
9233
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234 fi
9235
9236 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009237 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009238 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009239esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9241$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009242if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009243then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009244 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009246 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009247
Matthias Kloseb9621712010-04-24 17:59:49 +00009248$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
Matthias Kloseb9621712010-04-24 17:59:49 +00009250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9251$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009252 if test $enable_shared = "yes"
9253 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009254 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 +00009255 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009256else
Matthias Kloseb9621712010-04-24 17:59:49 +00009257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259fi
9260
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9262$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009263case $ac_sys_system/$ac_sys_release in
9264 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009265
Matthias Kloseb9621712010-04-24 17:59:49 +00009266$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9269$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009270 ;;
9271 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009274 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009275esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009276
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278
Michael W. Hudson54241132001-12-07 15:38:26 +00009279
9280
9281
9282
Benjamin Peterson99f03762010-04-11 22:15:28 +00009283
Thomas Wouters477c8d52006-05-27 19:21:47 +00009284
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009285# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9286# -- usually .so, .sl on HP-UX, .dll on Cygwin
9287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9288$as_echo_n "checking the extension of shared libraries... " >&6; }
9289if test -z "$SHLIB_SUFFIX"; then
9290 case $ac_sys_system in
9291 hp*|HP*)
9292 case `uname -m` in
9293 ia64) SHLIB_SUFFIX=.so;;
9294 *) SHLIB_SUFFIX=.sl;;
9295 esac
9296 ;;
9297 CYGWIN*) SHLIB_SUFFIX=.dll;;
9298 *) SHLIB_SUFFIX=.so;;
9299 esac
9300fi
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9302$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009303
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009305# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306# (Shared libraries in this instance are shared modules to be loaded into
9307# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9309$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310if test -z "$LDSHARED"
9311then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009313 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009314 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009315 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009316 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009318 if test "$GCC" = "yes" ; then
9319 LDSHARED='$(CC) -shared'
9320 LDCXXSHARED='$(CXX) -shared'
9321 else
9322 LDSHARED='$(CC) -G'
9323 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009324 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009325 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009326 if test "$GCC" = "yes" ; then
9327 LDSHARED='$(CC) -shared'
9328 LDCXXSHARED='$(CXX) -shared'
9329 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009330 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009331 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009332 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009333 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009334 LDSHARED='$(CC) -bundle'
9335 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009336 if test "$enable_framework" ; then
9337 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009338 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9339 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009340 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009341 else
9342 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009343 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009344 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009345 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009346 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009347 LDSHARED='$(CC) -bundle'
9348 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009349 if test "$enable_framework" ; then
9350 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009351 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9352 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009353 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009354 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009355 # No framework, use the Python app as bundle-loader
9356 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009357 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009358 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009359 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009360 Darwin/*)
9361 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9362 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009363
Ned Deily36820b62014-06-25 13:44:22 -07009364 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9365 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9366 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9367 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9368 if test ${dep_target_major} -eq 10 && \
9369 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009370 then
Ned Deily36820b62014-06-25 13:44:22 -07009371 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009372 LDSHARED='$(CC) -bundle'
9373 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009374 if test "$enable_framework" ; then
9375 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009376 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9377 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009378 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009379 else
9380 # No framework, use the Python app as bundle-loader
9381 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9382 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009383 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009384 fi
Ned Deily36820b62014-06-25 13:44:22 -07009385 else
9386 # building for OS X 10.3 and later
9387 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9388 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9389 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009390 fi
9391 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009392 Linux*|GNU*|QNX*)
9393 LDSHARED='$(CC) -shared'
9394 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009395 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009396 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009397 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009398 LDSHARED='$(CC) -shared'
9399 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009400 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009401 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009402 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009403 OpenBSD*)
9404 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9405 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009406 LDSHARED='$(CC) -shared $(CCSHARED)'
9407 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009408 else
9409 case `uname -r` in
9410 [01].* | 2.[0-7] | 2.[0-7].*)
9411 LDSHARED="ld -Bshareable ${LDFLAGS}"
9412 ;;
9413 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009414 LDSHARED='$(CC) -shared $(CCSHARED)'
9415 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009416 ;;
9417 esac
9418 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009419 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009420 LDSHARED='$(CC) -shared'
9421 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009422 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009423 if test "$GCC" = "yes" ; then
9424 LDSHARED='$(CC) -shared'
9425 LDCXXSHARED='$(CXX) -shared'
9426 else
9427 LDSHARED='$(CC) -G'
9428 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009429 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009430 SCO_SV*)
9431 LDSHARED='$(CC) -Wl,-G,-Bexport'
9432 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9433 CYGWIN*)
9434 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9435 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009436 *) LDSHARED="ld";;
9437 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9440$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009442BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009443# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009444# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9446$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009447if test -z "$CCSHARED"
9448then
Guido van Rossum07397971997-04-29 21:49:50 +00009449 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009450 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009451 then CCSHARED="-fPIC";
9452 elif test `uname -p` = sparc;
9453 then CCSHARED="-xcode=pic32";
9454 else CCSHARED="-Kpic";
9455 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009456 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009457 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009458 else CCSHARED="+z";
9459 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009460 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009461 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009462 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009463 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009464 if test "$GCC" = "yes"
9465 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009466 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009467 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009468 SCO_SV*)
9469 if test "$GCC" = "yes"
9470 then CCSHARED="-fPIC"
9471 else CCSHARED="-Kpic -belf"
9472 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9476$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009478# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9480$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009481if test -z "$LINKFORSHARED"
9482then
Guido van Rossum07397971997-04-29 21:49:50 +00009483 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009484 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009485 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009486 LINKFORSHARED="-Wl,-E -Wl,+s";;
9487# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009488 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009489 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009490 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009492 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009493
9494 # Issue #18075: the default maximum stack size (8MBytes) is too
9495 # small for the default recursion limit. Increase the stack size
9496 # to ensure that tests don't crash
9497 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9498
Jack Jansene578a632001-08-15 01:27:14 +00009499 if test "$enable_framework"
9500 then
Jack Jansenda49e192005-01-07 13:08:22 +00009501 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009502 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009503 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009504 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009505 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009506 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009507 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009508 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9509 then
9510 LINKFORSHARED="-Wl,--export-dynamic"
9511 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009512 SunOS/5*) case $CC in
9513 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009514 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009515 then
9516 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009517 fi;;
9518 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009519 CYGWIN*)
9520 if test $enable_shared = "no"
9521 then
9522 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9523 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009524 QNX*)
9525 # -Wl,-E causes the symbols to be added to the dynamic
9526 # symbol table so that they can be found when a module
9527 # is loaded. -N 2048K causes the stack size to be set
9528 # to 2048 kilobytes so that the stack doesn't overflow
9529 # when running test_compile.py.
9530 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9534$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009535
Michael W. Hudson54241132001-12-07 15:38:26 +00009536
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9539$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009540if test ! "$LIBRARY" = "$LDLIBRARY"
9541then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009542 case $ac_sys_system in
9543 CYGWIN*)
9544 # Cygwin needs CCSHARED when building extension DLLs
9545 # but not when building the interpreter DLL.
9546 CFLAGSFORSHARED='';;
9547 *)
9548 CFLAGSFORSHARED='$(CCSHARED)'
9549 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9552$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009553
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009554# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9555# library (with --enable-shared).
9556# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009557# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9558# if it is not required, since it creates a dependency of the shared library
9559# to LIBS. This, in turn, means that applications linking the shared libpython
9560# don't need to link LIBS explicitly. The default should be only changed
9561# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009562
Matthias Kloseb9621712010-04-24 17:59:49 +00009563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9564$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009565case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009566 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009567 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009568esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9570$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009571
9572
Guido van Rossum627b2d71993-12-24 10:39:16 +00009573# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9575$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009577 $as_echo_n "(cached) " >&6
9578else
9579 ac_check_lib_save_LIBS=$LIBS
9580LIBS="-lsendfile $LIBS"
9581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9582/* end confdefs.h. */
9583
9584/* Override any GCC internal prototype to avoid an error.
9585 Use char because int might match the return type of a GCC
9586 builtin and then its argument prototype would still apply. */
9587#ifdef __cplusplus
9588extern "C"
9589#endif
9590char sendfile ();
9591int
9592main ()
9593{
9594return sendfile ();
9595 ;
9596 return 0;
9597}
9598_ACEOF
9599if ac_fn_c_try_link "$LINENO"; then :
9600 ac_cv_lib_sendfile_sendfile=yes
9601else
9602 ac_cv_lib_sendfile_sendfile=no
9603fi
9604rm -f core conftest.err conftest.$ac_objext \
9605 conftest$ac_exeext conftest.$ac_ext
9606LIBS=$ac_check_lib_save_LIBS
9607fi
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9609$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009610if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009611 cat >>confdefs.h <<_ACEOF
9612#define HAVE_LIBSENDFILE 1
9613_ACEOF
9614
9615 LIBS="-lsendfile $LIBS"
9616
9617fi
9618
Matthias Kloseb9621712010-04-24 17:59:49 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9620$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009621if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009623else
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009625LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629/* Override any GCC internal prototype to avoid an error.
9630 Use char because int might match the return type of a GCC
9631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009632#ifdef __cplusplus
9633extern "C"
9634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009635char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009636int
9637main ()
9638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ;
9641 return 0;
9642}
9643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009646else
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009649rm -f core conftest.err conftest.$ac_objext \
9650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009651LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9654$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009655if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 cat >>confdefs.h <<_ACEOF
9657#define HAVE_LIBDL 1
9658_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009659
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009660 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009662fi
9663 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9665$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009666if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009668else
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009670LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674/* Override any GCC internal prototype to avoid an error.
9675 Use char because int might match the return type of a GCC
9676 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677#ifdef __cplusplus
9678extern "C"
9679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009680char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ;
9686 return 0;
9687}
9688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009691else
Matthias Kloseb9621712010-04-24 17:59:49 +00009692 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009696LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9699$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009700if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 cat >>confdefs.h <<_ACEOF
9702#define HAVE_LIBDLD 1
9703_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009705 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009706
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009707fi
9708 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009709
Michael Felt0d3ccb42017-12-30 22:39:20 +01009710# checks for uuid.h location
9711for ac_header in uuid/uuid.h uuid.h
9712do :
9713 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9714ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9715if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9716 cat >>confdefs.h <<_ACEOF
9717#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9718_ACEOF
9719
9720fi
9721
9722done
9723
9724
Berker Peksag9a10ff42017-11-08 23:09:16 +03009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9726$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9728/* end confdefs.h. */
9729#include <uuid/uuid.h>
9730int
9731main ()
9732{
9733
9734#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009735void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009736#endif
9737
9738 ;
9739 return 0;
9740}
9741_ACEOF
9742if ac_fn_c_try_compile "$LINENO"; then :
9743
9744$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9745
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9747$as_echo "yes" >&6; }
9748else
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750$as_echo "no" >&6; }
9751
9752fi
9753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9754
Michael Felt0d3ccb42017-12-30 22:39:20 +01009755# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009756# FreeBSD and OpenBSD provides support as well
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9758$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9760/* end confdefs.h. */
9761#include <uuid.h>
9762int
9763main ()
9764{
9765
9766#ifndef uuid_create
9767void *x = uuid_create
9768#endif
9769
9770 ;
9771 return 0;
9772}
9773_ACEOF
9774if ac_fn_c_try_compile "$LINENO"; then :
9775
9776$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9777
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9779$as_echo "yes" >&6; }
9780else
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9782$as_echo "no" >&6; }
9783
9784fi
9785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9786
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009787# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9788# stream in big-endian byte-order
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9790$as_echo_n "checking for uuid_enc_be... " >&6; }
9791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9792/* end confdefs.h. */
9793#include <uuid.h>
9794int
9795main ()
9796{
9797
9798#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009799void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009800#endif
9801
9802 ;
9803 return 0;
9804}
9805_ACEOF
9806if ac_fn_c_try_compile "$LINENO"; then :
9807
9808$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9809
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9811$as_echo "yes" >&6; }
9812else
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815
9816fi
9817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9818
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009819# 'Real Time' functions on Solaris
9820# posix4 on Solaris 2.6
9821# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009823$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009826else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009827 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009837char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846for ac_lib in '' pthread rt posix4; do
9847 if test -z "$ac_lib"; then
9848 ac_res="none required"
9849 else
9850 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009851 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856rm -f core conftest.err conftest.$ac_objext \
9857 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009858 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861done
Victor Stinnere0be4232011-10-25 13:06:09 +02009862if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864else
9865 ac_cv_search_sem_init=no
9866fi
9867rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009868LIBS=$ac_func_search_save_LIBS
9869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9871$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009875
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009876fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009877
Martin v. Löwis519adae2003-09-20 10:47:47 +00009878
Martin v. Löwis19d17342003-06-14 21:03:05 +00009879# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9881$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009882if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009884else
9885 ac_check_lib_save_LIBS=$LIBS
9886LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009888/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890/* Override any GCC internal prototype to avoid an error.
9891 Use char because int might match the return type of a GCC
9892 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009893#ifdef __cplusplus
9894extern "C"
9895#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009896char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009897int
9898main ()
9899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009901 ;
9902 return 0;
9903}
9904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009905if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009906 ac_cv_lib_intl_textdomain=yes
9907else
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910rm -f core conftest.err conftest.$ac_objext \
9911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912LIBS=$ac_check_lib_save_LIBS
9913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9915$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009916if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009917
Matthias Kloseb9621712010-04-24 17:59:49 +00009918$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919
Brett Cannonc6d936e2009-06-07 20:09:53 +00009920 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921fi
9922
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009923
9924# checks for system dependent C++ extensions support
9925case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9927$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009930
Georg Brandl59e87bd2011-02-15 19:48:59 +00009931 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009932int
9933main ()
9934{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009935loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ;
9937 return 0;
9938}
Matthias Kloseb159a552010-04-25 21:00:44 +00009939
Martin v. Löwis11437992002-04-12 09:54:03 +00009940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009942
Matthias Kloseb159a552010-04-25 21:00:44 +00009943
Matthias Kloseb9621712010-04-24 17:59:49 +00009944$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009945
Matthias Kloseb159a552010-04-25 21:00:44 +00009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009947$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009948
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009949else
Matthias Kloseb159a552010-04-25 21:00:44 +00009950
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009953
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955rm -f core conftest.err conftest.$ac_objext \
9956 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957 *) ;;
9958esac
9959
Christian Heimes985ecdc2013-11-20 11:46:18 +01009960# check for systems that require aligned memory access
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9962$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009963if ${ac_cv_aligned_required+:} false; then :
9964 $as_echo_n "(cached) " >&6
9965else
9966 if test "$cross_compiling" = yes; then :
9967 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009968else
9969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9970/* end confdefs.h. */
9971
9972int main()
9973{
9974 char s[16];
9975 int i, *p1, *p2;
9976 for (i=0; i < 16; i++)
9977 s[i] = i;
9978 p1 = (int*)(s+1);
9979 p2 = (int*)(s+2);
9980 if (*p1 == *p2)
9981 return 1;
9982 return 0;
9983}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009984_ACEOF
9985if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009986 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009987else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009988 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009989fi
9990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9991 conftest.$ac_objext conftest.beam conftest.$ac_ext
9992fi
9993
9994
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009995fi
9996
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9998$as_echo "$ac_cv_aligned_required" >&6; }
9999if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010000
10001$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10002
10003fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010004
10005# str, bytes and memoryview hash algorithm
10006
10007
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10009$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10010
10011# Check whether --with-hash_algorithm was given.
10012if test "${with_hash_algorithm+set}" = set; then :
10013 withval=$with_hash_algorithm;
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10015$as_echo "$withval" >&6; }
10016case "$withval" in
10017 siphash24)
10018 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10019
10020 ;;
10021 fnv)
10022 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10023
10024 ;;
10025 *)
10026 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10027 ;;
10028esac
10029
10030else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10032$as_echo "default" >&6; }
10033fi
10034
10035
Charles-François Natalid30b0222014-05-08 23:08:51 +010010036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10037$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10038
10039# Check whether --with-address_sanitizer was given.
10040if test "${with_address_sanitizer+set}" = set; then :
10041 withval=$with_address_sanitizer;
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10043$as_echo "$withval" >&6; }
10044BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10045LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010046# ASan works by controlling memory allocation, our own malloc interferes.
10047with_pymalloc="no"
10048
10049else
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; }
10052fi
10053
10054
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10056$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10057
10058# Check whether --with-memory_sanitizer was given.
10059if test "${with_memory_sanitizer+set}" = set; then :
10060 withval=$with_memory_sanitizer;
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10062$as_echo "$withval" >&6; }
10063BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10064LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10065# MSan works by controlling memory allocation, our own malloc interferes.
10066with_pymalloc="no"
10067
10068else
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070$as_echo "no" >&6; }
10071fi
10072
10073
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10075$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10076
10077# Check whether --with-undefined_behavior_sanitizer was given.
10078if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10079 withval=$with_undefined_behavior_sanitizer;
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10081$as_echo "$withval" >&6; }
10082BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10083LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010084
10085else
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
10088fi
10089
10090
Guido van Rossum70c7f481998-03-26 18:44:10 +000010091# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10093$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010098LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010105#ifdef __cplusplus
10106extern "C"
10107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010108char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ;
10114 return 0;
10115}
10116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10127$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010128if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010129 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010130fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010131 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10133$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010134if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010136else
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010138LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142/* Override any GCC internal prototype to avoid an error.
10143 Use char because int might match the return type of a GCC
10144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145#ifdef __cplusplus
10146extern "C"
10147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010148char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010149int
10150main ()
10151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010158 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162rm -f core conftest.err conftest.$ac_objext \
10163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010164LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10167$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010168if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010169 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010170fi
10171 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010172
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10174$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10180$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010181LIBS="$withval $LIBS"
10182
10183else
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186fi
10187
Guido van Rossum7f43da71994-08-01 12:15:30 +000010188
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010189
10190
10191
10192
10193
10194
10195
10196if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10197 if test -n "$ac_tool_prefix"; then
10198 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10199set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10201$as_echo_n "checking for $ac_word... " >&6; }
10202if ${ac_cv_path_PKG_CONFIG+:} false; then :
10203 $as_echo_n "(cached) " >&6
10204else
10205 case $PKG_CONFIG in
10206 [\\/]* | ?:[\\/]*)
10207 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10208 ;;
10209 *)
10210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10211for as_dir in $PATH
10212do
10213 IFS=$as_save_IFS
10214 test -z "$as_dir" && as_dir=.
10215 for ac_exec_ext in '' $ac_executable_extensions; do
10216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10217 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10219 break 2
10220 fi
10221done
10222 done
10223IFS=$as_save_IFS
10224
10225 ;;
10226esac
10227fi
10228PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10229if test -n "$PKG_CONFIG"; then
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10231$as_echo "$PKG_CONFIG" >&6; }
10232else
10233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
10235fi
10236
10237
10238fi
10239if test -z "$ac_cv_path_PKG_CONFIG"; then
10240 ac_pt_PKG_CONFIG=$PKG_CONFIG
10241 # Extract the first word of "pkg-config", so it can be a program name with args.
10242set dummy pkg-config; ac_word=$2
10243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10244$as_echo_n "checking for $ac_word... " >&6; }
10245if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10246 $as_echo_n "(cached) " >&6
10247else
10248 case $ac_pt_PKG_CONFIG in
10249 [\\/]* | ?:[\\/]*)
10250 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10251 ;;
10252 *)
10253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10254for as_dir in $PATH
10255do
10256 IFS=$as_save_IFS
10257 test -z "$as_dir" && as_dir=.
10258 for ac_exec_ext in '' $ac_executable_extensions; do
10259 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10260 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10262 break 2
10263 fi
10264done
10265 done
10266IFS=$as_save_IFS
10267
10268 ;;
10269esac
10270fi
10271ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10272if test -n "$ac_pt_PKG_CONFIG"; then
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10274$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10275else
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10277$as_echo "no" >&6; }
10278fi
10279
10280 if test "x$ac_pt_PKG_CONFIG" = x; then
10281 PKG_CONFIG=""
10282 else
10283 case $cross_compiling:$ac_tool_warned in
10284yes:)
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10286$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10287ac_tool_warned=yes ;;
10288esac
10289 PKG_CONFIG=$ac_pt_PKG_CONFIG
10290 fi
10291else
10292 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10293fi
10294
10295fi
10296if test -n "$PKG_CONFIG"; then
10297 _pkg_min_version=0.9.0
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10299$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10300 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10302$as_echo "yes" >&6; }
10303 else
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
10306 PKG_CONFIG=""
10307 fi
10308fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010309
10310# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10312$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010313
10314# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010315if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010316 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010317else
10318 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010319fi
10320
10321
Matthias Kloseb9621712010-04-24 17:59:49 +000010322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10323$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010324
10325# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10327$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010328
10329# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010331 withval=$with_system_ffi;
10332fi
10333
10334
Zachary Waref40d4dd2016-09-17 01:25:24 -050010335if test "$ac_sys_system" = "Darwin"
10336then
10337 case "$with_system_ffi" in
10338 "")
10339 with_system_ffi="no"
10340 ;;
10341 yes|no)
10342 ;;
10343 *)
10344 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10345 ;;
10346 esac
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10348$as_echo "$with_system_ffi" >&6; }
10349else
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10351$as_echo "yes" >&6; }
10352 if test "$with_system_ffi" != ""
10353 then
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10355$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10356 fi
10357 with_system_ffi="yes"
10358fi
Zachary Ware935043d2016-09-09 17:01:21 -070010359
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010360if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010361 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10362else
10363 LIBFFI_INCLUDEDIR=""
10364fi
10365
10366
Stefan Krah60187b52012-03-23 19:06:27 +010010367# Check for use of the system libmpdec library
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10369$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10370
10371# Check whether --with-system_libmpdec was given.
10372if test "${with_system_libmpdec+set}" = set; then :
10373 withval=$with_system_libmpdec;
10374else
10375 with_system_libmpdec="no"
10376fi
10377
10378
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10380$as_echo "$with_system_libmpdec" >&6; }
10381
Benjamin Peterson076ed002010-10-31 17:11:02 +000010382# Check for support for loadable sqlite extensions
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10384$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10385# Check whether --enable-loadable-sqlite-extensions was given.
10386if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10387 enableval=$enable_loadable_sqlite_extensions;
10388else
10389 enable_loadable_sqlite_extensions="no"
10390fi
10391
10392
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10394$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10395
Ned Deilyd819b932013-09-06 01:07:05 -070010396# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10397
10398
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10400$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10401
10402# Check whether --with-tcltk-includes was given.
10403if test "${with_tcltk_includes+set}" = set; then :
10404 withval=$with_tcltk_includes;
10405else
10406 with_tcltk_includes="default"
10407fi
10408
10409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10410$as_echo "$with_tcltk_includes" >&6; }
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10412$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10413
10414# Check whether --with-tcltk-libs was given.
10415if test "${with_tcltk_libs+set}" = set; then :
10416 withval=$with_tcltk_libs;
10417else
10418 with_tcltk_libs="default"
10419fi
10420
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10422$as_echo "$with_tcltk_libs" >&6; }
10423if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10424then
10425 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10426 then
10427 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10428 fi
10429 TCLTK_INCLUDES=""
10430 TCLTK_LIBS=""
10431else
10432 TCLTK_INCLUDES="$with_tcltk_includes"
10433 TCLTK_LIBS="$with_tcltk_libs"
10434fi
10435
Matthias Klose55708cc2009-04-30 08:06:49 +000010436# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10438$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010439
10440# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010441if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010442 withval=$with_dbmliborder;
10443if test x$with_dbmliborder = xyes
10444then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010445as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010446else
10447 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10448 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10449 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010450 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010451 fi
10452 done
10453fi
10454fi
10455
Matthias Kloseb9621712010-04-24 17:59:49 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10457$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010458
Martin v. Löwis11437992002-04-12 09:54:03 +000010459# Templates for things AC_DEFINEd more than once.
10460# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010461
10462
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010463if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010464then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010465 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010467
10468 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010469elif test "$ac_cv_kpthread" = "yes"
10470then
10471 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010472 if test "$ac_cv_cxx_thread" = "yes"; then
10473 CXX="$CXX -Kpthread"
10474 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010475 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010476elif test "$ac_cv_kthread" = "yes"
10477then
10478 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010479 if test "$ac_cv_cxx_thread" = "yes"; then
10480 CXX="$CXX -Kthread"
10481 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010482 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010483elif test "$ac_cv_pthread" = "yes"
10484then
10485 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010486 if test "$ac_cv_cxx_thread" = "yes"; then
10487 CXX="$CXX -pthread"
10488 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010489 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010490else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010491 if test ! -z "$withval" -a -d "$withval"
10492 then LDFLAGS="$LDFLAGS -L$withval"
10493 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010494
10495 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010496 # define _POSIX_THREADS in unistd.h. Some apparently don't
10497 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10499$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010502
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010503#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010504#ifdef _POSIX_THREADS
10505yes
10506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010507
10508_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010511 unistd_defines_pthreads=yes
10512else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010513 unistd_defines_pthreads=no
10514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010515rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10518$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010521
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010522 # Just looking for pthread_create in libpthread is not enough:
10523 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10524 # So we really have to include pthread.h, and then link.
10525 _libs=$LIBS
10526 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10528$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010530/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010531
10532#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010533#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010534
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010535void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010536int
10537main ()
10538{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010539
10540pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010541 ;
10542 return 0;
10543}
10544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010546
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10548$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010549 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010550
Guido van Rossum02a1c402000-02-25 19:26:31 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010553 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010555if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010556
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010557 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010558
Guido van Rossumad678af1998-10-02 14:42:15 +000010559else
Guido van Rossumad678af1998-10-02 14:42:15 +000010560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10562$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010565else
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010567LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571/* Override any GCC internal prototype to avoid an error.
10572 Use char because int might match the return type of a GCC
10573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010574#ifdef __cplusplus
10575extern "C"
10576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010577char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010578int
10579main ()
10580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 ;
10583 return 0;
10584}
10585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010588else
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591rm -f core conftest.err conftest.$ac_objext \
10592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010593LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10596$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010597if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010598
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010599 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010600 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010601
Greg Steinadf63d62000-07-05 10:38:09 +000010602else
Greg Steinadf63d62000-07-05 10:38:09 +000010603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10605$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010606if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010608else
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010610LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614/* Override any GCC internal prototype to avoid an error.
10615 Use char because int might match the return type of a GCC
10616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010617#ifdef __cplusplus
10618extern "C"
10619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010620char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010621int
10622main ()
10623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010634rm -f core conftest.err conftest.$ac_objext \
10635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10639$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010640if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010641
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010642 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010643 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010644
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010645else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10648$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010649if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010653LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657/* Override any GCC internal prototype to avoid an error.
10658 Use char because int might match the return type of a GCC
10659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010660#ifdef __cplusplus
10661extern "C"
10662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010663char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010664int
10665main ()
10666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 ;
10669 return 0;
10670}
10671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010674else
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677rm -f core conftest.err conftest.$ac_objext \
10678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010679LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10682$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010684
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010685 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010686 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010687
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010688else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10691$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010694else
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010696LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700/* Override any GCC internal prototype to avoid an error.
10701 Use char because int might match the return type of a GCC
10702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010703#ifdef __cplusplus
10704extern "C"
10705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010706char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010707int
10708main ()
10709{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010715if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010717else
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720rm -f core conftest.err conftest.$ac_objext \
10721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010722LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10725$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010726if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010727
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010728 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010729 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010730
Guido van Rossumb93a8621998-05-07 13:27:32 +000010731else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010732
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010733 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10734
Guido van Rossum2d38f911996-06-26 19:47:01 +000010735fi
10736
Guido van Rossum627b2d71993-12-24 10:39:16 +000010737
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010738fi
10739
Guido van Rossum0be3e491997-05-22 20:33:33 +000010740fi
10741
Guido van Rossum49545951997-12-02 19:28:29 +000010742fi
10743
Guido van Rossumb93a8621998-05-07 13:27:32 +000010744fi
10745
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010747rm -f core conftest.err conftest.$ac_objext \
10748 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010749
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10751$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010752if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010754else
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010756LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760/* Override any GCC internal prototype to avoid an error.
10761 Use char because int might match the return type of a GCC
10762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763#ifdef __cplusplus
10764extern "C"
10765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010766char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010767int
10768main ()
10769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
10774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010780rm -f core conftest.err conftest.$ac_objext \
10781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10785$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010787
Martin v. Löwis130fb172001-07-19 11:00:41 +000010788 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010789
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790fi
10791
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010793fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010794
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010795if test "$posix_threads" = "yes"; then
10796 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010799
10800 fi
10801
10802 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10803 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010804 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010805$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010806
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010807 ;;
10808 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010810
10811 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010812 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010814
10815 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010816 esac
10817
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10819$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010820 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824 ac_cv_pthread_system_supported=no
10825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010828
10829 #include <stdio.h>
10830 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010831 void *foo(void *parm) {
10832 return NULL;
10833 }
10834 main() {
10835 pthread_attr_t attr;
10836 pthread_t id;
10837 if (pthread_attr_init(&attr)) exit(-1);
10838 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10839 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10840 exit(0);
10841 }
10842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010843if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 ac_cv_pthread_system_supported=yes
10845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010850fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852
Guido van Rossum627b2d71993-12-24 10:39:16 +000010853fi
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10856$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010857 if test "$ac_cv_pthread_system_supported" = "yes"; then
10858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860
10861 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 for ac_func in pthread_sigmask
10863do :
10864 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010865if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010867#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010869 case $ac_sys_system in
10870 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010873
10874 ;;
10875 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876fi
10877done
10878
pdoxe14679c2017-10-05 00:01:56 -070010879 for ac_func in pthread_getcpuclockid
10880do :
10881 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10882if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10883 cat >>confdefs.h <<_ACEOF
10884#define HAVE_PTHREAD_GETCPUCLOCKID 1
10885_ACEOF
10886
10887fi
10888done
10889
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010890fi
10891
10892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10896$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010897# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010898if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903 ipv6=no
10904 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10906$as_echo "yes" >&6; }
10907 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908
10909 ipv6=yes
10910 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912else
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916 /* AF_INET6 available check */
10917#include <sys/types.h>
10918#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010919int
10920main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010922int domain = AF_INET6;
10923 ;
10924 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925}
Martin v. Löwis11437992002-04-12 09:54:03 +000010926_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010927if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10930$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010932
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933else
Matthias Kloseb159a552010-04-25 21:00:44 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010938
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010942if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10944$as_echo_n "checking if RFC2553 API is available... " >&6; }
10945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010947
10948 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010949#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010950int
10951main ()
10952{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010953struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010954 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010955 ;
10956 return 0;
10957}
Matthias Kloseb159a552010-04-25 21:00:44 +000010958
Martin v. Löwis11437992002-04-12 09:54:03 +000010959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010960if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010961
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010964 ipv6=yes
10965
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010966else
Matthias Kloseb159a552010-04-25 21:00:44 +000010967
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010969$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010970 ipv6=no
10971
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010974fi
10975
10976if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010978
10979fi
10980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981fi
10982
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983
10984ipv6type=unknown
10985ipv6lib=none
10986ipv6trylibc=no
10987
10988if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10990$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010991 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10992 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993 case $i in
10994 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998#include <netinet/in.h>
10999#ifdef IPV6_INRIA_VERSION
11000yes
11001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011005 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008
11009 ;;
11010 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014#include <netinet/in.h>
11015#ifdef __KAME__
11016yes
11017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021 ipv6type=$i;
11022 ipv6lib=inet6
11023 ipv6libdir=/usr/local/v6/lib
11024 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027
11028 ;;
11029 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033#include <features.h>
11034#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11035yes
11036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040 ipv6type=$i;
11041 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044
11045 ;;
11046 linux-inet6)
11047 if test -d /usr/inet6; then
11048 ipv6type=$i
11049 ipv6lib=inet6
11050 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011051 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052 fi
11053 ;;
11054 solaris)
11055 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011056 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057 ipv6type=$i
11058 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059 fi
11060 fi
11061 ;;
11062 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066#include <sys/param.h>
11067#ifdef _TOSHIBA_INET6
11068yes
11069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073 ipv6type=$i;
11074 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011075 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078
11079 ;;
11080 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011082/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084#include </usr/local/v6/include/sys/v6config.h>
11085#ifdef __V6D__
11086yes
11087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091 ipv6type=$i;
11092 ipv6lib=v6;
11093 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011094 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097
11098 ;;
11099 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103#include <sys/param.h>
11104#ifdef _ZETA_MINAMI_INET6
11105yes
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i;
11111 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011112 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011114rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115
11116 ;;
11117 esac
11118 if test "$ipv6type" != "unknown"; then
11119 break
11120 fi
11121 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11123$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124fi
11125
11126if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11127 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11128 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11129 echo "using lib$ipv6lib"
11130 else
11131 if test $ipv6trylibc = "yes"; then
11132 echo "using libc"
11133 else
11134 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11135 echo "You need to fetch lib$ipv6lib.a from appropriate"
11136 echo 'ipv6 kit and compile beforehand.'
11137 exit 1
11138 fi
11139 fi
11140fi
11141
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11143$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11145/* end confdefs.h. */
11146 /* CAN_RAW_FD_FRAMES available check */
11147#include <linux/can/raw.h>
11148int
11149main ()
11150{
11151int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11152 ;
11153 return 0;
11154}
11155_ACEOF
11156if ac_fn_c_try_compile "$LINENO"; then :
11157
11158
11159$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11160
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11162$as_echo "yes" >&6; }
11163
11164else
11165
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
11168
11169fi
11170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11171
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011172# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11174$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178 withval=$with_doc_strings;
11179fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011180
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011181
11182if test -z "$with_doc_strings"
11183then with_doc_strings="yes"
11184fi
11185if test "$with_doc_strings" != "no"
11186then
11187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011189
11190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11192$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011193
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011194# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11196$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011199if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200 withval=$with_pymalloc;
11201fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011202
Neil Schemenauera35c6882001-02-27 04:45:05 +000011203
Neil Schemenauer16c22972002-03-22 15:34:49 +000011204if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011205then
11206 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011207fi
11208if test "$with_pymalloc" != "no"
11209then
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011212
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011213 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11216$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011217
Nick Coghlan6ea41862017-06-11 13:16:15 +100011218# Check for --with-c-locale-coercion
11219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11220$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11221
11222# Check whether --with-c-locale-coercion was given.
11223if test "${with_c_locale_coercion+set}" = set; then :
11224 withval=$with_c_locale_coercion;
11225fi
11226
11227
11228if test -z "$with_c_locale_coercion"
11229then
11230 with_c_locale_coercion="yes"
11231fi
11232if test "$with_c_locale_coercion" != "no"
11233then
11234
11235$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11236
11237fi
11238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11239$as_echo "$with_c_locale_coercion" >&6; }
11240
Benjamin Peterson05159c42009-12-03 03:01:27 +000011241# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11243$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011244
11245# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011246if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011247 withval=$with_valgrind;
11248else
11249 with_valgrind=no
11250fi
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11253$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011254if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 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 +020011256if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011259
11260else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011261 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011262
11263fi
11264
11265
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011266 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011267fi
11268
Łukasz Langaa785c872016-09-09 17:37:37 -070011269# Check for DTrace support
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11271$as_echo_n "checking for --with-dtrace... " >&6; }
11272
11273# Check whether --with-dtrace was given.
11274if test "${with_dtrace+set}" = set; then :
11275 withval=$with_dtrace;
11276else
11277 with_dtrace=no
11278fi
11279
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11281$as_echo "$with_dtrace" >&6; }
11282
11283
11284
11285
11286
11287DTRACE=
11288DFLAGS=
11289DTRACE_HEADERS=
11290DTRACE_OBJS=
11291
11292if test "$with_dtrace" = "yes"
11293then
11294 # Extract the first word of "dtrace", so it can be a program name with args.
11295set dummy dtrace; ac_word=$2
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11297$as_echo_n "checking for $ac_word... " >&6; }
11298if ${ac_cv_path_DTRACE+:} false; then :
11299 $as_echo_n "(cached) " >&6
11300else
11301 case $DTRACE in
11302 [\\/]* | ?:[\\/]*)
11303 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11304 ;;
11305 *)
11306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11307for as_dir in $PATH
11308do
11309 IFS=$as_save_IFS
11310 test -z "$as_dir" && as_dir=.
11311 for ac_exec_ext in '' $ac_executable_extensions; do
11312 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11313 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11315 break 2
11316 fi
11317done
11318 done
11319IFS=$as_save_IFS
11320
11321 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11322 ;;
11323esac
11324fi
11325DTRACE=$ac_cv_path_DTRACE
11326if test -n "$DTRACE"; then
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11328$as_echo "$DTRACE" >&6; }
11329else
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
11332fi
11333
11334
11335 if test "$DTRACE" = "not found"; then
11336 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11337 fi
11338
11339$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11340
11341 DTRACE_HEADERS="Include/pydtrace_probes.h"
11342
11343 # On OS X, DTrace providers do not need to be explicitly compiled and
11344 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11345 # generation flag '-G'. We check for presence of this flag, rather than
11346 # hardcoding support by OS, in the interest of robustness.
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11348$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11349if ${ac_cv_dtrace_link+:} false; then :
11350 $as_echo_n "(cached) " >&6
11351else
11352 ac_cv_dtrace_link=no
11353 echo 'BEGIN' > conftest.d
11354 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11355 ac_cv_dtrace_link=yes
11356
11357fi
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11359$as_echo "$ac_cv_dtrace_link" >&6; }
11360 if test "$ac_cv_dtrace_link" = "yes"; then
11361 DTRACE_OBJS="Python/pydtrace.o"
11362 fi
11363fi
11364
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011365# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011366
Guido van Rossum98935bf2001-09-05 19:13:16 +000011367DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011368
Guido van Rossume97ee181999-12-20 21:27:22 +000011369# the dlopen() function means we might want to use dynload_shlib.o. some
11370# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011371for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011372do :
11373 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011374if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011376#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011377_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011378
Guido van Rossume97ee181999-12-20 21:27:22 +000011379fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011380done
Guido van Rossume97ee181999-12-20 21:27:22 +000011381
Michael W. Hudson54241132001-12-07 15:38:26 +000011382
Guido van Rossume97ee181999-12-20 21:27:22 +000011383# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11384# loading of modules.
11385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11387$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011388if test -z "$DYNLOADFILE"
11389then
11390 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011391 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11392 if test "$ac_cv_func_dlopen" = yes
11393 then DYNLOADFILE="dynload_shlib.o"
11394 else DYNLOADFILE="dynload_aix.o"
11395 fi
11396 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011397 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011398 *)
11399 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11400 # out any dynamic loading
11401 if test "$ac_cv_func_dlopen" = yes
11402 then DYNLOADFILE="dynload_shlib.o"
11403 else DYNLOADFILE="dynload_stub.o"
11404 fi
11405 ;;
11406 esac
11407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11409$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011410if test "$DYNLOADFILE" != "dynload_stub.o"
11411then
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011414
11415fi
11416
Neil Schemenauer4e425612001-06-19 15:44:15 +000011417# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11418
Michael W. Hudson54241132001-12-07 15:38:26 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11421$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011422if test -z "$MACHDEP_OBJS"
11423then
Jack Jansene578a632001-08-15 01:27:14 +000011424 MACHDEP_OBJS=$extra_machdep_objs
11425else
11426 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011427fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011428if test -z "$MACHDEP_OBJS"; then
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11430$as_echo "none" >&6; }
11431else
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11433$as_echo "$MACHDEP_OBJS" >&6; }
11434fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011435
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011437for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011438 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011439 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011440 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011441 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011442 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011443 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011444 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011445 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011446 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011447 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011448 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011449 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011450 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011451 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011452 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011453 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11454 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011455 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011456 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011457 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011458 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011459 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011460do :
11461 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11462ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011463if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011465#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011466_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011468fi
11469done
11470
Michael W. Hudson54241132001-12-07 15:38:26 +000011471
Benjamin Peterson40caa052018-09-12 15:52:40 -070011472# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11473# links. Some libc implementations have a stub lchmod implementation that always
11474# returns an error.
11475if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011476 for ac_func in lchmod
11477do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011478 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11479if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011480 cat >>confdefs.h <<_ACEOF
11481#define HAVE_LCHMOD 1
11482_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011483
11484fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011485done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011486
11487fi
11488
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011489ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11490 #include <dirent.h>
11491"
11492if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11493
11494$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11495
11496fi
11497
11498
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011499# For some functions, having a definition is not sufficient, since
11500# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11502$as_echo_n "checking for chroot... " >&6; }
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011504/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011505#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011506int
11507main ()
11508{
11509void *x=chroot
11510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011515
Matthias Kloseb9621712010-04-24 17:59:49 +000011516$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011517
Matthias Kloseb159a552010-04-25 21:00:44 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011523
11524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11527$as_echo_n "checking for link... " >&6; }
11528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011530#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011531int
11532main ()
11533{
11534void *x=link
11535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011540
Matthias Kloseb9621712010-04-24 17:59:49 +000011541$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011542
Matthias Kloseb159a552010-04-25 21:00:44 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548
11549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11552$as_echo_n "checking for symlink... " >&6; }
11553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011554/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011556int
11557main ()
11558{
11559void *x=symlink
11560 ;
11561 return 0;
11562}
11563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011567
Matthias Kloseb159a552010-04-25 21:00:44 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11572$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573
11574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11577$as_echo_n "checking for fchdir... " >&6; }
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011580#include <unistd.h>
11581int
11582main ()
11583{
11584void *x=fchdir
11585 ;
11586 return 0;
11587}
11588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011592
Matthias Kloseb159a552010-04-25 21:00:44 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011598
11599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11602$as_echo_n "checking for fsync... " >&6; }
11603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011604/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011605#include <unistd.h>
11606int
11607main ()
11608{
11609void *x=fsync
11610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011617
Matthias Kloseb159a552010-04-25 21:00:44 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011623
11624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11627$as_echo_n "checking for fdatasync... " >&6; }
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011630#include <unistd.h>
11631int
11632main ()
11633{
11634void *x=fdatasync
11635 ;
11636 return 0;
11637}
11638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011642
Matthias Kloseb159a552010-04-25 21:00:44 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648
11649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11652$as_echo_n "checking for epoll... " >&6; }
11653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011654/* end confdefs.h. */
11655#include <sys/epoll.h>
11656int
11657main ()
11658{
11659void *x=epoll_create
11660 ;
11661 return 0;
11662}
11663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011667
Matthias Kloseb159a552010-04-25 21:00:44 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11672$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011673
11674fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11677$as_echo_n "checking for epoll_create1... " >&6; }
11678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11679/* end confdefs.h. */
11680#include <sys/epoll.h>
11681int
11682main ()
11683{
11684void *x=epoll_create1
11685 ;
11686 return 0;
11687}
11688_ACEOF
11689if ac_fn_c_try_compile "$LINENO"; then :
11690
11691$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11692
11693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11694$as_echo "yes" >&6; }
11695else
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11697$as_echo "no" >&6; }
11698
11699fi
11700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11702$as_echo_n "checking for kqueue... " >&6; }
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011704/* end confdefs.h. */
11705
11706#include <sys/types.h>
11707#include <sys/event.h>
11708
11709int
11710main ()
11711{
11712int x=kqueue()
11713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011720
Matthias Kloseb159a552010-04-25 21:00:44 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726
11727fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11730$as_echo_n "checking for prlimit... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11732/* end confdefs.h. */
11733
11734#include <sys/time.h>
11735#include <sys/resource.h>
11736
11737int
11738main ()
11739{
11740void *x=prlimit
11741 ;
11742 return 0;
11743}
11744_ACEOF
11745if ac_fn_c_try_compile "$LINENO"; then :
11746
11747$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11748
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11750$as_echo "yes" >&6; }
11751else
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
11754
11755fi
11756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11757
Martin v. Löwisd5843682002-11-21 20:41:28 +000011758# On some systems (eg. FreeBSD 5), we would find a definition of the
11759# functions ctermid_r, setgroups in the library, but no prototype
11760# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11761# address to avoid compiler warnings and potential miscompilations
11762# because of the missing prototypes.
11763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11765$as_echo_n "checking for ctermid_r... " >&6; }
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011768
Martin v. Löwisd5843682002-11-21 20:41:28 +000011769#include <stdio.h>
11770
Martin v. Löwisd5843682002-11-21 20:41:28 +000011771int
11772main ()
11773{
11774void* p = ctermid_r
11775 ;
11776 return 0;
11777}
11778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011782
Matthias Kloseb159a552010-04-25 21:00:44 +000011783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011788
11789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11791
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11793$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011794if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011795 $as_echo_n "(cached) " >&6
11796else
11797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011798/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011799#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011800int
11801main ()
11802{
11803void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011804
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011810 ac_cv_flock_decl=yes
11811else
11812 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011813
11814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011816
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011817fi
11818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11819$as_echo "$ac_cv_flock_decl" >&6; }
11820if test "x${ac_cv_flock_decl}" = xyes; then
11821 for ac_func in flock
11822do :
11823 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011824if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011825 cat >>confdefs.h <<_ACEOF
11826#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011827_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011828
Antoine Pitroua3000072010-09-07 14:52:42 +000011829else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011831$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011833 $as_echo_n "(cached) " >&6
11834else
11835 ac_check_lib_save_LIBS=$LIBS
11836LIBS="-lbsd $LIBS"
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11838/* end confdefs.h. */
11839
11840/* Override any GCC internal prototype to avoid an error.
11841 Use char because int might match the return type of a GCC
11842 builtin and then its argument prototype would still apply. */
11843#ifdef __cplusplus
11844extern "C"
11845#endif
11846char flock ();
11847int
11848main ()
11849{
11850return flock ();
11851 ;
11852 return 0;
11853}
11854_ACEOF
11855if ac_fn_c_try_link "$LINENO"; then :
11856 ac_cv_lib_bsd_flock=yes
11857else
11858 ac_cv_lib_bsd_flock=no
11859fi
11860rm -f core conftest.err conftest.$ac_objext \
11861 conftest$ac_exeext conftest.$ac_ext
11862LIBS=$ac_check_lib_save_LIBS
11863fi
11864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11865$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011866if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011867 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011868
11869
11870$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11871
11872
11873fi
11874
11875
11876fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011877done
11878
Antoine Pitroua3000072010-09-07 14:52:42 +000011879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11882$as_echo_n "checking for getpagesize... " >&6; }
11883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011885
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011886#include <unistd.h>
11887
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011888int
11889main ()
11890{
11891void* p = getpagesize
11892 ;
11893 return 0;
11894}
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011899
Matthias Kloseb159a552010-04-25 21:00:44 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11904$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011905
11906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011908
Victor Stinner984890f2011-11-24 13:53:38 +010011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11910$as_echo_n "checking for broken unsetenv... " >&6; }
11911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11912/* end confdefs.h. */
11913
11914#include <stdlib.h>
11915
11916int
11917main ()
11918{
11919int res = unsetenv("DUMMY")
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924if ac_fn_c_try_compile "$LINENO"; then :
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11926$as_echo "no" >&6; }
11927else
11928
11929$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11930
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11932$as_echo "yes" >&6; }
11933
11934fi
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011937for ac_prog in true
11938do
11939 # Extract the first word of "$ac_prog", so it can be a program name with args.
11940set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011943if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011945else
11946 if test -n "$TRUE"; then
11947 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11948else
11949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11950for as_dir in $PATH
11951do
11952 IFS=$as_save_IFS
11953 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011956 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 $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 +000011958 break 2
11959 fi
11960done
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011963
11964fi
11965fi
11966TRUE=$ac_cv_prog_TRUE
11967if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11969$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011973fi
11974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011976 test -n "$TRUE" && break
11977done
11978test -n "$TRUE" || TRUE="/bin/true"
11979
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11982$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011983if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011984 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011985else
11986 ac_check_lib_save_LIBS=$LIBS
11987LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011989/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991/* Override any GCC internal prototype to avoid an error.
11992 Use char because int might match the return type of a GCC
11993 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011994#ifdef __cplusplus
11995extern "C"
11996#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011997char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011998int
11999main ()
12000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012007 ac_cv_lib_c_inet_aton=yes
12008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012011rm -f core conftest.err conftest.$ac_objext \
12012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012013LIBS=$ac_check_lib_save_LIBS
12014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12016$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012018 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12021$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012022if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012024else
12025 ac_check_lib_save_LIBS=$LIBS
12026LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012028/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030/* Override any GCC internal prototype to avoid an error.
12031 Use char because int might match the return type of a GCC
12032 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012033#ifdef __cplusplus
12034extern "C"
12035#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012036char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037int
12038main ()
12039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012046 ac_cv_lib_resolv_inet_aton=yes
12047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012050rm -f core conftest.err conftest.$ac_objext \
12051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012052LIBS=$ac_check_lib_save_LIBS
12053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12055$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012056if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057 cat >>confdefs.h <<_ACEOF
12058#define HAVE_LIBRESOLV 1
12059_ACEOF
12060
12061 LIBS="-lresolv $LIBS"
12062
12063fi
12064
12065
12066fi
12067
12068
Christian Heimesd0764e22007-12-04 15:00:33 +000012069# On Tru64, chflags seems to be present, but calling it will
12070# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12072$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012073if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012077 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012080/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012081
Christian Heimesd0764e22007-12-04 15:00:33 +000012082#include <sys/stat.h>
12083#include <unistd.h>
12084int main(int argc, char*argv[])
12085{
12086 if(chflags(argv[0], 0) != 0)
12087 return 1;
12088 return 0;
12089}
Ned Deily3eb67d52011-06-28 00:00:28 -070012090
Christian Heimesd0764e22007-12-04 15:00:33 +000012091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012092if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012093 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012099fi
12100
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12104$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012105if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012108 ac_cv_have_chflags="yes"
12109else
12110 ac_cv_have_chflags="no"
12111fi
12112
12113fi
12114if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012117
12118fi
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12121$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012126 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012129/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012130
Christian Heimesd0764e22007-12-04 15:00:33 +000012131#include <sys/stat.h>
12132#include <unistd.h>
12133int main(int argc, char*argv[])
12134{
12135 if(lchflags(argv[0], 0) != 0)
12136 return 1;
12137 return 0;
12138}
Ned Deily3eb67d52011-06-28 00:00:28 -070012139
Christian Heimesd0764e22007-12-04 15:00:33 +000012140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012142 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012148fi
12149
12150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12153$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012154if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012156if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012157 ac_cv_have_lchflags="yes"
12158else
12159 ac_cv_have_lchflags="no"
12160fi
12161
12162fi
12163if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166
12167fi
12168
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012169case $ac_sys_system/$ac_sys_release in
12170Darwin/*)
12171 _CUR_CFLAGS="${CFLAGS}"
12172 _CUR_LDFLAGS="${LDFLAGS}"
12173 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12174 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12175 ;;
12176esac
12177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12179$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012182else
12183 ac_check_lib_save_LIBS=$LIBS
12184LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012186/* end confdefs.h. */
12187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188/* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012191#ifdef __cplusplus
12192extern "C"
12193#endif
12194char inflateCopy ();
12195int
12196main ()
12197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012203if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012204 ac_cv_lib_z_inflateCopy=yes
12205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012208rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012210LIBS=$ac_check_lib_save_LIBS
12211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12213$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012214if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012217
12218fi
12219
12220
12221case $ac_sys_system/$ac_sys_release in
12222Darwin/*)
12223 CFLAGS="${_CUR_CFLAGS}"
12224 LDFLAGS="${_CUR_LDFLAGS}"
12225 ;;
12226esac
12227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12229$as_echo_n "checking for hstrerror... " >&6; }
12230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012231/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012232
Martin v. Löwise9416172003-05-03 10:12:45 +000012233#include <netdb.h>
12234
Martin v. Löwise9416172003-05-03 10:12:45 +000012235int
12236main ()
12237{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012238void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012239 ;
12240 return 0;
12241}
12242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012246
Matthias Kloseb159a552010-04-25 21:00:44 +000012247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012248$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12251$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012252
12253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012254rm -f core conftest.err conftest.$ac_objext \
12255 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12258$as_echo_n "checking for inet_aton... " >&6; }
12259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012260/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012261
Martin v. Löwis86d66262006-02-17 08:40:11 +000012262#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012263#include <sys/socket.h>
12264#include <netinet/in.h>
12265#include <arpa/inet.h>
12266
Martin v. Löwise9416172003-05-03 10:12:45 +000012267int
12268main ()
12269{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012270void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012271 ;
12272 return 0;
12273}
12274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012278
Matthias Kloseb159a552010-04-25 21:00:44 +000012279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12283$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012284
12285fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012286rm -f core conftest.err conftest.$ac_objext \
12287 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12290$as_echo_n "checking for inet_pton... " >&6; }
12291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012293
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012294#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012295#include <sys/socket.h>
12296#include <netinet/in.h>
12297#include <arpa/inet.h>
12298
Martin v. Löwise9416172003-05-03 10:12:45 +000012299int
12300main ()
12301{
12302void* p = inet_pton
12303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012310
Matthias Kloseb159a552010-04-25 21:00:44 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
12317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012319
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012320# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12322$as_echo_n "checking for setgroups... " >&6; }
12323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012325
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012326#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012327#ifdef HAVE_GRP_H
12328#include <grp.h>
12329#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012330
Martin v. Löwisd5843682002-11-21 20:41:28 +000012331int
12332main ()
12333{
12334void* p = setgroups
12335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012342
Matthias Kloseb159a552010-04-25 21:00:44 +000012343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012348
12349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012351
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012352# check for openpty and forkpty
12353
12354for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012355do :
12356 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012360_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012361
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12364$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367else
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012369LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373/* Override any GCC internal prototype to avoid an error.
12374 Use char because int might match the return type of a GCC
12375 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012376#ifdef __cplusplus
12377extern "C"
12378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012379char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012380int
12381main ()
12382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 ;
12385 return 0;
12386}
12387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012390else
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012393rm -f core conftest.err conftest.$ac_objext \
12394 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012395LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12398$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012401 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12404$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012405if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012407else
12408 ac_check_lib_save_LIBS=$LIBS
12409LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012411/* end confdefs.h. */
12412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413/* Override any GCC internal prototype to avoid an error.
12414 Use char because int might match the return type of a GCC
12415 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012416#ifdef __cplusplus
12417extern "C"
12418#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012419char openpty ();
12420int
12421main ()
12422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012429 ac_cv_lib_bsd_openpty=yes
12430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012433rm -f core conftest.err conftest.$ac_objext \
12434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012435LIBS=$ac_check_lib_save_LIBS
12436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12438$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012439if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012441 LIBS="$LIBS -lbsd"
12442fi
12443
12444
12445fi
12446
Fred Drake8cef4cf2000-06-28 16:40:38 +000012447
12448fi
12449done
12450
12451for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012452do :
12453 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012457_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012458
Fred Drake8cef4cf2000-06-28 16:40:38 +000012459else
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12461$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012462if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012466LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470/* Override any GCC internal prototype to avoid an error.
12471 Use char because int might match the return type of a GCC
12472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012473#ifdef __cplusplus
12474extern "C"
12475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012476char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012490rm -f core conftest.err conftest.$ac_objext \
12491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012492LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12495$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012496if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012498 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12501$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012502if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012504else
12505 ac_check_lib_save_LIBS=$LIBS
12506LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012508/* end confdefs.h. */
12509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510/* Override any GCC internal prototype to avoid an error.
12511 Use char because int might match the return type of a GCC
12512 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012513#ifdef __cplusplus
12514extern "C"
12515#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012516char forkpty ();
12517int
12518main ()
12519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012521 ;
12522 return 0;
12523}
12524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012526 ac_cv_lib_bsd_forkpty=yes
12527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012530rm -f core conftest.err conftest.$ac_objext \
12531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012532LIBS=$ac_check_lib_save_LIBS
12533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12535$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012536if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012538 LIBS="$LIBS -lbsd"
12539fi
12540
12541
12542fi
12543
Fred Drake8cef4cf2000-06-28 16:40:38 +000012544
12545fi
12546done
12547
Jack Jansendd19cf82001-12-06 22:36:17 +000012548
Michael W. Hudson54241132001-12-07 15:38:26 +000012549# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012551do :
12552 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12553ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012554if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012557_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012558
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560done
12561
Michael W. Hudson54241132001-12-07 15:38:26 +000012562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012563ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012565 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012566
Martin v. Löwis1142de32002-03-29 16:28:31 +000012567else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012569 *" dup2.$ac_objext "* ) ;;
12570 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012572esac
12573
Martin v. Löwis1142de32002-03-29 16:28:31 +000012574fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012575
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012576ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012577if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012578 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12579
12580else
12581 case " $LIBOBJS " in
12582 *" strdup.$ac_objext "* ) ;;
12583 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12584 ;;
12585esac
12586
12587fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012588
12589
12590for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012591do :
12592 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012593if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012595#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012598/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012600int
12601main ()
12602{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 ;
12605 return 0;
12606}
12607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012611
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012614
Guido van Rossum627b2d71993-12-24 10:39:16 +000012615fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012616done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617
Jack Jansen150753c2003-03-29 22:07:47 +000012618for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012619do :
12620 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012621if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012622 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012627#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012628int
12629main ()
12630{
12631setpgrp(0,0);
12632 ;
12633 return 0;
12634}
12635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012639
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012642
12643fi
12644done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012645
Thomas Wouters3a584202000-08-05 23:28:51 +000012646for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012647do :
12648 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012649if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_compile "$LINENO"; then :
12665
Guido van Rossum627b2d71993-12-24 10:39:16 +000012666else
Skip Montanaro6dead952003-09-25 14:50:04 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012675done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676
Michael W. Hudson54241132001-12-07 15:38:26 +000012677
Victor Stinnere0be4232011-10-25 13:06:09 +020012678for ac_func in clock_gettime
12679do :
12680 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12681if test "x$ac_cv_func_clock_gettime" = xyes; then :
12682 cat >>confdefs.h <<_ACEOF
12683#define HAVE_CLOCK_GETTIME 1
12684_ACEOF
12685
12686else
12687
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12689$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12690if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12691 $as_echo_n "(cached) " >&6
12692else
12693 ac_check_lib_save_LIBS=$LIBS
12694LIBS="-lrt $LIBS"
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697
12698/* Override any GCC internal prototype to avoid an error.
12699 Use char because int might match the return type of a GCC
12700 builtin and then its argument prototype would still apply. */
12701#ifdef __cplusplus
12702extern "C"
12703#endif
12704char clock_gettime ();
12705int
12706main ()
12707{
12708return clock_gettime ();
12709 ;
12710 return 0;
12711}
12712_ACEOF
12713if ac_fn_c_try_link "$LINENO"; then :
12714 ac_cv_lib_rt_clock_gettime=yes
12715else
12716 ac_cv_lib_rt_clock_gettime=no
12717fi
12718rm -f core conftest.err conftest.$ac_objext \
12719 conftest$ac_exeext conftest.$ac_ext
12720LIBS=$ac_check_lib_save_LIBS
12721fi
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12723$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12724if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12725
Victor Stinner7efb8332014-08-29 15:41:08 +020012726 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012727 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12728
12729
12730$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12731
12732
12733fi
12734
12735
12736fi
12737done
12738
12739
12740for ac_func in clock_getres
12741do :
12742 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12743if test "x$ac_cv_func_clock_getres" = xyes; then :
12744 cat >>confdefs.h <<_ACEOF
12745#define HAVE_CLOCK_GETRES 1
12746_ACEOF
12747
12748else
12749
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12751$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12752if ${ac_cv_lib_rt_clock_getres+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754else
12755 ac_check_lib_save_LIBS=$LIBS
12756LIBS="-lrt $LIBS"
12757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758/* end confdefs.h. */
12759
12760/* Override any GCC internal prototype to avoid an error.
12761 Use char because int might match the return type of a GCC
12762 builtin and then its argument prototype would still apply. */
12763#ifdef __cplusplus
12764extern "C"
12765#endif
12766char clock_getres ();
12767int
12768main ()
12769{
12770return clock_getres ();
12771 ;
12772 return 0;
12773}
12774_ACEOF
12775if ac_fn_c_try_link "$LINENO"; then :
12776 ac_cv_lib_rt_clock_getres=yes
12777else
12778 ac_cv_lib_rt_clock_getres=no
12779fi
12780rm -f core conftest.err conftest.$ac_objext \
12781 conftest$ac_exeext conftest.$ac_ext
12782LIBS=$ac_check_lib_save_LIBS
12783fi
12784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12785$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12786if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12787
12788 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12789
12790
12791fi
12792
12793
12794fi
12795done
12796
12797
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012798for ac_func in clock_settime
12799do :
12800 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12801if test "x$ac_cv_func_clock_settime" = xyes; then :
12802 cat >>confdefs.h <<_ACEOF
12803#define HAVE_CLOCK_SETTIME 1
12804_ACEOF
12805
12806else
12807
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12809$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12810if ${ac_cv_lib_rt_clock_settime+:} false; then :
12811 $as_echo_n "(cached) " >&6
12812else
12813 ac_check_lib_save_LIBS=$LIBS
12814LIBS="-lrt $LIBS"
12815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816/* end confdefs.h. */
12817
12818/* Override any GCC internal prototype to avoid an error.
12819 Use char because int might match the return type of a GCC
12820 builtin and then its argument prototype would still apply. */
12821#ifdef __cplusplus
12822extern "C"
12823#endif
12824char clock_settime ();
12825int
12826main ()
12827{
12828return clock_settime ();
12829 ;
12830 return 0;
12831}
12832_ACEOF
12833if ac_fn_c_try_link "$LINENO"; then :
12834 ac_cv_lib_rt_clock_settime=yes
12835else
12836 ac_cv_lib_rt_clock_settime=no
12837fi
12838rm -f core conftest.err conftest.$ac_objext \
12839 conftest$ac_exeext conftest.$ac_ext
12840LIBS=$ac_check_lib_save_LIBS
12841fi
12842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12843$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12844if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12845
12846 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12847
12848
12849fi
12850
12851
12852fi
12853done
12854
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12857$as_echo_n "checking for major... " >&6; }
12858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012860
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012861#if defined(MAJOR_IN_MKDEV)
12862#include <sys/mkdev.h>
12863#elif defined(MAJOR_IN_SYSMACROS)
12864#include <sys/sysmacros.h>
12865#else
12866#include <sys/types.h>
12867#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012868
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012869int
12870main ()
12871{
12872
12873 makedev(major(0),minor(0));
12874
12875 ;
12876 return 0;
12877}
12878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012880
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12885$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012886
12887else
Skip Montanaro6dead952003-09-25 14:50:04 +000012888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12890$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012891
12892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012893rm -f core conftest.err conftest.$ac_objext \
12894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012895
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012896# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012897# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12899$as_echo_n "checking for getaddrinfo... " >&6; }
12900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012902
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012903#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012904#include <sys/socket.h>
12905#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012906#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907
Martin v. Löwis11437992002-04-12 09:54:03 +000012908int
12909main ()
12910{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012911getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 ;
12913 return 0;
12914}
12915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012916if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012917 have_getaddrinfo=yes
12918else
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
12923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12924$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012925if test $have_getaddrinfo = yes
12926then
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12928$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012929 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012933
12934if test "${enable_ipv6+set}" = set; then
12935 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12936else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012937 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012938fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012941/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012942
Stefan Krah19c21392012-11-22 23:47:32 +010012943#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012944#include <sys/types.h>
12945#include <netdb.h>
12946#include <string.h>
12947#include <sys/socket.h>
12948#include <netinet/in.h>
12949
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012950int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012951{
12952 int passive, gaierr, inet4 = 0, inet6 = 0;
12953 struct addrinfo hints, *ai, *aitop;
12954 char straddr[INET6_ADDRSTRLEN], strport[16];
12955
12956 for (passive = 0; passive <= 1; passive++) {
12957 memset(&hints, 0, sizeof(hints));
12958 hints.ai_family = AF_UNSPEC;
12959 hints.ai_flags = passive ? AI_PASSIVE : 0;
12960 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012961 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012962 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12963 (void)gai_strerror(gaierr);
12964 goto bad;
12965 }
12966 for (ai = aitop; ai; ai = ai->ai_next) {
12967 if (ai->ai_addr == NULL ||
12968 ai->ai_addrlen == 0 ||
12969 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12970 straddr, sizeof(straddr), strport, sizeof(strport),
12971 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12972 goto bad;
12973 }
12974 switch (ai->ai_family) {
12975 case AF_INET:
12976 if (strcmp(strport, "54321") != 0) {
12977 goto bad;
12978 }
12979 if (passive) {
12980 if (strcmp(straddr, "0.0.0.0") != 0) {
12981 goto bad;
12982 }
12983 } else {
12984 if (strcmp(straddr, "127.0.0.1") != 0) {
12985 goto bad;
12986 }
12987 }
12988 inet4++;
12989 break;
12990 case AF_INET6:
12991 if (strcmp(strport, "54321") != 0) {
12992 goto bad;
12993 }
12994 if (passive) {
12995 if (strcmp(straddr, "::") != 0) {
12996 goto bad;
12997 }
12998 } else {
12999 if (strcmp(straddr, "::1") != 0) {
13000 goto bad;
13001 }
13002 }
13003 inet6++;
13004 break;
13005 case AF_UNSPEC:
13006 goto bad;
13007 break;
13008 default:
13009 /* another family support? */
13010 break;
13011 }
13012 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013013 freeaddrinfo(aitop);
13014 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013015 }
13016
13017 if (!(inet4 == 0 || inet4 == 2))
13018 goto bad;
13019 if (!(inet6 == 0 || inet6 == 2))
13020 goto bad;
13021
13022 if (aitop)
13023 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013024 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025
13026 bad:
13027 if (aitop)
13028 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013029 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030}
13031
Martin v. Löwis11437992002-04-12 09:54:03 +000013032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013034 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013042fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013043
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13047$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13048
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013049if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013050then
13051 if test $ipv6 = yes
13052 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053 echo 'Fatal: You must get working getaddrinfo() function.'
13054 echo ' or you can specify "--disable-ipv6"'.
13055 exit 1
13056 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013060
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013061fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013062
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013063for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013064do :
13065 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013066if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013069_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013071fi
13072done
13073
Michael W. Hudson54241132001-12-07 15:38:26 +000013074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13077$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013078if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083#include <sys/types.h>
13084#include <sys/time.h>
13085#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087int
13088main ()
13089{
13090if ((struct tm *) 0)
13091return 0;
13092 ;
13093 return 0;
13094}
13095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013096if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13104$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013105if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108
13109fi
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13112$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013113if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118#include <sys/types.h>
13119#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124struct tm tm;
13125 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 ;
13128 return 0;
13129}
13130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013131if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013132 ac_cv_struct_tm=time.h
13133else
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13139$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013140if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143
13144fi
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146ac_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 +000013147#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149"
Victor Stinnere0be4232011-10-25 13:06:09 +020013150if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013151
13152cat >>confdefs.h <<_ACEOF
13153#define HAVE_STRUCT_TM_TM_ZONE 1
13154_ACEOF
13155
13156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013158
Martin v. Löwis11437992002-04-12 09:54:03 +000013159if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13160
Matthias Kloseb9621712010-04-24 17:59:49 +000013161$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013162
13163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13165"
Victor Stinnere0be4232011-10-25 13:06:09 +020013166if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170fi
13171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013173#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013174_ACEOF
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13177$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013178if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013182/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013183#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184#if !HAVE_DECL_TZNAME
13185extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ;
13193 return 0;
13194}
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197 ac_cv_var_tzname=yes
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013201rm -f core conftest.err conftest.$ac_objext \
13202 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13205$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013206 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013209
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210 fi
13211fi
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213ac_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 +020013214if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
13216cat >>confdefs.h <<_ACEOF
13217#define HAVE_STRUCT_STAT_ST_RDEV 1
13218_ACEOF
13219
13220
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013221fi
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223ac_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 +020013224if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013225
Martin v. Löwis11437992002-04-12 09:54:03 +000013226cat >>confdefs.h <<_ACEOF
13227#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13228_ACEOF
13229
13230
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013231fi
13232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233ac_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 +020013234if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013235
13236cat >>confdefs.h <<_ACEOF
13237#define HAVE_STRUCT_STAT_ST_FLAGS 1
13238_ACEOF
13239
13240
13241fi
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243ac_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 +020013244if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013245
13246cat >>confdefs.h <<_ACEOF
13247#define HAVE_STRUCT_STAT_ST_GEN 1
13248_ACEOF
13249
13250
13251fi
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253ac_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 +020013254if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013255
13256cat >>confdefs.h <<_ACEOF
13257#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13258_ACEOF
13259
13260
13261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263ac_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 +020013264if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266cat >>confdefs.h <<_ACEOF
13267#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13268_ACEOF
13269
13270
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013271fi
13272
Stefan Krah267b6392016-04-26 01:09:18 +020013273ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13274 #include <sys/types.h>
13275 #include <pwd.h>
13276
13277"
13278if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13279
13280cat >>confdefs.h <<_ACEOF
13281#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13282_ACEOF
13283
13284
13285fi
13286ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13287 #include <sys/types.h>
13288 #include <pwd.h>
13289
13290"
13291if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13292
13293cat >>confdefs.h <<_ACEOF
13294#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13295_ACEOF
13296
13297
13298fi
13299
Zachary Ware6a6967e2016-10-01 00:47:27 -050013300# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13301ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13302"
13303if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13304
13305cat >>confdefs.h <<_ACEOF
13306#define HAVE_SIGINFO_T_SI_BAND 1
13307_ACEOF
13308
13309
13310fi
13311
Michael W. Hudson54241132001-12-07 15:38:26 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13314$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013315if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317else
Matthias Kloseb159a552010-04-25 21:00:44 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013321#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013322int
13323main ()
13324{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331 ac_cv_header_time_altzone=yes
13332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337fi
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13340$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344
13345fi
13346
Guido van Rossumda88dad1995-01-26 00:46:29 +000013347was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13349$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013352
13353#include <sys/types.h>
13354#include <sys/select.h>
13355#include <sys/time.h>
13356
Martin v. Löwis11437992002-04-12 09:54:03 +000013357int
13358main ()
13359{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360;
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 ;
13362 return 0;
13363}
13364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
13367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013370 was_it_defined=yes
13371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13375$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13378$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013379if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013383/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013384#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013385int
13386main ()
13387{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ;
13390 return 0;
13391}
13392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013394 ac_cv_struct_addrinfo=yes
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399fi
13400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13402$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013403if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013406
13407fi
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13410$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013411if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013413else
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013416
13417# include <sys/types.h>
13418# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013419int
13420main ()
13421{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013422struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 ;
13424 return 0;
13425}
13426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013428 ac_cv_struct_sockaddr_storage=yes
13429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13436$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013437if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013440
13441fi
13442
Christian Heimesdffa3942016-09-05 23:54:41 +020013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13444$as_echo_n "checking for sockaddr_alg... " >&6; }
13445if ${ac_cv_struct_sockaddr_alg+:} false; then :
13446 $as_echo_n "(cached) " >&6
13447else
13448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13449/* end confdefs.h. */
13450
13451# include <sys/types.h>
13452# include <sys/socket.h>
13453# include <linux/if_alg.h>
13454int
13455main ()
13456{
13457struct sockaddr_alg s
13458 ;
13459 return 0;
13460}
13461_ACEOF
13462if ac_fn_c_try_compile "$LINENO"; then :
13463 ac_cv_struct_sockaddr_alg=yes
13464else
13465 ac_cv_struct_sockaddr_alg=no
13466fi
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13471$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13472if test $ac_cv_struct_sockaddr_alg = yes; then
13473
13474$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13475
13476fi
13477
Guido van Rossum627b2d71993-12-24 10:39:16 +000013478# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13481$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013482if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013487$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013488int
13489main ()
13490{
13491static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013492test_array [0] = 0;
13493return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
13495 ;
13496 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013497}
Martin v. Löwis11437992002-04-12 09:54:03 +000013498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013500 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013501else
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13507$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013508if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510
13511fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13514$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013515if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521int
13522main ()
13523{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013526 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013528 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530 char const *const *pcpcc;
13531 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 /* NEC SVR4.0.2 mips cc rejects this. */
13533 struct point {int x, y;};
13534 static struct point const zero = {0,0};
13535 /* AIX XL C 1.02.0.0 rejects this.
13536 It does not let you subtract one const X* pointer from another in
13537 an arm of an if-expression whose if-part is not a constant
13538 expression */
13539 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542 ++pcpcc;
13543 ppc = (char**) pcpcc;
13544 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013545 { /* SCO 3.2v4 cc rejects this sort of thing. */
13546 char tx;
13547 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 }
13553 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13554 int x[] = {25, 17};
13555 const int *foo = &x[0];
13556 ++foo;
13557 }
13558 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13559 typedef const int *iptr;
13560 iptr p = 0;
13561 ++p;
13562 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013563 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013565 struct s { int j; const int *ap[3]; } bx;
13566 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 }
13568 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13569 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013573#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ;
13576 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013577}
Martin v. Löwis11437992002-04-12 09:54:03 +000013578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580 ac_cv_c_const=yes
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13587$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013591
13592fi
13593
Michael W. Hudson54241132001-12-07 15:38:26 +000013594
Guido van Rossumda88dad1995-01-26 00:46:29 +000013595works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13597$as_echo_n "checking for working signed char... " >&6; }
13598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013599/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601int
13602main ()
13603{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013605 ;
13606 return 0;
13607}
13608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013609if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013610 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013611else
Skip Montanaro6dead952003-09-25 14:50:04 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013614
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013615
Guido van Rossum7f43da71994-08-01 12:15:30 +000013616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13619$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013620
Guido van Rossumda88dad1995-01-26 00:46:29 +000013621have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13623$as_echo_n "checking for prototypes... " >&6; }
13624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013626int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
Matthias Kloseb159a552010-04-25 21:00:44 +000013639 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13643$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644
Guido van Rossumda88dad1995-01-26 00:46:29 +000013645works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13647$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013650
13651#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013652int foo(int x, ...) {
13653 va_list va;
13654 va_start(va, x);
13655 va_arg(va, int);
13656 va_arg(va, char *);
13657 va_arg(va, double);
13658 return 0;
13659}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660
Martin v. Löwis11437992002-04-12 09:54:03 +000013661int
13662main ()
13663{
Guido van Rossum90eea071996-08-30 20:58:57 +000013664return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ;
13666 return 0;
13667}
13668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013669if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
13671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013674 works=yes
13675
Guido van Rossum627b2d71993-12-24 10:39:16 +000013676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13679$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013680
Martin v. Löwisd6320502004-08-12 13:45:08 +000013681# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13683$as_echo_n "checking for socketpair... " >&6; }
13684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013685/* end confdefs.h. */
13686
13687#include <sys/types.h>
13688#include <sys/socket.h>
13689
13690int
13691main ()
13692{
13693void *x=socketpair
13694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013701
Matthias Kloseb159a552010-04-25 21:00:44 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013703$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13706$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013707
13708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013710
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013711# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13713$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013715/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013716#include <sys/types.h>
13717#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013718int
13719main ()
13720{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013721struct sockaddr x;
13722x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 ;
13724 return 0;
13725}
13726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if ac_fn_c_try_compile "$LINENO"; then :
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13729$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013732
13733else
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13735$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013739
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013740# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013744if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13749$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750 OLD_CFLAGS=$CFLAGS
13751 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754
13755# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760
13761 char *name;
13762 struct hostent *he, *res;
13763 char buffer[2048];
13764 int buflen = 2048;
13765 int h_errnop;
13766
13767 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
13769 ;
13770 return 0;
13771}
13772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013776
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013783else
Skip Montanaro6dead952003-09-25 14:50:04 +000013784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13786$as_echo "no" >&6; }
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13788$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013790/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013791
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013792# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794int
13795main ()
13796{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013797
13798 char *name;
13799 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013800 char buffer[2048];
13801 int buflen = 2048;
13802 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013803
Matthias Kloseb159a552010-04-25 21:00:44 +000013804 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
13806 ;
13807 return 0;
13808}
13809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Matthias Kloseb159a552010-04-25 21:00:44 +000013815$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13818$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013820else
Skip Montanaro6dead952003-09-25 14:50:04 +000013821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13823$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13825$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13827/* end confdefs.h. */
13828
13829# include <netdb.h>
13830
13831int
13832main ()
13833{
13834
13835 char *name;
13836 struct hostent *he;
13837 struct hostent_data data;
13838
13839 (void) gethostbyname_r(name, he, &data);
13840
13841 ;
13842 return 0;
13843}
13844_ACEOF
13845if ac_fn_c_try_compile "$LINENO"; then :
13846
13847 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13848
13849
13850$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13851
13852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13853$as_echo "yes" >&6; }
13854
13855else
13856
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013868 CFLAGS=$OLD_CFLAGS
13869
13870else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 for ac_func in gethostbyname
13873do :
13874 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013875if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013878_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013879
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013880fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013881done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013882
Michael W. Hudson54241132001-12-07 15:38:26 +000013883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013884fi
13885
Michael W. Hudson54241132001-12-07 15:38:26 +000013886
13887
13888
13889
13890
13891
Guido van Rossum627b2d71993-12-24 10:39:16 +000013892# checks for system services
13893# (none yet)
13894
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013895# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013896ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013898
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13901$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013902if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013904else
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013906LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910/* Override any GCC internal prototype to avoid an error.
13911 Use char because int might match the return type of a GCC
13912 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013913#ifdef __cplusplus
13914extern "C"
13915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013916char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013917int
13918main ()
13919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 ;
13922 return 0;
13923}
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013930rm -f core conftest.err conftest.$ac_objext \
13931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13935$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013936if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 cat >>confdefs.h <<_ACEOF
13938#define HAVE_LIBIEEE 1
13939_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013941 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942
Guido van Rossum627b2d71993-12-24 10:39:16 +000013943fi
13944
Michael W. Hudson54241132001-12-07 15:38:26 +000013945
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013946fi
13947
Michael W. Hudson54241132001-12-07 15:38:26 +000013948
Guido van Rossum7f43da71994-08-01 12:15:30 +000013949# check for --with-libm=...
13950
Guido van Rossum563e7081996-09-10 18:20:48 +000013951case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013952Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013953*) LIBM=-lm
13954esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13956$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013961if test "$withval" = no
13962then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13964$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013965elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013966then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13968$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013969else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013970fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13973$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974fi
13975
Guido van Rossum7f43da71994-08-01 12:15:30 +000013976
13977# check for --with-libc=...
13978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13980$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013985if test "$withval" = no
13986then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13988$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013989elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013990then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13992$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013993else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013994fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13997$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998fi
13999
Guido van Rossum7f43da71994-08-01 12:15:30 +000014000
Stefan Krah1919b7e2012-03-21 18:25:23 +010014001# **************************************
14002# * Check for gcc x64 inline assembler *
14003# **************************************
14004
14005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14006$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009
14010int
14011main ()
14012{
14013
14014 __asm__ __volatile__ ("movq %rcx, %rax");
14015
14016 ;
14017 return 0;
14018}
14019_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014020if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014021 have_gcc_asm_for_x64=yes
14022else
14023 have_gcc_asm_for_x64=no
14024fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014025rm -f core conftest.err conftest.$ac_objext \
14026 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14028$as_echo "$have_gcc_asm_for_x64" >&6; }
14029if test "$have_gcc_asm_for_x64" = yes
14030then
14031
14032$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14033
14034fi
14035
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036# **************************************************
14037# * Check for various properties of floating point *
14038# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014039
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14041$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14042if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014044else
14045
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014046
14047ax_cv_c_float_words_bigendian=unknown
14048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049/* end confdefs.h. */
14050
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014051
14052double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14053
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014054
14055_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014056if ac_fn_c_try_compile "$LINENO"; then :
14057
14058
14059if grep noonsees conftest.$ac_objext >/dev/null ; then
14060 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014061fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014062if grep seesnoon conftest.$ac_objext >/dev/null ; then
14063 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14064 ax_cv_c_float_words_bigendian=no
14065 else
14066 ax_cv_c_float_words_bigendian=unknown
14067 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014068fi
14069
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014070
14071fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014073fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14075$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014076
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014077case $ax_cv_c_float_words_bigendian in
14078 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014079
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014080$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14081 ;;
14082 no)
14083 ;;
14084 *)
14085 as_fn_error $? "
14086
14087Unknown float word ordering. You need to manually preset
14088ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14089
14090 " "$LINENO" 5 ;;
14091esac
14092
14093
14094if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095then
14096
Matthias Kloseb9621712010-04-24 17:59:49 +000014097$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014098
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014099elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014100then
14101
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014102$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14103
14104else
14105 # Some ARM platforms use a mixed-endian representation for doubles.
14106 # While Python doesn't currently have full support for these platforms
14107 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14108 # conversions work.
14109 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14110 # or little, then it must be this?
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014113
14114fi
14115
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014116# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014117# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014118# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014119# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014120# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014121# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014122
14123# This inline assembler syntax may also work for suncc and icc,
14124# so we try it on all platforms.
14125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14127$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014129/* end confdefs.h. */
14130
14131int
14132main ()
14133{
14134
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014135 unsigned short cw;
14136 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14137 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014138
14139 ;
14140 return 0;
14141}
14142_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014143if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014144 have_gcc_asm_for_x87=yes
14145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014147fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014148rm -f core conftest.err conftest.$ac_objext \
14149 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14151$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014152if test "$have_gcc_asm_for_x87" = yes
14153then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014156
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14160$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162/* end confdefs.h. */
14163
14164int
14165main ()
14166{
14167
14168 unsigned int fpcr;
14169 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14170 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14171
14172 ;
14173 return 0;
14174}
14175_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014176if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014177 have_gcc_asm_for_mc68881=yes
14178else
14179 have_gcc_asm_for_mc68881=no
14180fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014181rm -f core conftest.err conftest.$ac_objext \
14182 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14184$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14185if test "$have_gcc_asm_for_mc68881" = yes
14186then
14187
14188$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14189
14190fi
14191
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192# Detect whether system arithmetic is subject to x87-style double
14193# rounding issues. The result of this test has little meaning on non
14194# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14195# mode is round-to-nearest and double rounding issues are present, and
14196# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14198$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014199# $BASECFLAGS may affect the result
14200ac_save_cc="$CC"
14201CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014202if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014203 ac_cv_x87_double_rounding=no
14204else
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014206/* end confdefs.h. */
14207
14208#include <stdlib.h>
14209#include <math.h>
14210int main() {
14211 volatile double x, y, z;
14212 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14213 x = 0.99999999999999989; /* 1-2**-53 */
14214 y = 1./x;
14215 if (y != 1.)
14216 exit(0);
14217 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14218 x = 1e16;
14219 y = 2.99999;
14220 z = x + y;
14221 if (z != 1e16+4.)
14222 exit(0);
14223 /* both tests show evidence of double rounding */
14224 exit(1);
14225}
14226
14227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014228if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014229 ac_cv_x87_double_rounding=no
14230else
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014235fi
14236
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014237CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14239$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014240if test "$ac_cv_x87_double_rounding" = yes
14241then
14242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014244
14245fi
14246
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247# ************************************
14248# * Check for mathematical functions *
14249# ************************************
14250
14251LIBS_SAVE=$LIBS
14252LIBS="$LIBS $LIBM"
14253
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014254for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14255do :
14256 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14257ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014258if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014259 cat >>confdefs.h <<_ACEOF
14260#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14261_ACEOF
14262
14263fi
14264done
14265
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014266for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014267do :
14268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14269ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014270if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014271 cat >>confdefs.h <<_ACEOF
14272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14273_ACEOF
14274
14275fi
14276done
14277
14278ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14279"
Victor Stinnere0be4232011-10-25 13:06:09 +020014280if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014281 ac_have_decl=1
14282else
14283 ac_have_decl=0
14284fi
14285
14286cat >>confdefs.h <<_ACEOF
14287#define HAVE_DECL_ISINF $ac_have_decl
14288_ACEOF
14289ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14290"
Victor Stinnere0be4232011-10-25 13:06:09 +020014291if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014292 ac_have_decl=1
14293else
14294 ac_have_decl=0
14295fi
14296
14297cat >>confdefs.h <<_ACEOF
14298#define HAVE_DECL_ISNAN $ac_have_decl
14299_ACEOF
14300ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14301"
Victor Stinnere0be4232011-10-25 13:06:09 +020014302if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014303 ac_have_decl=1
14304else
14305 ac_have_decl=0
14306fi
14307
14308cat >>confdefs.h <<_ACEOF
14309#define HAVE_DECL_ISFINITE $ac_have_decl
14310_ACEOF
14311
14312
Mark Dickinsona614f042009-11-28 12:48:43 +000014313# For multiprocessing module, check that sem_open
14314# actually works. For FreeBSD versions <= 7.2,
14315# the kernel module that provides POSIX semaphores
14316# isn't loaded by default, so an attempt to call
14317# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14319$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014320if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014324 ac_cv_posix_semaphores_enabled=yes
14325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014327/* end confdefs.h. */
14328
14329#include <unistd.h>
14330#include <fcntl.h>
14331#include <stdio.h>
14332#include <semaphore.h>
14333#include <sys/stat.h>
14334
14335int main(void) {
14336 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14337 if (a == SEM_FAILED) {
14338 perror("sem_open");
14339 return 1;
14340 }
14341 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014342 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014343 return 0;
14344}
14345
14346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014348 ac_cv_posix_semaphores_enabled=yes
14349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014354fi
14355
14356
Mark Dickinsona614f042009-11-28 12:48:43 +000014357fi
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14360$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014361if test $ac_cv_posix_semaphores_enabled = no
14362then
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014365
14366fi
14367
Mark Dickinson10683072009-04-18 21:18:19 +000014368# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14370$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014371if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014375 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014378/* end confdefs.h. */
14379
14380#include <unistd.h>
14381#include <fcntl.h>
14382#include <stdio.h>
14383#include <semaphore.h>
14384#include <sys/stat.h>
14385
14386int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014387 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014388 int count;
14389 int res;
14390 if(a==SEM_FAILED){
14391 perror("sem_open");
14392 return 1;
14393
14394 }
14395 res = sem_getvalue(a, &count);
14396 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014397 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014398 return res==-1 ? 1 : 0;
14399}
14400
Mark Dickinson10683072009-04-18 21:18:19 +000014401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014402if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14408 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014409fi
14410
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014411
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014412fi
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14415$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014416if test $ac_cv_broken_sem_getvalue = yes
14417then
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014420
14421fi
14422
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014423ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14424"
14425if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14426 ac_have_decl=1
14427else
14428 ac_have_decl=0
14429fi
14430
14431cat >>confdefs.h <<_ACEOF
14432#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14433_ACEOF
14434ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14435"
14436if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14437 ac_have_decl=1
14438else
14439 ac_have_decl=0
14440fi
14441
14442cat >>confdefs.h <<_ACEOF
14443#define HAVE_DECL_RTLD_NOW $ac_have_decl
14444_ACEOF
14445ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14446"
14447if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14448 ac_have_decl=1
14449else
14450 ac_have_decl=0
14451fi
14452
14453cat >>confdefs.h <<_ACEOF
14454#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14455_ACEOF
14456ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14457"
14458if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14459 ac_have_decl=1
14460else
14461 ac_have_decl=0
14462fi
14463
14464cat >>confdefs.h <<_ACEOF
14465#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14466_ACEOF
14467ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14468"
14469if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14470 ac_have_decl=1
14471else
14472 ac_have_decl=0
14473fi
14474
14475cat >>confdefs.h <<_ACEOF
14476#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14477_ACEOF
14478ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14479"
14480if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14481 ac_have_decl=1
14482else
14483 ac_have_decl=0
14484fi
14485
14486cat >>confdefs.h <<_ACEOF
14487#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14488_ACEOF
14489ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14490"
14491if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14492 ac_have_decl=1
14493else
14494 ac_have_decl=0
14495fi
14496
14497cat >>confdefs.h <<_ACEOF
14498#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14499_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014500ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14501"
14502if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14503 ac_have_decl=1
14504else
14505 ac_have_decl=0
14506fi
14507
14508cat >>confdefs.h <<_ACEOF
14509#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14510_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014511
14512
Mark Dickinsonbd792642009-03-18 20:06:12 +000014513# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14515$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014516# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014517if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014518 enableval=$enable_big_digits; case $enable_big_digits in
14519yes)
14520 enable_big_digits=30 ;;
14521no)
14522 enable_big_digits=15 ;;
1452315|30)
14524 ;;
14525*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014526 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 +000014527esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14529$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014530
14531cat >>confdefs.h <<_ACEOF
14532#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14533_ACEOF
14534
14535
14536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14538$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014539fi
14540
14541
Guido van Rossumef2255b2000-03-10 22:30:29 +000014542# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014543ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014544if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014549 wchar_h="yes"
14550
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551else
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014553
14554fi
14555
Michael W. Hudson54241132001-12-07 15:38:26 +000014556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014558# determine wchar_t size
14559if test "$wchar_h" = yes
14560then
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14566$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14571"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014572
Martin v. Löwis11437992002-04-12 09:54:03 +000014573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 if test "$ac_cv_type_wchar_t" = yes; then
14575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014577as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014578See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579 else
14580 ac_cv_sizeof_wchar_t=0
14581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14586$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587
14588
14589
Martin v. Löwis11437992002-04-12 09:54:03 +000014590cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014591#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014592_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014593
Michael W. Hudson54241132001-12-07 15:38:26 +000014594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014595fi
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14598$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014599have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014601/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014602
14603#include <tcl.h>
14604#if TCL_UTF_MAX != 6
14605# error "NOT UCS4_TCL"
14606#endif
14607int
14608main ()
14609{
14610
14611 ;
14612 return 0;
14613}
14614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014616
14617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014619
14620 have_ucs4_tcl=yes
14621
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14625$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014626
Skip Montanaro6dead952003-09-25 14:50:04 +000014627# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014628if test "$wchar_h" = yes
14629then
14630 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14632$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014633 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014635else
14636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014638 ac_cv_wchar_t_signed=yes
14639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014642
14643 #include <wchar.h>
14644 int main()
14645 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014646 /* Success: exit code 0 */
14647 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014648 }
14649
14650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014652 ac_cv_wchar_t_signed=yes
14653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014658fi
14659
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014660fi
14661
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14663$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664fi
14665
Michael Osipov3738fad2018-08-24 18:17:19 +020014666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14667$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014668# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014669if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014670 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014671then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014674
Michael Osipov3738fad2018-08-24 18:17:19 +020014675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14676$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014677else
Michael Osipov3738fad2018-08-24 18:17:19 +020014678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14679$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014680fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014681
14682# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14684$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 ac_cv_c_bigendian=unknown
14689 # See if we're dealing with a universal compiler.
14690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14691/* end confdefs.h. */
14692#ifndef __APPLE_CC__
14693 not a universal capable compiler
14694 #endif
14695 typedef int dummy;
14696
Skip Montanaro6dead952003-09-25 14:50:04 +000014697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014698if ac_fn_c_try_compile "$LINENO"; then :
14699
14700 # Check for potential -arch flags. It is not universal unless
14701 # there are at least two -arch flags with different values.
14702 ac_arch=
14703 ac_prev=
14704 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14705 if test -n "$ac_prev"; then
14706 case $ac_word in
14707 i?86 | x86_64 | ppc | ppc64)
14708 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14709 ac_arch=$ac_word
14710 else
14711 ac_cv_c_bigendian=universal
14712 break
14713 fi
14714 ;;
14715 esac
14716 ac_prev=
14717 elif test "x$ac_word" = "x-arch"; then
14718 ac_prev=arch
14719 fi
14720 done
14721fi
14722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14723 if test $ac_cv_c_bigendian = unknown; then
14724 # See if sys/param.h defines the BYTE_ORDER macro.
14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014726/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014727#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730int
14731main ()
14732{
Matthias Kloseb9621712010-04-24 17:59:49 +000014733#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14734 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14735 && LITTLE_ENDIAN)
14736 bogus endian macros
14737 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014738
14739 ;
14740 return 0;
14741}
14742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014744 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014746/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014747#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014749
Martin v. Löwis11437992002-04-12 09:54:03 +000014750int
14751main ()
14752{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014753#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 not big endian
14755 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
14757 ;
14758 return 0;
14759}
14760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014761if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014762 ac_cv_c_bigendian=yes
14763else
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014767fi
14768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14769 fi
14770 if test $ac_cv_c_bigendian = unknown; then
14771 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014774#include <limits.h>
14775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776int
14777main ()
14778{
Matthias Kloseb9621712010-04-24 17:59:49 +000014779#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14780 bogus endian macros
14781 #endif
14782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 ;
14784 return 0;
14785}
14786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787if ac_fn_c_try_compile "$LINENO"; then :
14788 # It does; now see whether it defined to _BIG_ENDIAN or not.
14789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14790/* end confdefs.h. */
14791#include <limits.h>
14792
14793int
14794main ()
14795{
14796#ifndef _BIG_ENDIAN
14797 not big endian
14798 #endif
14799
14800 ;
14801 return 0;
14802}
14803_ACEOF
14804if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014805 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014806else
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14810fi
14811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14812 fi
14813 if test $ac_cv_c_bigendian = unknown; then
14814 # Compile a test program.
14815 if test "$cross_compiling" = yes; then :
14816 # Try to guess by grepping values from an object file.
14817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818/* end confdefs.h. */
14819short int ascii_mm[] =
14820 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14821 short int ascii_ii[] =
14822 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14823 int use_ascii (int i) {
14824 return ascii_mm[i] + ascii_ii[i];
14825 }
14826 short int ebcdic_ii[] =
14827 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14828 short int ebcdic_mm[] =
14829 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14830 int use_ebcdic (int i) {
14831 return ebcdic_mm[i] + ebcdic_ii[i];
14832 }
14833 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835int
14836main ()
14837{
14838return use_ascii (foo) == use_ebcdic (foo);
14839 ;
14840 return 0;
14841}
14842_ACEOF
14843if ac_fn_c_try_compile "$LINENO"; then :
14844 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14845 ac_cv_c_bigendian=yes
14846 fi
14847 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14848 if test "$ac_cv_c_bigendian" = unknown; then
14849 ac_cv_c_bigendian=no
14850 else
14851 # finding both strings is unlikely to happen, but who knows?
14852 ac_cv_c_bigendian=unknown
14853 fi
14854 fi
14855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014859/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014861int
14862main ()
14863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 /* Are we little or big endian? From Harbison&Steele. */
14866 union
14867 {
14868 long int l;
14869 char c[sizeof (long int)];
14870 } u;
14871 u.l = 1;
14872 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873
14874 ;
14875 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014876}
Martin v. Löwis11437992002-04-12 09:54:03 +000014877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014878if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014879 ac_cv_c_bigendian=no
14880else
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14890$as_echo "$ac_cv_c_bigendian" >&6; }
14891 case $ac_cv_c_bigendian in #(
14892 yes)
14893 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14894;; #(
14895 no)
14896 ;; #(
14897 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898
Matthias Kloseb9621712010-04-24 17:59:49 +000014899$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 ;; #(
14902 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014903 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014904 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014906
Michael W. Hudson54241132001-12-07 15:38:26 +000014907
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014908# ABI version string for Python extension modules. This appears between the
14909# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14910# from the following attributes which affect the ABI of this Python build (in
14911# this order):
14912#
14913# * The Python implementation (always 'cpython-' for us)
14914# * The major and minor version numbers
14915# * --with-pydebug (adds a 'd')
14916# * --with-pymalloc (adds a 'm')
14917# * --with-wide-unicode (adds a 'u')
14918#
14919# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014920# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14921# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014922
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14924$as_echo_n "checking ABIFLAGS... " >&6; }
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14926$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14928$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014929SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14931$as_echo "$SOABI" >&6; }
14932
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014933
14934case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014935 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014936 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14937 *)
14938 EXT_SUFFIX=${SHLIB_SUFFIX};;
14939esac
14940
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14942$as_echo_n "checking LDVERSION... " >&6; }
14943LDVERSION='$(VERSION)$(ABIFLAGS)'
14944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14945$as_echo "$LDVERSION" >&6; }
14946
doko@python.org87421192013-01-26 11:39:31 +010014947
doko@ubuntu.com55532312016-06-14 08:55:19 +020014948if test x$PLATFORM_TRIPLET = x; then
14949 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14950else
14951 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14952fi
doko@python.org87421192013-01-26 11:39:31 +010014953
14954
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014955# Check whether right shifting a negative integer extends the sign bit
14956# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14958$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014959if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014961else
Martin v. Löwis11437992002-04-12 09:54:03 +000014962
Matthias Kloseb9621712010-04-24 17:59:49 +000014963if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014964 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014965else
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014967/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014968
14969int main()
14970{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014971 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014972}
14973
Martin v. Löwis11437992002-04-12 09:54:03 +000014974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014975if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014976 ac_cv_rshift_extends_sign=yes
14977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014982fi
14983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984fi
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14987$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014988if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014989then
Martin v. Löwis11437992002-04-12 09:54:03 +000014990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014992
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014993fi
14994
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014995# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14997$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014998if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015000else
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
Matthias Kloseb9621712010-04-24 17:59:49 +000015002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015003/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015004#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015005int
15006main ()
15007{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015008
15009 FILE *f = fopen("/dev/null", "r");
15010 flockfile(f);
15011 getc_unlocked(f);
15012 funlockfile(f);
15013
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ;
15015 return 0;
15016}
15017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015018if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015019 ac_cv_have_getc_unlocked=yes
15020else
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 ac_cv_have_getc_unlocked=no
15022fi
15023rm -f core conftest.err conftest.$ac_objext \
15024 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15028$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015029if test "$ac_cv_have_getc_unlocked" = yes
15030then
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015033
15034fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015035
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015036# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015037# save the value of LIBS so we don't actually link Python with readline
15038LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015039
Gregory P. Smith18820942008-09-07 06:24:49 +000015040# On some systems we need to link readline to a termcap compatible
15041# library. NOTE: Keep the precedence of listed libraries synchronised
15042# with setup.py.
15043py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15045$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015046for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015047 if test -z "$py_libtermcap"; then
15048 READLINE_LIBS="-lreadline"
15049 else
15050 READLINE_LIBS="-lreadline -l$py_libtermcap"
15051 fi
15052 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015054/* end confdefs.h. */
15055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056/* Override any GCC internal prototype to avoid an error.
15057 Use char because int might match the return type of a GCC
15058 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015059#ifdef __cplusplus
15060extern "C"
15061#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015062char readline ();
15063int
15064main ()
15065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015067 ;
15068 return 0;
15069}
15070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015071if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015072 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015074rm -f core conftest.err conftest.$ac_objext \
15075 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015076 if test $py_cv_lib_readline = yes; then
15077 break
15078 fi
15079done
15080# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15081#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015082if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15084$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15087$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015088
Matthias Kloseb9621712010-04-24 17:59:49 +000015089$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015090
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015091fi
15092
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015093# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015096#include <readline/readline.h>
15097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015098if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015099 have_readline=yes
15100else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015101 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015102
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015103fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015104rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015105if test $have_readline = yes
15106then
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015109#include <readline/readline.h>
15110
15111_ACEOF
15112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015116
15117fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015118rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015121/* end confdefs.h. */
15122#include <readline/readline.h>
15123
15124_ACEOF
15125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015129
15130fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015131rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015132
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015133fi
15134
Martin v. Löwis0daad592001-09-30 21:09:59 +000015135# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15137$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015138if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015140else
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015142LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146/* Override any GCC internal prototype to avoid an error.
15147 Use char because int might match the return type of a GCC
15148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015149#ifdef __cplusplus
15150extern "C"
15151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015152char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015153int
15154main ()
15155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ;
15158 return 0;
15159}
15160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015161if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015166rm -f core conftest.err conftest.$ac_objext \
15167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015168LIBS=$ac_check_lib_save_LIBS
15169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15171$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015172if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015173
Matthias Kloseb9621712010-04-24 17:59:49 +000015174$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015175
Martin v. Löwis0daad592001-09-30 21:09:59 +000015176fi
15177
Michael W. Hudson54241132001-12-07 15:38:26 +000015178
Thomas Wouters89d996e2007-09-08 17:39:28 +000015179# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15181$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015182if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015184else
15185 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015186LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015188/* end confdefs.h. */
15189
15190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
15193#ifdef __cplusplus
15194extern "C"
15195#endif
15196char rl_completion_display_matches_hook ();
15197int
15198main ()
15199{
15200return rl_completion_display_matches_hook ();
15201 ;
15202 return 0;
15203}
15204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015205if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015206 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15207else
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015210rm -f core conftest.err conftest.$ac_objext \
15211 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015212LIBS=$ac_check_lib_save_LIBS
15213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15215$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015216if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015219
15220fi
15221
15222
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015223# also in 4.0, but not in editline
15224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15225$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15226if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15227 $as_echo_n "(cached) " >&6
15228else
15229 ac_check_lib_save_LIBS=$LIBS
15230LIBS="-lreadline $READLINE_LIBS $LIBS"
15231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15232/* end confdefs.h. */
15233
15234/* Override any GCC internal prototype to avoid an error.
15235 Use char because int might match the return type of a GCC
15236 builtin and then its argument prototype would still apply. */
15237#ifdef __cplusplus
15238extern "C"
15239#endif
15240char rl_resize_terminal ();
15241int
15242main ()
15243{
15244return rl_resize_terminal ();
15245 ;
15246 return 0;
15247}
15248_ACEOF
15249if ac_fn_c_try_link "$LINENO"; then :
15250 ac_cv_lib_readline_rl_resize_terminal=yes
15251else
15252 ac_cv_lib_readline_rl_resize_terminal=no
15253fi
15254rm -f core conftest.err conftest.$ac_objext \
15255 conftest$ac_exeext conftest.$ac_ext
15256LIBS=$ac_check_lib_save_LIBS
15257fi
15258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15259$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15260if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15261
15262$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15263
15264fi
15265
15266
Martin v. Löwis0daad592001-09-30 21:09:59 +000015267# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15269$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015270if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015272else
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015274LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278/* Override any GCC internal prototype to avoid an error.
15279 Use char because int might match the return type of a GCC
15280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015281#ifdef __cplusplus
15282extern "C"
15283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015284char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015285int
15286main ()
15287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ;
15290 return 0;
15291}
15292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015295else
Matthias Kloseb9621712010-04-24 17:59:49 +000015296 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015298rm -f core conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015300LIBS=$ac_check_lib_save_LIBS
15301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15303$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015304if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015307
Guido van Rossum353ae582001-07-10 16:45:32 +000015308fi
15309
Jack Jansendd19cf82001-12-06 22:36:17 +000015310
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015311# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015313/* end confdefs.h. */
15314#include <readline/readline.h>
15315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015316if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015317 have_readline=yes
15318else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015319 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015320
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015321fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015322rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015323if test $have_readline = yes
15324then
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015326/* end confdefs.h. */
15327#include <readline/readline.h>
15328
15329_ACEOF
15330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015334
15335fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015336rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015337
15338fi
15339
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15341$as_echo_n "checking for append_history in -lreadline... " >&6; }
15342if ${ac_cv_lib_readline_append_history+:} false; then :
15343 $as_echo_n "(cached) " >&6
15344else
15345 ac_check_lib_save_LIBS=$LIBS
15346LIBS="-lreadline $READLINE_LIBS $LIBS"
15347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15348/* end confdefs.h. */
15349
15350/* Override any GCC internal prototype to avoid an error.
15351 Use char because int might match the return type of a GCC
15352 builtin and then its argument prototype would still apply. */
15353#ifdef __cplusplus
15354extern "C"
15355#endif
15356char append_history ();
15357int
15358main ()
15359{
15360return append_history ();
15361 ;
15362 return 0;
15363}
15364_ACEOF
15365if ac_fn_c_try_link "$LINENO"; then :
15366 ac_cv_lib_readline_append_history=yes
15367else
15368 ac_cv_lib_readline_append_history=no
15369fi
15370rm -f core conftest.err conftest.$ac_objext \
15371 conftest$ac_exeext conftest.$ac_ext
15372LIBS=$ac_check_lib_save_LIBS
15373fi
15374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15375$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15376if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15377
15378$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15379
15380fi
15381
15382
Martin v. Löwis82bca632006-02-10 20:49:30 +000015383# End of readline checks: restore LIBS
15384LIBS=$LIBS_no_readline
15385
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15387$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015390else
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015393 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015396/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015397
15398int main()
15399{
15400 int val1 = nice(1);
15401 if (val1 != -1 && val1 == nice(2))
15402 exit(0);
15403 exit(1);
15404}
15405
Martin v. Löwis11437992002-04-12 09:54:03 +000015406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015408 ac_cv_broken_nice=yes
15409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015414fi
15415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416fi
15417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15419$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015420if test "$ac_cv_broken_nice" = yes
15421then
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
Matthias Kloseb9621712010-04-24 17:59:49 +000015423$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015424
15425fi
15426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15428$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015429if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015433 ac_cv_broken_poll=no
15434else
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015436/* end confdefs.h. */
15437
15438#include <poll.h>
15439
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015440int main()
15441{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015442 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015443 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015444
15445 close (42);
15446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015447 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015448 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015449 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015450 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015451 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015452 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015453 return 1;
15454}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015455
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015458 ac_cv_broken_poll=yes
15459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15463 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015466fi
15467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15469$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015470if test "$ac_cv_broken_poll" = yes
15471then
15472
Matthias Kloseb9621712010-04-24 17:59:49 +000015473$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015474
15475fi
15476
Martin v. Löwis1d459062005-03-14 21:23:33 +000015477# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15479$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015480if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015482else
15483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 ac_cv_working_tzset=no
15486else
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015488/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015489
15490#include <stdlib.h>
15491#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015492#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015493
15494#if HAVE_TZNAME
15495extern char *tzname[];
15496#endif
15497
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015498int main()
15499{
Brett Cannon18367812003-09-19 00:59:16 +000015500 /* Note that we need to ensure that not only does tzset(3)
15501 do 'something' with localtime, but it works as documented
15502 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015503 This includes making sure that tzname is set properly if
15504 tm->tm_zone does not exist since it is the alternative way
15505 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015506
15507 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015508 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015509 */
15510
Martin v. Löwis1d459062005-03-14 21:23:33 +000015511 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015512 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15513
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015514 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015515 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015516 if (localtime(&groundhogday)->tm_hour != 0)
15517 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015518#if HAVE_TZNAME
15519 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15520 if (strcmp(tzname[0], "UTC") ||
15521 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15522 exit(1);
15523#endif
Brett Cannon18367812003-09-19 00:59:16 +000015524
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015525 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015526 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015527 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015528 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015529#if HAVE_TZNAME
15530 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15531 exit(1);
15532#endif
Brett Cannon18367812003-09-19 00:59:16 +000015533
15534 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15535 tzset();
15536 if (localtime(&groundhogday)->tm_hour != 11)
15537 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015538#if HAVE_TZNAME
15539 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15540 exit(1);
15541#endif
15542
15543#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015544 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15545 exit(1);
15546 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15547 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015548#endif
Brett Cannon18367812003-09-19 00:59:16 +000015549
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015550 exit(0);
15551}
15552
15553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015554if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015555 ac_cv_working_tzset=yes
15556else
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015561fi
15562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563fi
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15566$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015567if test "$ac_cv_working_tzset" = yes
15568then
15569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015571
15572fi
15573
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015574# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15576$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015577if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015581/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015582#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015583int
15584main ()
15585{
15586
15587struct stat st;
15588st.st_mtim.tv_nsec = 1;
15589
15590 ;
15591 return 0;
15592}
15593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015595 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15600fi
15601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15603$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015604if test "$ac_cv_stat_tv_nsec" = yes
15605then
15606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015608
15609fi
15610
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015611# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15613$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015614if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015616else
Matthias Kloseb9621712010-04-24 17:59:49 +000015617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015618/* end confdefs.h. */
15619#include <sys/stat.h>
15620int
15621main ()
15622{
15623
15624struct stat st;
15625st.st_mtimespec.tv_nsec = 1;
15626
15627 ;
15628 return 0;
15629}
15630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015632 ac_cv_stat_tv_nsec2=yes
15633else
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15637fi
15638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15640$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015641if test "$ac_cv_stat_tv_nsec2" = yes
15642then
15643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015645
15646fi
15647
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015648# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015649ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015650if test "$cross_compiling" = no; then
15651 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15652fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015653
15654for ac_header in curses.h ncurses.h
15655do :
15656 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15657ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15658if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15659 cat >>confdefs.h <<_ACEOF
15660#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15661_ACEOF
15662
15663fi
15664
15665done
15666
15667
15668# On Solaris, term.h requires curses.h
15669for ac_header in term.h
15670do :
15671 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15672#ifdef HAVE_CURSES_H
15673#include <curses.h>
15674#endif
15675
15676"
15677if test "x$ac_cv_header_term_h" = xyes; then :
15678 cat >>confdefs.h <<_ACEOF
15679#define HAVE_TERM_H 1
15680_ACEOF
15681
15682fi
15683
15684done
15685
15686
Jack Jansen666b1e72001-10-31 12:11:48 +000015687# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15689$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015690if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015692else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015694/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015695#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015696int
15697main ()
15698{
Jack Jansen666b1e72001-10-31 12:11:48 +000015699
15700 int rtn;
15701 rtn = mvwdelch(0,0,0);
15702
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 ;
15704 return 0;
15705}
15706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015707if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015708 ac_cv_mvwdelch_is_expression=yes
15709else
Matthias Kloseb9621712010-04-24 17:59:49 +000015710 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15713fi
15714
Matthias Kloseb9621712010-04-24 17:59:49 +000015715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15716$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015717
15718if test "$ac_cv_mvwdelch_is_expression" = yes
15719then
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015722
15723fi
15724
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015725# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15726# structs since version 5.7. If the macro is defined as zero before including
15727# [n]curses.h, ncurses will expose fields of the structs regardless of the
15728# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15730$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015731if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015733else
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015735/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015736
15737 #define NCURSES_OPAQUE 0
15738 #include <curses.h>
15739
Martin v. Löwis11437992002-04-12 09:54:03 +000015740int
15741main ()
15742{
Jack Jansen666b1e72001-10-31 12:11:48 +000015743
15744 WINDOW *w;
15745 w->_flags = 0;
15746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 ;
15748 return 0;
15749}
15750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015751if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015752 ac_cv_window_has_flags=yes
15753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15757fi
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15760$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015761
Jack Jansen666b1e72001-10-31 12:11:48 +000015762
15763if test "$ac_cv_window_has_flags" = yes
15764then
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015767
15768fi
15769
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15771$as_echo_n "checking for is_pad... " >&6; }
15772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773/* end confdefs.h. */
15774#include <curses.h>
15775int
15776main ()
15777{
15778
15779#ifndef is_pad
15780void *x=is_pad
15781#endif
15782
15783 ;
15784 return 0;
15785}
15786_ACEOF
15787if ac_fn_c_try_compile "$LINENO"; then :
15788
15789$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15790
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15792$as_echo "yes" >&6; }
15793else
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15795$as_echo "no" >&6; }
15796
15797fi
15798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15799
Matthias Kloseb9621712010-04-24 17:59:49 +000015800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15801$as_echo_n "checking for is_term_resized... " >&6; }
15802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015803/* end confdefs.h. */
15804#include <curses.h>
15805int
15806main ()
15807{
15808void *x=is_term_resized
15809 ;
15810 return 0;
15811}
15812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015816
Matthias Kloseb159a552010-04-25 21:00:44 +000015817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015819else
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15821$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015822
15823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15825
Matthias Kloseb9621712010-04-24 17:59:49 +000015826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15827$as_echo_n "checking for resize_term... " >&6; }
15828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829/* end confdefs.h. */
15830#include <curses.h>
15831int
15832main ()
15833{
15834void *x=resize_term
15835 ;
15836 return 0;
15837}
15838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015839if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015842
Matthias Kloseb159a552010-04-25 21:00:44 +000015843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015844$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15847$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015848
15849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15851
Matthias Kloseb9621712010-04-24 17:59:49 +000015852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15853$as_echo_n "checking for resizeterm... " >&6; }
15854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015855/* end confdefs.h. */
15856#include <curses.h>
15857int
15858main ()
15859{
15860void *x=resizeterm
15861 ;
15862 return 0;
15863}
15864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015865if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015866
Matthias Kloseb9621712010-04-24 17:59:49 +000015867$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015868
Matthias Kloseb159a552010-04-25 21:00:44 +000015869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015870$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15873$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015874
15875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015877
15878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15879$as_echo_n "checking for immedok... " >&6; }
15880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15881/* end confdefs.h. */
15882#include <curses.h>
15883int
15884main ()
15885{
15886
15887#ifndef immedok
15888void *x=immedok
15889#endif
15890
15891 ;
15892 return 0;
15893}
15894_ACEOF
15895if ac_fn_c_try_compile "$LINENO"; then :
15896
15897$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15898
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15900$as_echo "yes" >&6; }
15901else
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15903$as_echo "no" >&6; }
15904
15905fi
15906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907
15908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15909$as_echo_n "checking for syncok... " >&6; }
15910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911/* end confdefs.h. */
15912#include <curses.h>
15913int
15914main ()
15915{
15916
15917#ifndef syncok
15918void *x=syncok
15919#endif
15920
15921 ;
15922 return 0;
15923}
15924_ACEOF
15925if ac_fn_c_try_compile "$LINENO"; then :
15926
15927$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15928
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15930$as_echo "yes" >&6; }
15931else
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15933$as_echo "no" >&6; }
15934
15935fi
15936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15937
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15939$as_echo_n "checking for wchgat... " >&6; }
15940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941/* end confdefs.h. */
15942#include <curses.h>
15943int
15944main ()
15945{
15946
15947#ifndef wchgat
15948void *x=wchgat
15949#endif
15950
15951 ;
15952 return 0;
15953}
15954_ACEOF
15955if ac_fn_c_try_compile "$LINENO"; then :
15956
15957$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15958
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15960$as_echo "yes" >&6; }
15961else
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
15964
15965fi
15966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15969$as_echo_n "checking for filter... " >&6; }
15970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15971/* end confdefs.h. */
15972#include <curses.h>
15973int
15974main ()
15975{
15976
15977#ifndef filter
15978void *x=filter
15979#endif
15980
15981 ;
15982 return 0;
15983}
15984_ACEOF
15985if ac_fn_c_try_compile "$LINENO"; then :
15986
15987$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15988
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15990$as_echo "yes" >&6; }
15991else
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15993$as_echo "no" >&6; }
15994
15995fi
15996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15999$as_echo_n "checking for has_key... " >&6; }
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001/* end confdefs.h. */
16002#include <curses.h>
16003int
16004main ()
16005{
16006
16007#ifndef has_key
16008void *x=has_key
16009#endif
16010
16011 ;
16012 return 0;
16013}
16014_ACEOF
16015if ac_fn_c_try_compile "$LINENO"; then :
16016
16017$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16018
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16020$as_echo "yes" >&6; }
16021else
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16023$as_echo "no" >&6; }
16024
16025fi
16026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16027
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16029$as_echo_n "checking for typeahead... " >&6; }
16030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16031/* end confdefs.h. */
16032#include <curses.h>
16033int
16034main ()
16035{
16036
16037#ifndef typeahead
16038void *x=typeahead
16039#endif
16040
16041 ;
16042 return 0;
16043}
16044_ACEOF
16045if ac_fn_c_try_compile "$LINENO"; then :
16046
16047$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16048
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16050$as_echo "yes" >&6; }
16051else
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16053$as_echo "no" >&6; }
16054
16055fi
16056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16057
16058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16059$as_echo_n "checking for use_env... " >&6; }
16060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16061/* end confdefs.h. */
16062#include <curses.h>
16063int
16064main ()
16065{
16066
16067#ifndef use_env
16068void *x=use_env
16069#endif
16070
16071 ;
16072 return 0;
16073}
16074_ACEOF
16075if ac_fn_c_try_compile "$LINENO"; then :
16076
16077$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16078
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16080$as_echo "yes" >&6; }
16081else
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16083$as_echo "no" >&6; }
16084
16085fi
16086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016087# last curses configure check
16088CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016089
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16091$as_echo "$as_me: checking for device files" >&6;}
16092
16093if test "x$cross_compiling" = xyes; then
16094 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16096$as_echo_n "checking for /dev/ptmx... " >&6; }
16097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16098$as_echo "not set" >&6; }
16099 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16100 fi
16101 if test "${ac_cv_file__dev_ptc+set}" != set; then
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16103$as_echo_n "checking for /dev/ptc... " >&6; }
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16105$as_echo "not set" >&6; }
16106 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16107 fi
16108fi
16109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16111$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016112if ${ac_cv_file__dev_ptmx+:} false; then :
16113 $as_echo_n "(cached) " >&6
16114else
16115 test "$cross_compiling" = yes &&
16116 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16117if test -r "/dev/ptmx"; then
16118 ac_cv_file__dev_ptmx=yes
16119else
16120 ac_cv_file__dev_ptmx=no
16121fi
16122fi
16123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16124$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16125if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016126
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016127fi
16128
16129if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016130
Matthias Kloseb9621712010-04-24 17:59:49 +000016131$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016132
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16135$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016136if ${ac_cv_file__dev_ptc+:} false; then :
16137 $as_echo_n "(cached) " >&6
16138else
16139 test "$cross_compiling" = yes &&
16140 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16141if test -r "/dev/ptc"; then
16142 ac_cv_file__dev_ptc=yes
16143else
16144 ac_cv_file__dev_ptc=no
16145fi
16146fi
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16148$as_echo "$ac_cv_file__dev_ptc" >&6; }
16149if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016150
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016151fi
16152
16153if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016154
Matthias Kloseb9621712010-04-24 17:59:49 +000016155$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016156
Neal Norwitz865400f2003-03-21 01:42:58 +000016157fi
16158
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016159if test $ac_sys_system = Darwin
16160then
16161 LIBS="$LIBS -framework CoreFoundation"
16162fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16165$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016166if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016168else
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016170 ac_cv_have_size_t_format="cross -- assuming yes"
16171
Thomas Wouters477c8d52006-05-27 19:21:47 +000016172else
Matthias Kloseb9621712010-04-24 17:59:49 +000016173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016174/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016175
Thomas Wouters477c8d52006-05-27 19:21:47 +000016176#include <stdio.h>
16177#include <stddef.h>
16178#include <string.h>
16179
Christian Heimes2c181612007-12-17 20:04:13 +000016180#ifdef HAVE_SYS_TYPES_H
16181#include <sys/types.h>
16182#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016183
16184#ifdef HAVE_SSIZE_T
16185typedef ssize_t Py_ssize_t;
16186#elif SIZEOF_VOID_P == SIZEOF_LONG
16187typedef long Py_ssize_t;
16188#else
16189typedef int Py_ssize_t;
16190#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016191
Christian Heimes2c181612007-12-17 20:04:13 +000016192int main()
16193{
16194 char buffer[256];
16195
Thomas Wouters477c8d52006-05-27 19:21:47 +000016196 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16197 return 1;
16198
Thomas Wouters89f507f2006-12-13 04:49:30 +000016199 if (strcmp(buffer, "123"))
16200 return 1;
16201
16202 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16203 return 1;
16204
16205 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016206 return 1;
16207
16208 return 0;
16209}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016210
Thomas Wouters477c8d52006-05-27 19:21:47 +000016211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016212if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016213 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016214else
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016219fi
16220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16223$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016224if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016227
16228fi
16229
Matthias Kloseb9621712010-04-24 17:59:49 +000016230ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016231#ifdef HAVE_SYS_TYPES_H
16232#include <sys/types.h>
16233#endif
16234#ifdef HAVE_SYS_SOCKET_H
16235#include <sys/socket.h>
16236#endif
16237
Matthias Kloseb9621712010-04-24 17:59:49 +000016238"
Victor Stinnere0be4232011-10-25 13:06:09 +020016239if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016240
Martin v. Löwis11437992002-04-12 09:54:03 +000016241else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016244
16245fi
16246
Michael W. Hudson54241132001-12-07 15:38:26 +000016247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16249$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016250if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016252else
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016254 ac_cv_broken_mbstowcs=no
16255else
Matthias Kloseb9621712010-04-24 17:59:49 +000016256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016257/* end confdefs.h. */
16258
Stefan Krah19c21392012-11-22 23:47:32 +010016259#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016260#include<stdlib.h>
16261int main() {
16262 size_t len = -1;
16263 const char *str = "text";
16264 len = mbstowcs(NULL, str, 0);
16265 return (len != 4);
16266}
16267
16268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016269if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016270 ac_cv_broken_mbstowcs=no
16271else
Matthias Kloseb9621712010-04-24 17:59:49 +000016272 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016276fi
16277
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016278fi
16279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16281$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016282if test "$ac_cv_broken_mbstowcs" = yes
16283then
16284
Matthias Kloseb9621712010-04-24 17:59:49 +000016285$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016286
16287fi
16288
Antoine Pitroub52ec782009-01-25 16:34:23 +000016289# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16291$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016292
16293# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016294if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016295 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016296if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016297then
16298
Matthias Kloseb9621712010-04-24 17:59:49 +000016299$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016300
Matthias Kloseb9621712010-04-24 17:59:49 +000016301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16302$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016303fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016304if test "$withval" = no
16305then
16306
16307$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16310$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016311fi
16312
Antoine Pitrou042b1282010-08-13 21:15:58 +000016313else
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16315$as_echo "no value specified" >&6; }
16316fi
16317
Antoine Pitroub52ec782009-01-25 16:34:23 +000016318
Matthias Kloseb17289e2012-03-15 19:51:34 +010016319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16320$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16321if ${ac_cv_computed_gotos+:} false; then :
16322 $as_echo_n "(cached) " >&6
16323else
16324 if test "$cross_compiling" = yes; then :
16325 if test "${with_computed_gotos+set}" = set; then
16326 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16327 else
16328 ac_cv_computed_gotos=no
16329 fi
16330else
16331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333
16334int main(int argc, char **argv)
16335{
16336 static void *targets[1] = { &&LABEL1 };
16337 goto LABEL2;
16338LABEL1:
16339 return 0;
16340LABEL2:
16341 goto *targets[0];
16342 return 1;
16343}
16344
16345_ACEOF
16346if ac_fn_c_try_run "$LINENO"; then :
16347 ac_cv_computed_gotos=yes
16348else
16349 ac_cv_computed_gotos=no
16350fi
16351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16352 conftest.$ac_objext conftest.beam conftest.$ac_ext
16353fi
16354
16355fi
16356
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16358$as_echo "$ac_cv_computed_gotos" >&6; }
16359case "$ac_cv_computed_gotos" in yes*)
16360
16361$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16362
16363esac
16364
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016365case $ac_sys_system in
16366AIX*)
16367
16368$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16369 ;;
16370esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016371
Michael W. Hudson54241132001-12-07 15:38:26 +000016372
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016373
16374
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016375for h in `(cd $srcdir;echo Python/thread_*.h)`
16376do
16377 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16378done
16379
Michael W. Hudson54241132001-12-07 15:38:26 +000016380
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016381SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16383$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016384for dir in $SRCDIRS; do
16385 if test ! -d $dir; then
16386 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016387 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016388done
Matthias Kloseb9621712010-04-24 17:59:49 +000016389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16390$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016391
Stefan Krah1919b7e2012-03-21 18:25:23 +010016392# Availability of -O2:
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16394$as_echo_n "checking for -O2... " >&6; }
16395saved_cflags="$CFLAGS"
16396CFLAGS="-O2"
16397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16398/* end confdefs.h. */
16399
16400int
16401main ()
16402{
16403
16404
16405 ;
16406 return 0;
16407}
16408_ACEOF
16409if ac_fn_c_try_compile "$LINENO"; then :
16410 have_O2=yes
16411else
16412 have_O2=no
16413fi
16414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16416$as_echo "$have_O2" >&6; }
16417CFLAGS="$saved_cflags"
16418
16419# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16420# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16422$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16423saved_cflags="$CFLAGS"
16424CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16425if test "$have_O2" = no; then
16426 CFLAGS=""
16427fi
16428if test "$cross_compiling" = yes; then :
16429 have_glibc_memmove_bug=undefined
16430else
16431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433
16434#include <stdio.h>
16435#include <stdlib.h>
16436#include <string.h>
16437void foo(void *p, void *q) { memmove(p, q, 19); }
16438int main() {
16439 char a[32] = "123456789000000000";
16440 foo(&a[9], a);
16441 if (strcmp(a, "123456789123456789000000000") != 0)
16442 return 1;
16443 foo(a, &a[9]);
16444 if (strcmp(a, "123456789000000000") != 0)
16445 return 1;
16446 return 0;
16447}
16448
16449_ACEOF
16450if ac_fn_c_try_run "$LINENO"; then :
16451 have_glibc_memmove_bug=no
16452else
16453 have_glibc_memmove_bug=yes
16454fi
16455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16456 conftest.$ac_objext conftest.beam conftest.$ac_ext
16457fi
16458
16459CFLAGS="$saved_cflags"
16460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16461$as_echo "$have_glibc_memmove_bug" >&6; }
16462if test "$have_glibc_memmove_bug" = yes; then
16463
16464$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16465
16466fi
16467
16468if test "$have_gcc_asm_for_x87" = yes; then
16469 # Some versions of gcc miscompile inline asm:
16470 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16471 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16472 case $CC in
16473 *gcc*)
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16475$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16476 saved_cflags="$CFLAGS"
16477 CFLAGS="-O2"
16478 if test "$cross_compiling" = yes; then :
16479 have_ipa_pure_const_bug=undefined
16480else
16481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16482/* end confdefs.h. */
16483
16484 __attribute__((noinline)) int
16485 foo(int *p) {
16486 int r;
16487 asm ( "movl \$6, (%1)\n\t"
16488 "xorl %0, %0\n\t"
16489 : "=r" (r) : "r" (p) : "memory"
16490 );
16491 return r;
16492 }
16493 int main() {
16494 int p = 8;
16495 if ((foo(&p) ? : p) != 6)
16496 return 1;
16497 return 0;
16498 }
16499
16500_ACEOF
16501if ac_fn_c_try_run "$LINENO"; then :
16502 have_ipa_pure_const_bug=no
16503else
16504 have_ipa_pure_const_bug=yes
16505fi
16506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16507 conftest.$ac_objext conftest.beam conftest.$ac_ext
16508fi
16509
16510 CFLAGS="$saved_cflags"
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16512$as_echo "$have_ipa_pure_const_bug" >&6; }
16513 if test "$have_ipa_pure_const_bug" = yes; then
16514
16515$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16516
16517 fi
16518 ;;
16519 esac
16520fi
16521
Victor Stinner4f5366e2015-01-09 02:13:19 +010016522# Check for stdatomic.h
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16524$as_echo_n "checking for stdatomic.h... " >&6; }
16525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16526/* end confdefs.h. */
16527
16528
16529 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016530 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016531 int main() {
16532 int loaded_value = atomic_load(&value);
16533 return 0;
16534 }
16535
16536
16537_ACEOF
16538if ac_fn_c_try_link "$LINENO"; then :
16539 have_stdatomic_h=yes
16540else
16541 have_stdatomic_h=no
16542fi
16543rm -f core conftest.err conftest.$ac_objext \
16544 conftest$ac_exeext conftest.$ac_ext
16545
16546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16547$as_echo "$have_stdatomic_h" >&6; }
16548
16549if test "$have_stdatomic_h" = yes; then
16550
16551$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16552
16553fi
16554
16555# Check for GCC >= 4.7 __atomic builtins
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16557$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559/* end confdefs.h. */
16560
16561
16562 volatile int val = 1;
16563 int main() {
16564 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16565 return 0;
16566 }
16567
16568
16569_ACEOF
16570if ac_fn_c_try_link "$LINENO"; then :
16571 have_builtin_atomic=yes
16572else
16573 have_builtin_atomic=no
16574fi
16575rm -f core conftest.err conftest.$ac_objext \
16576 conftest$ac_exeext conftest.$ac_ext
16577
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16579$as_echo "$have_builtin_atomic" >&6; }
16580
16581if test "$have_builtin_atomic" = yes; then
16582
16583$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16584
16585fi
16586
Ned Deily322f5ba2013-11-21 23:01:59 -080016587# ensurepip option
16588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16589$as_echo_n "checking for ensurepip... " >&6; }
16590
16591# Check whether --with-ensurepip was given.
16592if test "${with_ensurepip+set}" = set; then :
16593 withval=$with_ensurepip;
16594else
16595 with_ensurepip=upgrade
16596fi
16597
16598case $with_ensurepip in #(
16599 yes|upgrade) :
16600 ENSUREPIP=upgrade ;; #(
16601 install) :
16602 ENSUREPIP=install ;; #(
16603 no) :
16604 ENSUREPIP=no ;; #(
16605 *) :
16606 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16607esac
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16609$as_echo "$ENSUREPIP" >&6; }
16610
16611
Victor Stinner35a97c02015-03-08 02:59:09 +010016612# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16614$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616/* end confdefs.h. */
16617
16618
16619 #include <dirent.h>
16620
16621 int main() {
16622 struct dirent entry;
16623 return entry.d_type == DT_UNKNOWN;
16624 }
16625
16626
16627_ACEOF
16628if ac_fn_c_try_link "$LINENO"; then :
16629 have_dirent_d_type=yes
16630else
16631 have_dirent_d_type=no
16632fi
16633rm -f core conftest.err conftest.$ac_objext \
16634 conftest$ac_exeext conftest.$ac_ext
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16636$as_echo "$have_dirent_d_type" >&6; }
16637
16638if test "$have_dirent_d_type" = yes; then
16639
16640$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16641
16642fi
16643
Victor Stinner9eb57c52015-03-19 22:21:49 +010016644# check if the Linux getrandom() syscall is available
16645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16646$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16648/* end confdefs.h. */
16649
16650
Victor Stinner1b80b242016-04-12 22:34:58 +020016651 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016652 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016653 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016654
16655 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016656 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016657 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016658 const int flags = GRND_NONBLOCK;
16659 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016660 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016661 return 0;
16662 }
16663
16664
16665_ACEOF
16666if ac_fn_c_try_link "$LINENO"; then :
16667 have_getrandom_syscall=yes
16668else
16669 have_getrandom_syscall=no
16670fi
16671rm -f core conftest.err conftest.$ac_objext \
16672 conftest$ac_exeext conftest.$ac_ext
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16674$as_echo "$have_getrandom_syscall" >&6; }
16675
16676if test "$have_getrandom_syscall" = yes; then
16677
16678$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16679
16680fi
16681
Victor Stinner3abf44e2015-09-18 15:38:37 +020016682# check if the getrandom() function is available
16683# the test was written for the Solaris function of <sys/random.h>
16684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16685$as_echo_n "checking for the getrandom() function... " >&6; }
16686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16687/* end confdefs.h. */
16688
16689
16690 #include <sys/random.h>
16691
16692 int main() {
16693 char buffer[1];
16694 const size_t buflen = sizeof(buffer);
16695 const int flags = 0;
16696 /* ignore the result, Python checks for ENOSYS at runtime */
16697 (void)getrandom(buffer, buflen, flags);
16698 return 0;
16699 }
16700
16701
16702_ACEOF
16703if ac_fn_c_try_link "$LINENO"; then :
16704 have_getrandom=yes
16705else
16706 have_getrandom=no
16707fi
16708rm -f core conftest.err conftest.$ac_objext \
16709 conftest$ac_exeext conftest.$ac_ext
16710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16711$as_echo "$have_getrandom" >&6; }
16712
16713if test "$have_getrandom" = yes; then
16714
16715$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16716
16717fi
16718
Christian Heimesff5be6e2018-01-20 13:19:21 +010016719# Check for usable OpenSSL
16720
16721 found=false
16722
16723# Check whether --with-openssl was given.
16724if test "${with_openssl+set}" = set; then :
16725 withval=$with_openssl;
16726 case "$withval" in
16727 "" | y | ye | yes | n | no)
16728 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16729 ;;
16730 *) ssldirs="$withval"
16731 ;;
16732 esac
16733
16734else
16735
16736 # if pkg-config is installed and openssl has installed a .pc file,
16737 # then use that information and don't search ssldirs
16738 if test -n "$ac_tool_prefix"; then
16739 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16740set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16742$as_echo_n "checking for $ac_word... " >&6; }
16743if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16744 $as_echo_n "(cached) " >&6
16745else
16746 if test -n "$PKG_CONFIG"; then
16747 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16748else
16749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16750for as_dir in $PATH
16751do
16752 IFS=$as_save_IFS
16753 test -z "$as_dir" && as_dir=.
16754 for ac_exec_ext in '' $ac_executable_extensions; do
16755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16756 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16758 break 2
16759 fi
16760done
16761 done
16762IFS=$as_save_IFS
16763
16764fi
16765fi
16766PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16767if test -n "$PKG_CONFIG"; then
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16769$as_echo "$PKG_CONFIG" >&6; }
16770else
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16772$as_echo "no" >&6; }
16773fi
16774
16775
16776fi
16777if test -z "$ac_cv_prog_PKG_CONFIG"; then
16778 ac_ct_PKG_CONFIG=$PKG_CONFIG
16779 # Extract the first word of "pkg-config", so it can be a program name with args.
16780set dummy pkg-config; ac_word=$2
16781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16782$as_echo_n "checking for $ac_word... " >&6; }
16783if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16784 $as_echo_n "(cached) " >&6
16785else
16786 if test -n "$ac_ct_PKG_CONFIG"; then
16787 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16788else
16789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16790for as_dir in $PATH
16791do
16792 IFS=$as_save_IFS
16793 test -z "$as_dir" && as_dir=.
16794 for ac_exec_ext in '' $ac_executable_extensions; do
16795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16796 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16798 break 2
16799 fi
16800done
16801 done
16802IFS=$as_save_IFS
16803
16804fi
16805fi
16806ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16807if test -n "$ac_ct_PKG_CONFIG"; then
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16809$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16810else
16811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16812$as_echo "no" >&6; }
16813fi
16814
16815 if test "x$ac_ct_PKG_CONFIG" = x; then
16816 PKG_CONFIG=""
16817 else
16818 case $cross_compiling:$ac_tool_warned in
16819yes:)
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16822ac_tool_warned=yes ;;
16823esac
16824 PKG_CONFIG=$ac_ct_PKG_CONFIG
16825 fi
16826else
16827 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16828fi
16829
16830 if test x"$PKG_CONFIG" != x""; then
16831 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16832 if test $? = 0; then
16833 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16834 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16835 found=true
16836 fi
16837 fi
16838
16839 # no such luck; use some default ssldirs
16840 if ! $found; then
16841 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16842 fi
16843
16844
16845fi
16846
16847
16848
16849 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16850 # an 'openssl' subdirectory
16851
16852 if ! $found; then
16853 OPENSSL_INCLUDES=
16854 for ssldir in $ssldirs; do
16855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16856$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16857 if test -f "$ssldir/include/openssl/ssl.h"; then
16858 OPENSSL_INCLUDES="-I$ssldir/include"
16859 OPENSSL_LDFLAGS="-L$ssldir/lib"
16860 OPENSSL_LIBS="-lssl -lcrypto"
16861 found=true
16862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16863$as_echo "yes" >&6; }
16864 break
16865 else
16866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16867$as_echo "no" >&6; }
16868 fi
16869 done
16870
16871 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16872 # it will just work!
16873 fi
16874
16875 # try the preprocessor and linker with our new flags,
16876 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16877
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16879$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16880 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16881 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16882
16883 save_LIBS="$LIBS"
16884 save_LDFLAGS="$LDFLAGS"
16885 save_CPPFLAGS="$CPPFLAGS"
16886 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16887 LIBS="$OPENSSL_LIBS $LIBS"
16888 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16890/* end confdefs.h. */
16891#include <openssl/ssl.h>
16892int
16893main ()
16894{
16895SSL_new(NULL)
16896 ;
16897 return 0;
16898}
16899_ACEOF
16900if ac_fn_c_try_link "$LINENO"; then :
16901
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16903$as_echo "yes" >&6; }
16904 have_openssl=yes
16905
16906else
16907
16908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16909$as_echo "no" >&6; }
16910 have_openssl=no
16911
16912fi
16913rm -f core conftest.err conftest.$ac_objext \
16914 conftest$ac_exeext conftest.$ac_ext
16915 CPPFLAGS="$save_CPPFLAGS"
16916 LDFLAGS="$save_LDFLAGS"
16917 LIBS="$save_LIBS"
16918
16919
16920
16921
16922
16923
16924if test "$have_openssl" = yes; then
16925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16926$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16927
16928 save_LIBS="$LIBS"
16929 save_LDFLAGS="$LDFLAGS"
16930 save_CPPFLAGS="$CPPFLAGS"
16931 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16932 LIBS="$OPENSSL_LIBS $LIBS"
16933 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16934
16935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16936/* end confdefs.h. */
16937
16938 #include <openssl/x509_vfy.h>
16939
16940int
16941main ()
16942{
16943
16944 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16945 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16946 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16947 X509_VERIFY_PARAM_set_hostflags(p, 0);
16948
16949 ;
16950 return 0;
16951}
16952
16953_ACEOF
16954if ac_fn_c_try_link "$LINENO"; then :
16955
16956 ac_cv_has_x509_verify_param_set1_host=yes
16957
16958else
16959
16960 ac_cv_has_x509_verify_param_set1_host=no
16961
16962fi
16963rm -f core conftest.err conftest.$ac_objext \
16964 conftest$ac_exeext conftest.$ac_ext
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16966$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16967 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16968
16969$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16970
16971 fi
16972
16973 CPPFLAGS="$save_CPPFLAGS"
16974 LDFLAGS="$save_LDFLAGS"
16975 LIBS="$save_LIBS"
16976fi
16977
Christian Heimes892d66e2018-01-29 14:10:18 +010016978# ssl module default cipher suite string
16979
16980
16981
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16983$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16984
16985# Check whether --with-ssl-default-suites was given.
16986if test "${with_ssl_default_suites+set}" = set; then :
16987 withval=$with_ssl_default_suites;
16988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16989$as_echo "$withval" >&6; }
16990case "$withval" in
16991 python)
16992 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16993
16994 ;;
16995 openssl)
16996 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16997
16998 ;;
16999 *)
17000 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17001
17002 cat >>confdefs.h <<_ACEOF
17003#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17004_ACEOF
17005
17006 ;;
17007esac
17008
17009else
17010
17011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17012$as_echo "python" >&6; }
17013$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17014
17015
17016fi
17017
17018
17019
Guido van Rossum627b2d71993-12-24 10:39:16 +000017020# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017021ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017022
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017023ac_config_files="$ac_config_files Modules/ld_so_aix"
17024
Martin v. Löwis11437992002-04-12 09:54:03 +000017025cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017026# This file is a shell script that caches the results of configure
17027# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017028# scripts and configure runs, see configure's option --config-cache.
17029# It is not useful on other systems. If it contains results you don't
17030# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017031#
Martin v. Löwis11437992002-04-12 09:54:03 +000017032# config.status only pays attention to the cache file if you give it
17033# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017034#
Skip Montanaro6dead952003-09-25 14:50:04 +000017035# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017036# loading this file, other *unset* `ac_cv_foo' will be assigned the
17037# following values.
17038
17039_ACEOF
17040
Guido van Rossumf78abae1997-01-21 22:02:36 +000017041# The following way of writing the cache mishandles newlines in values,
17042# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017044# Ultrix sh set writes to stderr and can't be redirected directly,
17045# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046(
17047 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17048 eval ac_val=\$$ac_var
17049 case $ac_val in #(
17050 *${as_nl}*)
17051 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017052 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17053$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054 esac
17055 case $ac_var in #(
17056 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017057 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17058 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059 esac ;;
17060 esac
17061 done
17062
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17065 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017066 # `set' does not quote correctly, so add quotes: double-quote
17067 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017068 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017069 "s/'/'\\\\''/g;
17070 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017072 *)
17073 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017075 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076 esac |
17077 sort
17078) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017081 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17084 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17086 :end' >>confcache
17087if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17088 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017089 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017090 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17091$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017092 if test ! -f "$cache_file" || test -h "$cache_file"; then
17093 cat confcache >"$cache_file"
17094 else
17095 case $cache_file in #(
17096 */* | ?:*)
17097 mv -f confcache "$cache_file"$$ &&
17098 mv -f "$cache_file"$$ "$cache_file" ;; #(
17099 *)
17100 mv -f confcache "$cache_file" ;;
17101 esac
17102 fi
17103 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017104 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017105 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17106$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017107 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017108fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017109rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017111test "x$prefix" = xNONE && prefix=$ac_default_prefix
17112# Let make expand exec_prefix.
17113test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017114
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017115DEFS=-DHAVE_CONFIG_H
17116
Skip Montanaro6dead952003-09-25 14:50:04 +000017117ac_libobjs=
17118ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017119U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017120for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17121 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17125 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017126 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17127 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017128done
17129LIBOBJS=$ac_libobjs
17130
17131LTLIBOBJS=$ac_ltlibobjs
17132
17133
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135
Victor Stinnere0be4232011-10-25 13:06:09 +020017136: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017137ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017138ac_clean_files_save=$ac_clean_files
17139ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017140{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17141$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17142as_write_fail=0
17143cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017144#! $SHELL
17145# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017146# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017147# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017148# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017149
Martin v. Löwis11437992002-04-12 09:54:03 +000017150debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017151ac_cs_recheck=false
17152ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017153
Matthias Kloseb9621712010-04-24 17:59:49 +000017154SHELL=\${CONFIG_SHELL-$SHELL}
17155export SHELL
17156_ASEOF
17157cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17158## -------------------- ##
17159## M4sh Initialization. ##
17160## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162# Be more Bourne compatible
17163DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017164if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 emulate sh
17166 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017167 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017168 # is contrary to our usage. Disable this feature.
17169 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017171else
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 case `(set -o) 2>/dev/null` in #(
17173 *posix*) :
17174 set -o posix ;; #(
17175 *) :
17176 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017178fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017179
17180
Matthias Kloseb9621712010-04-24 17:59:49 +000017181as_nl='
17182'
17183export as_nl
17184# Printing a long string crashes Solaris 7 /usr/bin/printf.
17185as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17186as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17187as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17188# Prefer a ksh shell builtin over an external printf program on Solaris,
17189# but without wasting forks for bash or zsh.
17190if test -z "$BASH_VERSION$ZSH_VERSION" \
17191 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17192 as_echo='print -r --'
17193 as_echo_n='print -rn --'
17194elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17195 as_echo='printf %s\n'
17196 as_echo_n='printf %s'
17197else
17198 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17199 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17200 as_echo_n='/usr/ucb/echo -n'
17201 else
17202 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17203 as_echo_n_body='eval
17204 arg=$1;
17205 case $arg in #(
17206 *"$as_nl"*)
17207 expr "X$arg" : "X\\(.*\\)$as_nl";
17208 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17209 esac;
17210 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17211 '
17212 export as_echo_n_body
17213 as_echo_n='sh -c $as_echo_n_body as_echo'
17214 fi
17215 export as_echo_body
17216 as_echo='sh -c $as_echo_body as_echo'
17217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
17219# The user is always right.
17220if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 PATH_SEPARATOR=:
17222 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17223 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17224 PATH_SEPARATOR=';'
17225 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228
17229# IFS
17230# We need space, tab and new line, in precisely that order. Quoting is
17231# there to prevent editors from complaining about space-tab.
17232# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17233# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234IFS=" "" $as_nl"
17235
17236# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017237as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017238case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 *[\\/]* ) as_myself=$0 ;;
17240 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017241for as_dir in $PATH
17242do
17243 IFS=$as_save_IFS
17244 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017245 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17246 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249 ;;
17250esac
17251# We did not find ourselves, most probably we were run as `sh COMMAND'
17252# in which case we are not to be found in the path.
17253if test "x$as_myself" = x; then
17254 as_myself=$0
17255fi
17256if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017257 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17258 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259fi
17260
Matthias Kloseb9621712010-04-24 17:59:49 +000017261# Unset variables that we do not need and which cause bugs (e.g. in
17262# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17263# suppresses any "Segmentation fault" message there. '((' could
17264# trigger a bug in pdksh 5.2.14.
17265for as_var in BASH_ENV ENV MAIL MAILPATH
17266do eval test x\${$as_var+set} = xset \
17267 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268done
17269PS1='$ '
17270PS2='> '
17271PS4='+ '
17272
17273# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017274LC_ALL=C
17275export LC_ALL
17276LANGUAGE=C
17277export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278
Matthias Kloseb9621712010-04-24 17:59:49 +000017279# CDPATH.
17280(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17281
17282
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017283# as_fn_error STATUS ERROR [LINENO LOG_FD]
17284# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017285# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17286# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017287# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017288as_fn_error ()
17289{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017290 as_status=$1; test $as_status -eq 0 && as_status=1
17291 if test "$4"; then
17292 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17293 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017294 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017295 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017296 as_fn_exit $as_status
17297} # as_fn_error
17298
17299
17300# as_fn_set_status STATUS
17301# -----------------------
17302# Set $? to STATUS, without forking.
17303as_fn_set_status ()
17304{
17305 return $1
17306} # as_fn_set_status
17307
17308# as_fn_exit STATUS
17309# -----------------
17310# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17311as_fn_exit ()
17312{
17313 set +e
17314 as_fn_set_status $1
17315 exit $1
17316} # as_fn_exit
17317
17318# as_fn_unset VAR
17319# ---------------
17320# Portably unset VAR.
17321as_fn_unset ()
17322{
17323 { eval $1=; unset $1;}
17324}
17325as_unset=as_fn_unset
17326# as_fn_append VAR VALUE
17327# ----------------------
17328# Append the text in VALUE to the end of the definition contained in VAR. Take
17329# advantage of any shell optimizations that allow amortized linear growth over
17330# repeated appends, instead of the typical quadratic growth present in naive
17331# implementations.
17332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17333 eval 'as_fn_append ()
17334 {
17335 eval $1+=\$2
17336 }'
17337else
17338 as_fn_append ()
17339 {
17340 eval $1=\$$1\$2
17341 }
17342fi # as_fn_append
17343
17344# as_fn_arith ARG...
17345# ------------------
17346# Perform arithmetic evaluation on the ARGs, and store the result in the
17347# global $as_val. Take advantage of shells that can avoid forks. The arguments
17348# must be portable across $(()) and expr.
17349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17350 eval 'as_fn_arith ()
17351 {
17352 as_val=$(( $* ))
17353 }'
17354else
17355 as_fn_arith ()
17356 {
17357 as_val=`expr "$@" || test $? -eq 1`
17358 }
17359fi # as_fn_arith
17360
17361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362if expr a : '\(a\)' >/dev/null 2>&1 &&
17363 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17364 as_expr=expr
17365else
17366 as_expr=false
17367fi
17368
17369if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17370 as_basename=basename
17371else
17372 as_basename=false
17373fi
17374
Matthias Kloseb9621712010-04-24 17:59:49 +000017375if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17376 as_dirname=dirname
17377else
17378 as_dirname=false
17379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381as_me=`$as_basename -- "$0" ||
17382$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17383 X"$0" : 'X\(//\)$' \| \
17384 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017385$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 sed '/^.*\/\([^/][^/]*\)\/*$/{
17387 s//\1/
17388 q
17389 }
17390 /^X\/\(\/\/\)$/{
17391 s//\1/
17392 q
17393 }
17394 /^X\/\(\/\).*/{
17395 s//\1/
17396 q
17397 }
17398 s/.*/./; q'`
17399
Matthias Kloseb9621712010-04-24 17:59:49 +000017400# Avoid depending upon Character Ranges.
17401as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17402as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17403as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17404as_cr_digits='0123456789'
17405as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406
17407ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017408case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 xy) ECHO_C='\c';;
17413 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17414 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 esac;;
17416*)
17417 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017419
Martin v. Löwis11437992002-04-12 09:54:03 +000017420rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421if test -d conf$$.dir; then
17422 rm -f conf$$.dir/conf$$.file
17423else
17424 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017425 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017427if (echo >conf$$.file) 2>/dev/null; then
17428 if ln -s conf$$.file conf$$ 2>/dev/null; then
17429 as_ln_s='ln -s'
17430 # ... but there are two gotchas:
17431 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17432 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017433 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017435 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 elif ln conf$$.file conf$$ 2>/dev/null; then
17437 as_ln_s=ln
17438 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017439 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017441else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017442 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17445rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017446
Matthias Kloseb9621712010-04-24 17:59:49 +000017447
17448# as_fn_mkdir_p
17449# -------------
17450# Create "$as_dir" as a directory, including parents if necessary.
17451as_fn_mkdir_p ()
17452{
17453
17454 case $as_dir in #(
17455 -*) as_dir=./$as_dir;;
17456 esac
17457 test -d "$as_dir" || eval $as_mkdir_p || {
17458 as_dirs=
17459 while :; do
17460 case $as_dir in #(
17461 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17462 *) as_qdir=$as_dir;;
17463 esac
17464 as_dirs="'$as_qdir' $as_dirs"
17465 as_dir=`$as_dirname -- "$as_dir" ||
17466$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17467 X"$as_dir" : 'X\(//\)[^/]' \| \
17468 X"$as_dir" : 'X\(//\)$' \| \
17469 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17470$as_echo X"$as_dir" |
17471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17472 s//\1/
17473 q
17474 }
17475 /^X\(\/\/\)[^/].*/{
17476 s//\1/
17477 q
17478 }
17479 /^X\(\/\/\)$/{
17480 s//\1/
17481 q
17482 }
17483 /^X\(\/\).*/{
17484 s//\1/
17485 q
17486 }
17487 s/.*/./; q'`
17488 test -d "$as_dir" && break
17489 done
17490 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017491 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017492
17493
17494} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017495if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017496 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017497else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017498 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017499 as_mkdir_p=false
17500fi
17501
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017502
17503# as_fn_executable_p FILE
17504# -----------------------
17505# Test if FILE is an executable regular file.
17506as_fn_executable_p ()
17507{
17508 test -f "$1" && test -x "$1"
17509} # as_fn_executable_p
17510as_test_x='test -x'
17511as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017512
17513# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017514as_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 +000017515
17516# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017517as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017518
17519
Martin v. Löwis11437992002-04-12 09:54:03 +000017520exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017521## ----------------------------------- ##
17522## Main body of $CONFIG_STATUS script. ##
17523## ----------------------------------- ##
17524_ASEOF
17525test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017526
Matthias Kloseb9621712010-04-24 17:59:49 +000017527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17528# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017529# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530# values after options handling.
17531ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017532This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017533generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017534
17535 CONFIG_FILES = $CONFIG_FILES
17536 CONFIG_HEADERS = $CONFIG_HEADERS
17537 CONFIG_LINKS = $CONFIG_LINKS
17538 CONFIG_COMMANDS = $CONFIG_COMMANDS
17539 $ $0 $@
17540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541on `(hostname || uname -n) 2>/dev/null | sed 1q`
17542"
17543
Martin v. Löwis11437992002-04-12 09:54:03 +000017544_ACEOF
17545
Matthias Kloseb9621712010-04-24 17:59:49 +000017546case $ac_config_files in *"
17547"*) set x $ac_config_files; shift; ac_config_files=$*;;
17548esac
17549
17550case $ac_config_headers in *"
17551"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17552esac
17553
17554
17555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017556# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017557config_files="$ac_config_files"
17558config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017561
Matthias Kloseb9621712010-04-24 17:59:49 +000017562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017563ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017564\`$as_me' instantiates files and other configuration actions
17565from templates according to the current configuration. Unless the files
17566and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017567
Matthias Kloseb9621712010-04-24 17:59:49 +000017568Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017569
17570 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 --config print configuration, then exit
17573 -q, --quiet, --silent
17574 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 -d, --debug don't remove temporary files
17576 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017577 --file=FILE[:TEMPLATE]
17578 instantiate the configuration file FILE
17579 --header=FILE[:TEMPLATE]
17580 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017581
17582Configuration files:
17583$config_files
17584
17585Configuration headers:
17586$config_headers
17587
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017588Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17592ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017593ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017594python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017595configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017597
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017598Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017599This config.status script is free software; the Free Software Foundation
17600gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601
17602ac_pwd='$ac_pwd'
17603srcdir='$srcdir'
17604INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017605MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017606test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017607_ACEOF
17608
Matthias Kloseb9621712010-04-24 17:59:49 +000017609cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17610# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017611ac_need_defaults=:
17612while test $# != 0
17613do
17614 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017615 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17617 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017618 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017620 --*=)
17621 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17622 ac_optarg=
17623 ac_shift=:
17624 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017626 ac_option=$1
17627 ac_optarg=$2
17628 ac_shift=shift
17629 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 esac
17631
Skip Montanaro6dead952003-09-25 14:50:04 +000017632 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017634 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17635 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017637 $as_echo "$ac_cs_version"; exit ;;
17638 --config | --confi | --conf | --con | --co | --c )
17639 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 debug=: ;;
17642 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017643 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017644 case $ac_optarg in
17645 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017646 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017647 esac
17648 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 ac_need_defaults=false;;
17650 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017651 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017652 case $ac_optarg in
17653 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17654 esac
17655 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 --he | --h)
17658 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017659 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017660Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017662 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017663 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17664 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17665 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017666
17667 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017668 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017669Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
17674 esac
17675 shift
17676done
17677
Skip Montanaro6dead952003-09-25 14:50:04 +000017678ac_configure_extra_args=
17679
17680if $ac_cs_silent; then
17681 exec 6>/dev/null
17682 ac_configure_extra_args="$ac_configure_extra_args --silent"
17683fi
17684
17685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017687if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017688 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 shift
17690 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17691 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017694fi
17695
Martin v. Löwis11437992002-04-12 09:54:03 +000017696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698exec 5>>config.log
17699{
17700 echo
17701 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17702## Running $as_me. ##
17703_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017710
Matthias Kloseb9621712010-04-24 17:59:49 +000017711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712
17713# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017714for ac_config_target in $ac_config_targets
17715do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 case $ac_config_target in
17717 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17718 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17719 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017720 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17721 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017723 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017724 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017725 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726
Victor Stinnere0be4232011-10-25 13:06:09 +020017727 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 esac
17729done
17730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731
Martin v. Löwis11437992002-04-12 09:54:03 +000017732# If the user did not use the arguments to specify the items to instantiate,
17733# then the envvar interface is used. Set only those that are not.
17734# We use the long form for the default assignment because of an extremely
17735# bizarre bug on SunOS 4.1.3.
17736if $ac_need_defaults; then
17737 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17738 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17739fi
17740
Skip Montanaro6dead952003-09-25 14:50:04 +000017741# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017743# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744# Hook for its removal unless debugging.
17745# Note that there is a small window in which the directory will not be cleaned:
17746# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017747$debug ||
17748{
Victor Stinnere0be4232011-10-25 13:06:09 +020017749 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017751 : "${ac_tmp:=$tmp}"
17752 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017755}
Martin v. Löwis11437992002-04-12 09:54:03 +000017756# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017757
Martin v. Löwis11437992002-04-12 09:54:03 +000017758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017760 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017761} ||
17762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 tmp=./conf$$-$RANDOM
17764 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017765} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017766ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017767
Matthias Kloseb9621712010-04-24 17:59:49 +000017768# Set up the scripts for CONFIG_FILES section.
17769# No need to generate them if there are no CONFIG_FILES.
17770# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017772
Matthias Kloseb9621712010-04-24 17:59:49 +000017773
17774ac_cr=`echo X | tr X '\015'`
17775# On cygwin, bash can eat \r inside `` if the user requested igncr.
17776# But we know of no other shell where ac_cr would be empty at this
17777# point, so we can use a bashism as a fallback.
17778if test "x$ac_cr" = x; then
17779 eval ac_cr=\$\'\\r\'
17780fi
17781ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17782if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017783 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017784else
17785 ac_cs_awk_cr=$ac_cr
17786fi
17787
Victor Stinnere0be4232011-10-25 13:06:09 +020017788echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017789_ACEOF
17790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791
Matthias Kloseb9621712010-04-24 17:59:49 +000017792{
17793 echo "cat >conf$$subs.awk <<_ACEOF" &&
17794 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17795 echo "_ACEOF"
17796} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017797 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17798ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799ac_delim='%!_!# '
17800for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017801 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017802 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803
Matthias Kloseb9621712010-04-24 17:59:49 +000017804 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17805 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 break
17807 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017808 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 else
17810 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812done
Matthias Kloseb9621712010-04-24 17:59:49 +000017813rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814
Matthias Kloseb9621712010-04-24 17:59:49 +000017815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017816cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017818sed -n '
17819h
17820s/^/S["/; s/!.*/"]=/
17821p
17822g
17823s/^[^!]*!//
17824:repl
17825t repl
17826s/'"$ac_delim"'$//
17827t delim
17828:nl
17829h
17830s/\(.\{148\}\)..*/\1/
17831t more1
17832s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17833p
17834n
17835b repl
17836:more1
17837s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17838p
17839g
17840s/.\{148\}//
17841t nl
17842:delim
17843h
17844s/\(.\{148\}\)..*/\1/
17845t more2
17846s/["\\]/\\&/g; s/^/"/; s/$/"/
17847p
17848b
17849:more2
17850s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17851p
17852g
17853s/.\{148\}//
17854t delim
17855' <conf$$subs.awk | sed '
17856/^[^""]/{
17857 N
17858 s/\n//
17859}
17860' >>$CONFIG_STATUS || ac_write_fail=1
17861rm -f conf$$subs.awk
17862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17863_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017864cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017865 for (key in S) S_is_set[key] = 1
17866 FS = ""
17867
17868}
17869{
17870 line = $ 0
17871 nfields = split(line, field, "@")
17872 substed = 0
17873 len = length(field[1])
17874 for (i = 2; i < nfields; i++) {
17875 key = field[i]
17876 keylen = length(key)
17877 if (S_is_set[key]) {
17878 value = S[key]
17879 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17880 len += length(value) + length(field[++i])
17881 substed = 1
17882 } else
17883 len += 1 + keylen
17884 }
17885
17886 print line
17887}
17888
17889_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017891cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17892if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17893 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17894else
17895 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017896fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017897 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017898_ACEOF
17899
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017900# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17901# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902# trailing colons and then remove the whole line if VPATH becomes empty
17903# (actually we leave an empty line to preserve line numbers).
17904if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017905 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17906h
17907s///
17908s/^/:/
17909s/[ ]*$/:/
17910s/:\$(srcdir):/:/g
17911s/:\${srcdir}:/:/g
17912s/:@srcdir@:/:/g
17913s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017915x
17916s/\(=[ ]*\).*/\1/
17917G
17918s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919s/^[^=]*=[ ]*$//
17920}'
17921fi
17922
Matthias Kloseb9621712010-04-24 17:59:49 +000017923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017924fi # test -n "$CONFIG_FILES"
17925
Matthias Kloseb9621712010-04-24 17:59:49 +000017926# Set up the scripts for CONFIG_HEADERS section.
17927# No need to generate them if there are no CONFIG_HEADERS.
17928# This happens for instance with `./config.status Makefile'.
17929if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017930cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017931BEGIN {
17932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934# Transform confdefs.h into an awk script `defines.awk', embedded as
17935# here-document in config.status, that substitutes the proper values into
17936# config.h.in to produce config.h.
17937
17938# Create a delimiter string that does not exist in confdefs.h, to ease
17939# handling of long lines.
17940ac_delim='%!_!# '
17941for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017942 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17943 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017944 break
17945 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017946 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017947 else
17948 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17949 fi
17950done
17951
17952# For the awk script, D is an array of macro values keyed by name,
17953# likewise P contains macro parameters if any. Preserve backslash
17954# newline sequences.
17955
17956ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17957sed -n '
17958s/.\{148\}/&'"$ac_delim"'/g
17959t rset
17960:rset
17961s/^[ ]*#[ ]*define[ ][ ]*/ /
17962t def
17963d
17964:def
17965s/\\$//
17966t bsnl
17967s/["\\]/\\&/g
17968s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17969D["\1"]=" \3"/p
17970s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17971d
17972:bsnl
17973s/["\\]/\\&/g
17974s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17975D["\1"]=" \3\\\\\\n"\\/p
17976t cont
17977s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17978t cont
17979d
17980:cont
17981n
17982s/.\{148\}/&'"$ac_delim"'/g
17983t clear
17984:clear
17985s/\\$//
17986t bsnlc
17987s/["\\]/\\&/g; s/^/"/; s/$/"/p
17988d
17989:bsnlc
17990s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17991b cont
17992' <confdefs.h | sed '
17993s/'"$ac_delim"'/"\\\
17994"/g' >>$CONFIG_STATUS || ac_write_fail=1
17995
17996cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17997 for (key in D) D_is_set[key] = 1
17998 FS = ""
17999}
18000/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18001 line = \$ 0
18002 split(line, arg, " ")
18003 if (arg[1] == "#") {
18004 defundef = arg[2]
18005 mac1 = arg[3]
18006 } else {
18007 defundef = substr(arg[1], 2)
18008 mac1 = arg[2]
18009 }
18010 split(mac1, mac2, "(") #)
18011 macro = mac2[1]
18012 prefix = substr(line, 1, index(line, defundef) - 1)
18013 if (D_is_set[macro]) {
18014 # Preserve the white space surrounding the "#".
18015 print prefix "define", macro P[macro] D[macro]
18016 next
18017 } else {
18018 # Replace #undef with comments. This is necessary, for example,
18019 # in the case of _POSIX_SOURCE, which is predefined and required
18020 # on some systems where configure will not decide to define it.
18021 if (defundef == "undef") {
18022 print "/*", prefix defundef, macro, "*/"
18023 next
18024 }
18025 }
18026}
18027{ print }
18028_ACAWK
18029_ACEOF
18030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018031 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018032fi # test -n "$CONFIG_HEADERS"
18033
18034
18035eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18036shift
18037for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038do
18039 case $ac_tag in
18040 :[FHLC]) ac_mode=$ac_tag; continue;;
18041 esac
18042 case $ac_mode$ac_tag in
18043 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018044 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 :[FH]-) ac_tag=-:-;;
18046 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18047 esac
18048 ac_save_IFS=$IFS
18049 IFS=:
18050 set x $ac_tag
18051 IFS=$ac_save_IFS
18052 shift
18053 ac_file=$1
18054 shift
18055
18056 case $ac_mode in
18057 :L) ac_source=$1;;
18058 :[FH])
18059 ac_file_inputs=
18060 for ac_f
18061 do
18062 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018063 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 *) # Look for the file first in the build tree, then in the source tree
18065 # (if the path is not absolute). The absolute path cannot be DOS-style,
18066 # because $ac_f cannot contain `:'.
18067 test -f "$ac_f" ||
18068 case $ac_f in
18069 [\\/$]*) false;;
18070 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18071 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018072 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018074 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18075 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076 done
18077
18078 # Let's still pretend it is `configure' which instantiates (i.e., don't
18079 # use $as_me), people would be surprised to read:
18080 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018081 configure_input='Generated from '`
18082 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18083 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 if test x"$ac_file" != x-; then
18085 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018086 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18087$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018089 # Neutralize special characters interpreted by sed in replacement strings.
18090 case $configure_input in #(
18091 *\&* | *\|* | *\\* )
18092 ac_sed_conf_input=`$as_echo "$configure_input" |
18093 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18094 *) ac_sed_conf_input=$configure_input;;
18095 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096
18097 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018098 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18099 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100 esac
18101 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 esac
18103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018105$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018106 X"$ac_file" : 'X\(//\)[^/]' \| \
18107 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018109$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18111 s//\1/
18112 q
18113 }
18114 /^X\(\/\/\)[^/].*/{
18115 s//\1/
18116 q
18117 }
18118 /^X\(\/\/\)$/{
18119 s//\1/
18120 q
18121 }
18122 /^X\(\/\).*/{
18123 s//\1/
18124 q
18125 }
18126 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018127 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 ac_builddir=.
18129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130case "$ac_dir" in
18131.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18132*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018133 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018135 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 case $ac_top_builddir_sub in
18137 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18138 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18139 esac ;;
18140esac
18141ac_abs_top_builddir=$ac_pwd
18142ac_abs_builddir=$ac_pwd$ac_dir_suffix
18143# for backward compatibility:
18144ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
18146case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149 ac_top_srcdir=$ac_top_builddir_sub
18150 ac_abs_top_srcdir=$ac_pwd ;;
18151 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153 ac_top_srcdir=$srcdir
18154 ac_abs_top_srcdir=$srcdir ;;
18155 *) # Relative name.
18156 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18157 ac_top_srcdir=$ac_top_build_prefix$srcdir
18158 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018159esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018161
Martin v. Löwis11437992002-04-12 09:54:03 +000018162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163 case $ac_mode in
18164 :F)
18165 #
18166 # CONFIG_FILE
18167 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018168
18169 case $INSTALL in
18170 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018173 ac_MKDIR_P=$MKDIR_P
18174 case $MKDIR_P in
18175 [\\/$]* | ?:[\\/]* ) ;;
18176 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18177 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018178_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179
Matthias Kloseb9621712010-04-24 17:59:49 +000018180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181# If the template does not know about datarootdir, expand it.
18182# FIXME: This hack should be removed a few years after 2.60.
18183ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018184ac_sed_dataroot='
18185/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186 p
18187 q
18188}
18189/@datadir@/p
18190/@docdir@/p
18191/@infodir@/p
18192/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018193/@mandir@/p'
18194case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195*datarootdir*) ac_datarootdir_seen=yes;;
18196*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18198$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018200cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201 ac_datarootdir_hack='
18202 s&@datadir@&$datadir&g
18203 s&@docdir@&$docdir&g
18204 s&@infodir@&$infodir&g
18205 s&@localedir@&$localedir&g
18206 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018207 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208esac
18209_ACEOF
18210
18211# Neutralize VPATH when `$srcdir' = `.'.
18212# Shell code in configure.ac might set extrasub.
18213# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18215ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018216$extrasub
18217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018219:t
18220/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018221s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018223s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224s&@srcdir@&$ac_srcdir&;t t
18225s&@abs_srcdir@&$ac_abs_srcdir&;t t
18226s&@top_srcdir@&$ac_top_srcdir&;t t
18227s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18228s&@builddir@&$ac_builddir&;t t
18229s&@abs_builddir@&$ac_abs_builddir&;t t
18230s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18231s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018232s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018234"
Victor Stinnere0be4232011-10-25 13:06:09 +020018235eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18236 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018238test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018239 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18240 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18241 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018243which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018244$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018245which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018246
Victor Stinnere0be4232011-10-25 13:06:09 +020018247 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018249 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18250 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018251 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018252 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253 ;;
18254 :H)
18255 #
18256 # CONFIG_HEADER
18257 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018259 {
18260 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018261 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18262 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018263 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018264 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018265 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18266$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018268 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018269 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018270 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 fi
18272 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018273 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018274 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018275 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018276 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279
18280 esac
18281
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018282
18283 case $ac_file$ac_mode in
18284 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18285
18286 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287done # for ac_tag
18288
Guido van Rossum627b2d71993-12-24 10:39:16 +000018289
Matthias Kloseb9621712010-04-24 17:59:49 +000018290as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018291_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018292ac_clean_files=$ac_clean_files_save
18293
Matthias Kloseb9621712010-04-24 17:59:49 +000018294test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018295 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018296
Martin v. Löwis11437992002-04-12 09:54:03 +000018297
18298# configure is writing to config.log, and then calls config.status.
18299# config.status does its own redirection, appending to config.log.
18300# Unfortunately, on DOS this fails, as config.log is still kept open
18301# by configure, so config.status won't be able to write to it; its
18302# output is simply discarded. So we exec the FD to /dev/null,
18303# effectively closing config.log, so it can be properly (re)opened and
18304# appended to by config.status. When coming back to configure, we
18305# need to make the FD available again.
18306if test "$no_create" != yes; then
18307 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018308 ac_config_status_args=
18309 test "$silent" = yes &&
18310 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018311 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018312 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 exec 5>>config.log
18314 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18315 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018316 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018317fi
18318if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18320$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018322
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018323
Christian Heimes75ed8902013-11-20 01:11:18 +010018324echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018325if test ! -f Modules/Setup.local
18326then
18327 echo "# Edit this file for local setup changes" >Modules/Setup.local
18328fi
18329
Christian Heimes75ed8902013-11-20 01:11:18 +010018330echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018331$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018332 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018333 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018334mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018335
18336if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18337 echo "" >&6
18338 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018339 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 +000018340 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018341 echo "" >&6
18342 echo "" >&6
18343fi
18344