blob: 867e2fc28c47876642ff46332b86435cbce6a992 [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
stratakiscf10a752018-12-19 18:19:01 +0100669LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200681LLVM_AR_FOUND
682target_os
683target_vendor
684target_cpu
685target
686LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
William Grzybowski23e65b22018-09-07 09:06:15 -03001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001410\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001477 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001515 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001516 --with-lto Enable Link Time Optimization in any build. Disabled
1517 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001521 enable AddressSanitizer (asan)
1522 --with-memory-sanitizer enable MemorySanitizer (msan)
1523 --with-undefined-behavior-sanitizer
1524 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001526 --with-system-expat build pyexpat module using an installed expat
1527 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001528 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001529 --with-system-libmpdec build _decimal module using an installed libmpdec
1530 library
Ned Deilyd819b932013-09-06 01:07:05 -07001531 --with-tcltk-includes='-I...'
1532 override search for Tcl and Tk include files
1533 --with-tcltk-libs='-L...'
1534 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001535 --with-dbmliborder=db1:db2:...
1536 order to check db backends for dbm. Valid value is a
1537 colon separated string with the backend names
1538 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-doc-strings disable/enable documentation strings
1540 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001541 --with(out)-c-locale-coercion
1542 disable/enable C locale coercion to a UTF-8 based
1543 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001544 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001545 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001546 --with-libm=STRING math library
1547 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001548 --with(out)-computed-gotos
1549 Use computed gotos in evaluation loop (enabled by
1550 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001551 --with(out)-ensurepip=[=upgrade]
1552 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001553 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001554 --with-ssl-default-suites=[python|openssl|STRING]
1555 Override default cipher suites string, python: use
1556 Python's preferred selection (default), openssl:
1557 leave OpenSSL's defaults untouched, STRING: use a
1558 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001561 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CC C compiler command
1563 CFLAGS C compiler flags
1564 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1565 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001570 PKG_CONFIG path to pkg-config utility
1571 PKG_CONFIG_PATH
1572 directories to add to pkg-config's search path
1573 PKG_CONFIG_LIBDIR
1574 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001575
1576Use these variables to override the choices made by `configure' or to help
1577it to find libraries and programs with nonstandard names/locations.
1578
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001579Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001582fi
1583
1584if test "$ac_init_help" = "recursive"; then
1585 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 test -d "$ac_dir" ||
1588 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1589 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ac_builddir=.
1591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592case "$ac_dir" in
1593.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 case $ac_top_builddir_sub in
1599 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1600 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1601 esac ;;
1602esac
1603ac_abs_top_builddir=$ac_pwd
1604ac_abs_builddir=$ac_pwd$ac_dir_suffix
1605# for backward compatibility:
1606ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001607
1608case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 ac_top_srcdir=$ac_top_builddir_sub
1612 ac_abs_top_srcdir=$ac_pwd ;;
1613 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 ac_top_srcdir=$srcdir
1616 ac_abs_top_srcdir=$srcdir ;;
1617 *) # Relative name.
1618 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1619 ac_top_srcdir=$ac_top_build_prefix$srcdir
1620 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001621esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 cd "$ac_dir" || { ac_status=$?; continue; }
1625 # Check for guested configure.
1626 if test -f "$ac_srcdir/configure.gnu"; then
1627 echo &&
1628 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1629 elif test -f "$ac_srcdir/configure"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001633 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 fi || ac_status=$?
1635 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 done
1637fi
1638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001639test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001640if $ac_init_version; then
1641 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001642python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001643generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001645Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001646This configure script is free software; the Free Software Foundation
1647gives unlimited permission to copy, distribute and modify it.
1648_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001651
1652## ------------------------ ##
1653## Autoconf initialization. ##
1654## ------------------------ ##
1655
1656# ac_fn_c_try_compile LINENO
1657# --------------------------
1658# Try to compile conftest.$ac_ext, and return whether this succeeded.
1659ac_fn_c_try_compile ()
1660{
1661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1662 rm -f conftest.$ac_objext
1663 if { { ac_try="$ac_compile"
1664case "(($ac_try" in
1665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666 *) ac_try_echo=$ac_try;;
1667esac
1668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669$as_echo "$ac_try_echo"; } >&5
1670 (eval "$ac_compile") 2>conftest.err
1671 ac_status=$?
1672 if test -s conftest.err; then
1673 grep -v '^ *+' conftest.err >conftest.er1
1674 cat conftest.er1 >&5
1675 mv -f conftest.er1 conftest.err
1676 fi
1677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678 test $ac_status = 0; } && {
1679 test -z "$ac_c_werror_flag" ||
1680 test ! -s conftest.err
1681 } && test -s conftest.$ac_objext; then :
1682 ac_retval=0
1683else
1684 $as_echo "$as_me: failed program was:" >&5
1685sed 's/^/| /' conftest.$ac_ext >&5
1686
1687 ac_retval=1
1688fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001689 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 as_fn_set_status $ac_retval
1691
1692} # ac_fn_c_try_compile
1693
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001694# ac_fn_c_try_cpp LINENO
1695# ----------------------
1696# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1697ac_fn_c_try_cpp ()
1698{
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 if { { ac_try="$ac_cpp conftest.$ac_ext"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1708 ac_status=$?
1709 if test -s conftest.err; then
1710 grep -v '^ *+' conftest.err >conftest.er1
1711 cat conftest.er1 >&5
1712 mv -f conftest.er1 conftest.err
1713 fi
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; } > conftest.i && {
1716 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1717 test ! -s conftest.err
1718 }; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=1
1725fi
1726 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1727 as_fn_set_status $ac_retval
1728
1729} # ac_fn_c_try_cpp
1730
Matthias Kloseb9621712010-04-24 17:59:49 +00001731# ac_fn_c_try_link LINENO
1732# -----------------------
1733# Try to link conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_link ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 rm -f conftest.$ac_objext conftest$ac_exeext
1738 if { { ac_try="$ac_link"
1739case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742esac
1743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744$as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_link") 2>conftest.err
1746 ac_status=$?
1747 if test -s conftest.err; then
1748 grep -v '^ *+' conftest.err >conftest.er1
1749 cat conftest.er1 >&5
1750 mv -f conftest.er1 conftest.err
1751 fi
1752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753 test $ac_status = 0; } && {
1754 test -z "$ac_c_werror_flag" ||
1755 test ! -s conftest.err
1756 } && test -s conftest$ac_exeext && {
1757 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001758 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 }; then :
1760 ac_retval=0
1761else
1762 $as_echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5
1764
1765 ac_retval=1
1766fi
1767 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1768 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1769 # interfere with the next link command; also delete a directory that is
1770 # left behind by Apple's compiler. We do this before executing the actions.
1771 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 as_fn_set_status $ac_retval
1774
1775} # ac_fn_c_try_link
1776
Matthias Kloseb9621712010-04-24 17:59:49 +00001777# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1778# -------------------------------------------------------
1779# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1780# the include files in INCLUDES and setting the cache variable VAR
1781# accordingly.
1782ac_fn_c_check_header_mongrel ()
1783{
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001785 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001788if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 $as_echo_n "(cached) " >&6
1790fi
1791eval ac_res=\$$3
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793$as_echo "$ac_res" >&6; }
1794else
1795 # Is the header compilable?
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1797$as_echo_n "checking $2 usability... " >&6; }
1798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799/* end confdefs.h. */
1800$4
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_compile "$LINENO"; then :
1804 ac_header_compiler=yes
1805else
1806 ac_header_compiler=no
1807fi
1808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1810$as_echo "$ac_header_compiler" >&6; }
1811
1812# Is the header present?
1813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1814$as_echo_n "checking $2 presence... " >&6; }
1815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816/* end confdefs.h. */
1817#include <$2>
1818_ACEOF
1819if ac_fn_c_try_cpp "$LINENO"; then :
1820 ac_header_preproc=yes
1821else
1822 ac_header_preproc=no
1823fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001824rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1826$as_echo "$ac_header_preproc" >&6; }
1827
1828# So? What about this header?
1829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1830 yes:no: )
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1832$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1835 ;;
1836 no:yes:* )
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1838$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1840$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1842$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1844$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001847( $as_echo "## --------------------------------------- ##
1848## Report this to https://bugs.python.org/ ##
1849## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001850 ) | sed "s/^/$as_me: WARNING: /" >&2
1851 ;;
1852esac
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001855if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001856 $as_echo_n "(cached) " >&6
1857else
1858 eval "$3=\$ac_header_compiler"
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001865
1866} # ac_fn_c_check_header_mongrel
1867
1868# ac_fn_c_try_run LINENO
1869# ----------------------
1870# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1871# that executables *can* be run.
1872ac_fn_c_try_run ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_link"
1876case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_link") 2>&5
1883 ac_status=$?
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1886 { { case "(($ac_try" in
1887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888 *) ac_try_echo=$ac_try;;
1889esac
1890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891$as_echo "$ac_try_echo"; } >&5
1892 (eval "$ac_try") 2>&5
1893 ac_status=$?
1894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1895 test $ac_status = 0; }; }; then :
1896 ac_retval=0
1897else
1898 $as_echo "$as_me: program exited with status $ac_status" >&5
1899 $as_echo "$as_me: failed program was:" >&5
1900sed 's/^/| /' conftest.$ac_ext >&5
1901
1902 ac_retval=$ac_status
1903fi
1904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001906 as_fn_set_status $ac_retval
1907
1908} # ac_fn_c_try_run
1909
1910# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1911# -------------------------------------------------------
1912# Tests whether HEADER exists and can be compiled using the include files in
1913# INCLUDES, setting the cache variable VAR accordingly.
1914ac_fn_c_check_header_compile ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001920 $as_echo_n "(cached) " >&6
1921else
1922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923/* end confdefs.h. */
1924$4
1925#include <$2>
1926_ACEOF
1927if ac_fn_c_try_compile "$LINENO"; then :
1928 eval "$3=yes"
1929else
1930 eval "$3=no"
1931fi
1932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001938
1939} # ac_fn_c_check_header_compile
1940
Matthias Kloseb9621712010-04-24 17:59:49 +00001941# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1942# -------------------------------------------
1943# Tests whether TYPE exists after having included INCLUDES, setting cache
1944# variable VAR accordingly.
1945ac_fn_c_check_type ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1949$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=no"
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof ($2))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$4
1970int
1971main ()
1972{
1973if (sizeof (($2)))
1974 return 0;
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980
1981else
1982 eval "$3=yes"
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_check_type
1994
Matthias Kloseb9621712010-04-24 17:59:49 +00001995# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1996# --------------------------------------------
1997# Tries to find the compile-time value of EXPR in a program that includes
1998# INCLUDES, setting VAR accordingly. Returns whether the value could be
1999# computed
2000ac_fn_c_compute_int ()
2001{
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 if test "$cross_compiling" = yes; then
2004 # Depending upon the size, compute the lo and hi bounds.
2005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$4
2008int
2009main ()
2010{
2011static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002012test_array [0] = 0;
2013return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002014
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020 ac_lo=0 ac_mid=0
2021 while :; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025int
2026main ()
2027{
2028static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002029test_array [0] = 0;
2030return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_hi=$ac_mid; break
2038else
2039 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2040 if test $ac_lo -le $ac_mid; then
2041 ac_lo= ac_hi=
2042 break
2043 fi
2044 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047 done
2048else
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=-1 ac_mid=-1
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=$ac_mid; break
2082else
2083 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084 if test $ac_mid -le $ac_hi; then
2085 ac_lo= ac_hi=
2086 break
2087 fi
2088 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 done
2092else
2093 ac_lo= ac_hi=
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098# Binary search between lo and hi bounds.
2099while test "x$ac_lo" != "x$ac_hi"; do
2100 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=$ac_mid
2117else
2118 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121done
2122case $ac_lo in #((
2123?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2124'') ac_retval=1 ;;
2125esac
2126 else
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130static long int longval () { return $2; }
2131static unsigned long int ulongval () { return $2; }
2132#include <stdio.h>
2133#include <stdlib.h>
2134int
2135main ()
2136{
2137
2138 FILE *f = fopen ("conftest.val", "w");
2139 if (! f)
2140 return 1;
2141 if (($2) < 0)
2142 {
2143 long int i = longval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%ld", i);
2147 }
2148 else
2149 {
2150 unsigned long int i = ulongval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%lu", i);
2154 }
2155 /* Do not output a trailing newline, as this causes \r\n confusion
2156 on some platforms. */
2157 return ferror (f) || fclose (f) != 0;
2158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_run "$LINENO"; then :
2164 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2165else
2166 ac_retval=1
2167fi
2168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2169 conftest.$ac_objext conftest.beam conftest.$ac_ext
2170rm -f conftest.val
2171
2172 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002173 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 as_fn_set_status $ac_retval
2175
2176} # ac_fn_c_compute_int
2177
2178# ac_fn_c_check_func LINENO FUNC VAR
2179# ----------------------------------
2180# Tests whether FUNC exists, setting the cache variable VAR accordingly
2181ac_fn_c_check_func ()
2182{
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2185$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002186if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 $as_echo_n "(cached) " >&6
2188else
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2193#define $2 innocuous_$2
2194
2195/* System header to define __stub macros and hopefully few prototypes,
2196 which can conflict with char $2 (); below.
2197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2198 <limits.h> exists even on freestanding compilers. */
2199
2200#ifdef __STDC__
2201# include <limits.h>
2202#else
2203# include <assert.h>
2204#endif
2205
2206#undef $2
2207
2208/* Override any GCC internal prototype to avoid an error.
2209 Use char because int might match the return type of a GCC
2210 builtin and then its argument prototype would still apply. */
2211#ifdef __cplusplus
2212extern "C"
2213#endif
2214char $2 ();
2215/* The GNU C library defines this for functions which it implements
2216 to always fail with ENOSYS. Some functions are actually named
2217 something starting with __ and the normal name is an alias. */
2218#if defined __stub_$2 || defined __stub___$2
2219choke me
2220#endif
2221
2222int
2223main ()
2224{
2225return $2 ();
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_link "$LINENO"; then :
2231 eval "$3=yes"
2232else
2233 eval "$3=no"
2234fi
2235rm -f core conftest.err conftest.$ac_objext \
2236 conftest$ac_exeext conftest.$ac_ext
2237fi
2238eval ac_res=\$$3
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002242
2243} # ac_fn_c_check_func
2244
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002245# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2246# ---------------------------------------------
2247# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2248# accordingly.
2249ac_fn_c_check_decl ()
2250{
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 as_decl_name=`echo $2|sed 's/ *(.*//'`
2253 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2255$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2256if eval \${$3+:} false; then :
2257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$4
2262int
2263main ()
2264{
2265#ifndef $as_decl_name
2266#ifdef __cplusplus
2267 (void) $as_decl_use;
2268#else
2269 (void) $as_decl_name;
2270#endif
2271#endif
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278 eval "$3=yes"
2279else
2280 eval "$3=no"
2281fi
2282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283fi
2284eval ac_res=\$$3
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
2287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2288
2289} # ac_fn_c_check_decl
2290
Matthias Kloseb9621712010-04-24 17:59:49 +00002291# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2292# ----------------------------------------------------
2293# Tries to find if the field MEMBER exists in type AGGR, after including
2294# INCLUDES, setting cache variable VAR accordingly.
2295ac_fn_c_check_member ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2299$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (sizeof ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 eval "$4=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$4
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002345
2346} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002348This file contains any messages produced by compilers while
2349running configure, to aid debugging if configure makes a mistake.
2350
Ned Deily5489bda2018-01-31 17:44:09 -05002351It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002352generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
2354 $ $0 $@
2355
2356_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002358{
2359cat <<_ASUNAME
2360## --------- ##
2361## Platform. ##
2362## --------- ##
2363
2364hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368uname -v = `(uname -v) 2>/dev/null || echo unknown`
2369
2370/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2372
2373/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2374/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2375/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002377/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2378/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2379/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2380
2381_ASUNAME
2382
2383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo "PATH: $as_dir"
2389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002391
2392} >&5
2393
2394cat >&5 <<_ACEOF
2395
2396
2397## ----------- ##
2398## Core tests. ##
2399## ----------- ##
2400
2401_ACEOF
2402
2403
2404# Keep a trace of the command line.
2405# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002407# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002410ac_configure_args0=
2411ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_must_keep_next=false
2413for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002414do
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 for ac_arg
2416 do
2417 case $ac_arg in
2418 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420 | -silent | --silent | --silen | --sile | --sil)
2421 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 esac
2425 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002430 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 case $ac_arg in
2433 *=* | --config-cache | -C | -disable-* | --disable-* \
2434 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436 | -with-* | --with-* | -without-* | --without-* | --x)
2437 case "$ac_configure_args0 " in
2438 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2439 esac
2440 ;;
2441 -* ) ac_must_keep_next=true ;;
2442 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 ;;
2446 esac
2447 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002448done
Matthias Kloseb9621712010-04-24 17:59:49 +00002449{ ac_configure_args0=; unset ac_configure_args0;}
2450{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
2452# When interrupted or exit'd, cleanup temporary files, and complete
2453# config.log. We remove comments because anyway the quotes in there
2454# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455# WARNING: Use '\'' to represent an apostrophe within the trap.
2456# 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 +00002457trap 'exit_status=$?
2458 # Save into config.log some information that might help in debugging.
2459 {
2460 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002461
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002462 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002463## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 echo
2466 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467(
2468 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469 eval ac_val=\$$ac_var
2470 case $ac_val in #(
2471 *${as_nl}*)
2472 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac
2476 case $ac_var in #(
2477 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 "s/'\''/'\''\\\\'\'''\''/g;
2488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2489 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002490 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac |
2494 sort
2495)
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002497
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002499## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_vars
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511
2512 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 echo
2517 for ac_var in $ac_subst_files
2518 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 eval ac_val=\$$ac_var
2520 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 done | sort
2525 echo
2526 fi
2527
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002530## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 fi
2536 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$as_me: caught signal $ac_signal"
2538 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 rm -f core *.core core.conftest.* &&
2541 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002544for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547ac_signal=0
2548
2549# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
Matthias Kloseb9621712010-04-24 17:59:49 +00002552$as_echo "/* confdefs.h */" > confdefs.h
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554# Predefined preprocessor variables.
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_NAME "$PACKAGE_NAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_VERSION "$PACKAGE_VERSION"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_STRING "$PACKAGE_STRING"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2574_ACEOF
2575
Matthias Kloseb9621712010-04-24 17:59:49 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_URL "$PACKAGE_URL"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
2581# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002582# Prefer an explicitly selected file to automatically selected ones.
2583ac_site_file1=NONE
2584ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 # We do not want a PATH search for config.site.
2587 case $CONFIG_SITE in #((
2588 -*) ac_site_file1=./$CONFIG_SITE;;
2589 */*) ac_site_file1=$CONFIG_SITE;;
2590 *) ac_site_file1=./$CONFIG_SITE;;
2591 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 ac_site_file1=$prefix/share/config.site
2594 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595else
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$ac_default_prefix/share/config.site
2597 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002599for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600do
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 test "x$ac_site_file" = xNONE && continue
2602 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606 . "$ac_site_file" \
2607 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002610See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611 fi
2612done
2613
2614if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 # Some versions of bash will fail to source /dev/null (special files
2616 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2617 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 esac
2624 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625else
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 >$cache_file
2629fi
2630
2631# Check that the precious variables saved in the cache have kept the same
2632# value.
2633ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 case $ac_old_set,$ac_new_set in
2640 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642$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 +00002643 ac_cache_corrupted=: ;;
2644 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_cache_corrupted=: ;;
2648 ,);;
2649 *)
2650 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 # differences in whitespace do not lead to failure.
2652 ac_old_val_w=`echo x $ac_old_val`
2653 ac_new_val_w=`echo x $ac_new_val`
2654 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657 ac_cache_corrupted=:
2658 else
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661 eval $ac_var=\$ac_old_val
2662 fi
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2664$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2666$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 fi;;
2668 esac
2669 # Pass precious variables to config.status.
2670 if test "$ac_new_set" = set; then
2671 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 *) ac_arg=$ac_var=$ac_new_val ;;
2674 esac
2675 case " $ac_configure_args " in
2676 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 esac
2679 fi
2680done
2681if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002688## -------------------- ##
2689## Main body of script. ##
2690## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691
Guido van Rossum7f43da71994-08-01 12:15:30 +00002692ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697
Guido van Rossum627b2d71993-12-24 10:39:16 +00002698
Michael W. Hudson54241132001-12-07 15:38:26 +00002699
Trent Nelson4d4ec652012-10-16 08:51:24 -04002700
Christian Heimesff5be6e2018-01-20 13:19:21 +01002701
2702
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002703if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002704 # If we're building out-of-tree, we need to make sure the following
2705 # resources get picked up before their $srcdir counterparts.
2706 # Objects/ -> typeslots.inc
2707 # Include/ -> Python-ast.h, graminit.h
2708 # Python/ -> importlib.h
2709 # (A side effect of this is that these resources will automatically be
2710 # regenerated when building out-of-tree, regardless of whether or not
2711 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2712 # off.)
2713 BASECPPFLAGS="-IObjects -IInclude -IPython"
2714else
2715 BASECPPFLAGS=""
2716fi
2717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Victor Stinner9ed34a82017-05-02 22:35:58 +02002722if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724# Extract the first word of "git", so it can be a program name with args.
2725set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 if test -n "$HAS_GIT"; then
2732 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750fi
2751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=$ac_cv_prog_HAS_GIT
2753if test -n "$HAS_GIT"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2755$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766then
Xiang Zhang4c855572018-08-20 22:36:19 +08002767 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2768 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2769 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771 GITVERSION=""
2772 GITTAG=""
2773 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
doko@python.orga10e4a92013-01-25 18:45:12 +01002881
2882
Ned Deilyfcbc2462014-08-22 13:32:49 -07002883# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2884rm -f pybuilddir.txt
2885
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886for ac_prog in python$PACKAGE_VERSION python3 python
2887do
2888 # Extract the first word of "$ac_prog", so it can be a program name with args.
2889set dummy $ac_prog; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo_n "(cached) " >&6
2894else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 if test -n "$PYTHON_FOR_REGEN"; then
2896 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897else
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2907 break 2
2908 fi
2909done
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2916if test -n "$PYTHON_FOR_REGEN"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2918$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002927test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002937 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 +02002938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002947 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 +02002948 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002949elif test "$cross_compiling" = maybe; then
2950 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951else
2952 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily5489bda2018-01-31 17:44:09 -05002971VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003018 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003240
3241cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003242#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243_ACEOF
3244
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003262 *-*-linux-android*)
3263 ac_sys_system=Linux-android
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *-*-linux*)
3266 ac_sys_system=Linux
3267 ;;
3268 *-*-cygwin*)
3269 ac_sys_system=Cygwin
3270 ;;
3271 *)
3272 # for now, limit cross builds to known configurations
3273 MACHDEP="unknown"
3274 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3275 esac
3276 ac_sys_release=
3277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003279 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003280 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 fi
3286 ac_md_system=`echo $ac_sys_system |
3287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3288 ac_md_release=`echo $ac_sys_release |
3289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003291
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
Guido van Rossum91922671997-10-09 20:24:13 +00003299
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003300
3301if test "$cross_compiling" = yes; then
3302 case "$host" in
3303 *-*-linux*)
3304 case "$host_cpu" in
3305 arm*)
3306 _host_cpu=arm
3307 ;;
3308 *)
3309 _host_cpu=$host_cpu
3310 esac
3311 ;;
3312 *-*-cygwin*)
3313 _host_cpu=
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403esac
3404
3405if test $define_xopen_source = yes
3406then
Victor Stinner14d098d2011-09-07 22:29:43 +02003407 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Victor Stinner14d098d2011-09-07 22:29:43 +02003409$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3413 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3414 # several APIs are not declared. Since this is also needed in some
3415 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
3419
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003421$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003423fi
3424
Christian Heimes647cd872013-12-07 23:39:33 +01003425# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3426case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003427 hp*|HP*)
3428 define_stdc_a1=yes;;
3429 *)
3430 define_stdc_a1=no;;
3431esac
3432
3433if test $define_stdc_a1 = yes
3434then
Christian Heimes647cd872013-12-07 23:39:33 +01003435
3436$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3437
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438fi
Christian Heimes647cd872013-12-07 23:39:33 +01003439
Jack Jansen6b08a402004-06-03 12:41:45 +00003440# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3441# it may influence the way we can build extensions, so distutils
3442# needs to check it
3443
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003447
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003449
3450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3451# for debug/optimization stuff. BASECFLAGS is for flags that are required
3452# just to get things to compile and link. Users are free to override OPT
3453# when running configure or make. The build should not break if they do.
3454# BASECFLAGS should generally not be messed with, however.
3455
Guido van Rossum8b131c51995-03-09 14:10:13 +00003456# If the user switches compilers, we can't believe the cache
3457if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3458then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003459 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003460(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003461fi
3462
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003463# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3464# when the compiler supports them, but we don't always want -O2, and
3465# we set -g later.
3466if test -z "$CFLAGS"; then
3467 CFLAGS=
3468fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003469
3470if test "$ac_sys_system" = "Darwin"
3471then
3472 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003473 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474 # information
3475 if test -z "${CC}"
3476 then
3477 found_gcc=
3478 found_clang=
3479 as_save_IFS=$IFS; IFS=:
3480 for as_dir in $PATH
3481 do
3482 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003485 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486 fi
3487 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 fi
3492 fi
3493 done
3494 IFS=$as_save_IFS
3495
3496 if test -n "$found_gcc" -a -n "$found_clang"
3497 then
3498 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3499 then
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3501$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3502 CC="$found_clang"
3503 CXX="$found_clang++"
3504 fi
3505
3506
3507 elif test -z "$found_gcc" -a -n "$found_clang"
3508 then
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3510$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3511 CC="$found_clang"
3512 CXX="$found_clang++"
3513
3514 elif test -z "$found_gcc" -a -z "$found_clang"
3515 then
3516 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3517 if test -n "${found_clang}"
3518 then
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3520$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3521 CC="${found_clang}"
3522 CXX="`/usr/bin/xcrun -find clang++`"
3523
3524 # else: use default behaviour
3525 fi
3526 fi
3527 fi
3528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003529ac_ext=c
3530ac_cpp='$CPP $CPPFLAGS'
3531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3533ac_compiler_gnu=$ac_cv_c_compiler_gnu
3534if test -n "$ac_tool_prefix"; then
3535 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3536set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003539if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003540 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003541else
3542 if test -n "$CC"; then
3543 ac_cv_prog_CC="$CC" # Let the user override the test.
3544else
Martin v. Löwis11437992002-04-12 09:54:03 +00003545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546for as_dir in $PATH
3547do
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 $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 +00003554 break 2
3555 fi
3556done
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003559
Jack Jansendd19cf82001-12-06 22:36:17 +00003560fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003563if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3565$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003566else
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003569fi
3570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572fi
3573if test -z "$ac_cv_prog_CC"; then
3574 ac_ct_CC=$CC
3575 # Extract the first word of "gcc", so it can be a program name with args.
3576set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003581else
3582 if test -n "$ac_ct_CC"; then
3583 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $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 +00003594 break 2
3595 fi
3596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
3600fi
3601fi
3602ac_ct_CC=$ac_cv_prog_ac_ct_CC
3603if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3605$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 if test "x$ac_ct_CC" = x; then
3612 CC=""
3613 else
3614 case $cross_compiling:$ac_tool_warned in
3615yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618ac_tool_warned=yes ;;
3619esac
3620 CC=$ac_ct_CC
3621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003624fi
3625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 if test -n "$ac_tool_prefix"; then
3628 # 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 +00003629set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003632if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003634else
3635 if test -n "$CC"; then
3636 ac_cv_prog_CC="$CC" # Let the user override the test.
3637else
Martin v. Löwis11437992002-04-12 09:54:03 +00003638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $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 +00003647 break 2
3648 fi
3649done
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655CC=$ac_cv_prog_CC
3656if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3658$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667if test -z "$CC"; then
3668 # Extract the first word of "cc", so it can be a program name with args.
3669set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003672if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3687 ac_prog_rejected=yes
3688 continue
3689 fi
3690 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $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 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698if test $ac_prog_rejected = yes; then
3699 # We found a bogon in the path, so make sure we never use it.
3700 set dummy $ac_cv_prog_CC
3701 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703 # We chose a different compiler from the bogus one.
3704 # However, it has the same basename, so the bogon will be chosen
3705 # first if we set CC to just the basename; use the full file name.
3706 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003707 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 fi
3709fi
3710fi
3711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3715$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716else
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719fi
3720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723if test -z "$CC"; then
3724 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 do
3727 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003731if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003733else
3734 if test -n "$CC"; then
3735 ac_cv_prog_CC="$CC" # Let the user override the test.
3736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
3752fi
3753fi
3754CC=$ac_cv_prog_CC
3755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$CC" && break
3765 done
3766fi
3767if test -z "$CC"; then
3768 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770do
3771 # Extract the first word of "$ac_prog", so it can be a program name with args.
3772set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003777else
3778 if test -n "$ac_ct_CC"; then
3779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3780else
3781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $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 +00003790 break 2
3791 fi
3792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797fi
3798ac_ct_CC=$ac_cv_prog_ac_ct_CC
3799if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3801$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$ac_ct_CC" && break
3809done
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 if test "x$ac_ct_CC" = x; then
3812 CC=""
3813 else
3814 case $cross_compiling:$ac_tool_warned in
3815yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818ac_tool_warned=yes ;;
3819esac
3820 CC=$ac_ct_CC
3821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
3823
3824fi
3825
3826
Matthias Kloseb9621712010-04-24 17:59:49 +00003827test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003829as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003830See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003833$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3834set X $ac_compile
3835ac_compiler=$2
3836for ac_option in --version -v -V -qversion; do
3837 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838case "(($ac_try" in
3839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3840 *) ac_try_echo=$ac_try;;
3841esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3843$as_echo "$ac_try_echo"; } >&5
3844 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 if test -s conftest.err; then
3847 sed '10a\
3848... rest of stderr output deleted ...
3849 10q' conftest.err >conftest.er1
3850 cat conftest.er1 >&5
3851 fi
3852 rm -f conftest.er1 conftest.err
3853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3854 test $ac_status = 0; }
3855done
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
Matthias Kloseb9621712010-04-24 17:59:49 +00003857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003858/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860int
3861main ()
3862{
3863
3864 ;
3865 return 0;
3866}
3867_ACEOF
3868ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003869ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003870# Try to create an executable without -o first, disregard a.out.
3871# It will help us diagnose broken compilers, and finding out an intuition
3872# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3874$as_echo_n "checking whether the C compiler works... " >&6; }
3875ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3876
3877# The possible output files:
3878ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880ac_rmfiles=
3881for ac_file in $ac_files
3882do
3883 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3886 esac
3887done
3888rm -f $ac_rmfiles
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3902# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3903# in a Makefile. We should not override ac_cv_exeext if it was cached,
3904# so that the user can short-circuit this test for compilers unknown to
3905# Autoconf.
3906for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003907do
3908 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 ;;
3912 [ab].out )
3913 # We found the default executable, but exeext='' is most
3914 # certainly right.
3915 break;;
3916 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 then :; else
3919 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3920 fi
3921 # We set ac_cv_exeext here because the later test for it is not
3922 # safe: cross compilers may not add the suffix if given an `-o'
3923 # argument, so we may need to know it at that point already.
3924 # Even if this section looks crufty: it has the advantage of
3925 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003926 break;;
3927 * )
3928 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 esac
3930done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931test "$ac_cv_exeext" = no && ac_cv_exeext=
3932
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003933else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_file=''
3935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003936if test -z "$ac_file"; then :
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003940sed 's/^/| /' conftest.$ac_ext >&5
3941
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003944as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003945See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003946else
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3948$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3951$as_echo_n "checking for C compiler default output file name... " >&6; }
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3953$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3959$as_echo_n "checking for suffix of executables... " >&6; }
3960if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961case "(($ac_try" in
3962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3963 *) ac_try_echo=$ac_try;;
3964esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3966$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3972# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3973# work properly (i.e., refer to `conftest.exe'), while it won't with
3974# `rm'.
3975for ac_file in conftest.exe conftest conftest.*; do
3976 test -f "$ac_file" || continue
3977 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3980 break;;
3981 * ) break;;
3982 esac
3983done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984else
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990rm -f conftest conftest$ac_cv_exeext
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3992$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993
3994rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003995EXEEXT=$ac_cv_exeext
3996ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998/* end confdefs.h. */
3999#include <stdio.h>
4000int
4001main ()
4002{
4003FILE *f = fopen ("conftest.out", "w");
4004 return ferror (f) || fclose (f) != 0;
4005
4006 ;
4007 return 0;
4008}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004010ac_clean_files="$ac_clean_files conftest.out"
4011# Check that the compiler produces executables we can run. If not, either
4012# the compiler is broken, or we cross compile.
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4014$as_echo_n "checking whether we are cross compiling... " >&6; }
4015if test "$cross_compiling" != yes; then
4016 { { ac_try="$ac_link"
4017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
4021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_link") 2>&5
4024 ac_status=$?
4025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4026 test $ac_status = 0; }
4027 if { ac_try='./conftest$ac_cv_exeext'
4028 { { case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
4032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4033$as_echo "$ac_try_echo"; } >&5
4034 (eval "$ac_try") 2>&5
4035 ac_status=$?
4036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }; }; then
4038 cross_compiling=no
4039 else
4040 if test "$cross_compiling" = maybe; then
4041 cross_compiling=yes
4042 else
4043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004045as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004046If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004047See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 fi
4049 fi
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4052$as_echo "$cross_compiling" >&6; }
4053
4054rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4055ac_clean_files=$ac_clean_files_save
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4057$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004058if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo_n "(cached) " >&6
4060else
4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004062/* end confdefs.h. */
4063
4064int
4065main ()
4066{
4067
4068 ;
4069 return 0;
4070}
4071_ACEOF
4072rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004073if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 for ac_file in conftest.o conftest.obj conftest.*; do
4085 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4089 break;;
4090 esac
4091done
4092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004094sed 's/^/| /' conftest.$ac_ext >&5
4095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004098as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004099See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004100fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4104$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004105OBJEXT=$ac_cv_objext
4106ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4108$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004109if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004114
Martin v. Löwis11437992002-04-12 09:54:03 +00004115int
4116main ()
4117{
4118#ifndef __GNUC__
4119 choke me
4120#endif
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 ac_compiler_gnu=yes
4128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004132ac_cv_c_compiler_gnu=$ac_compiler_gnu
4133
4134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4136$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4137if test $ac_compiler_gnu = yes; then
4138 GCC=yes
4139else
4140 GCC=
4141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004142ac_test_CFLAGS=${CFLAGS+set}
4143ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4145$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004148else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149 ac_save_c_werror_flag=$ac_c_werror_flag
4150 ac_c_werror_flag=yes
4151 ac_cv_prog_cc_g=no
4152 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004165 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 CFLAGS=""
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004169/* end confdefs.h. */
4170
4171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180
Matthias Kloseb9621712010-04-24 17:59:49 +00004181else
4182 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185/* end confdefs.h. */
4186
4187int
4188main ()
4189{
4190
4191 ;
4192 return 0;
4193}
4194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004195if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203 ac_c_werror_flag=$ac_save_c_werror_flag
4204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4206$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004207if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209elif test $ac_cv_prog_cc_g = yes; then
4210 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 CFLAGS="-g -O2"
4212 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214 fi
4215else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004216 if test "$GCC" = yes; then
4217 CFLAGS="-O2"
4218 else
4219 CFLAGS=
4220 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4223$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004228ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
4231#include <stdarg.h>
4232#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004233struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4235struct buf { int x; };
4236FILE * (*rcsopen) (struct buf *, struct stat *, int);
4237static char *e (p, i)
4238 char **p;
4239 int i;
4240{
4241 return p[i];
4242}
4243static char *f (char * (*g) (char **, int), char **p, ...)
4244{
4245 char *s;
4246 va_list v;
4247 va_start (v,p);
4248 s = g (p, va_arg (v,int));
4249 va_end (v);
4250 return s;
4251}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252
4253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4254 function prototypes and stuff, but not '\xHH' hex character constants.
4255 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4258 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4263 inside strings and character constants. */
4264#define FOO(x) 'x'
4265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4266
Skip Montanaro6dead952003-09-25 14:50:04 +00004267int test (int i, double x);
4268struct s1 {int (*f) (int a);};
4269struct s2 {int (*f) (double a);};
4270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4271int argc;
4272char **argv;
4273int
4274main ()
4275{
4276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4277 ;
4278 return 0;
4279}
4280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4282 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004283do
4284 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext
4289 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292CC=$ac_save_CC
4293
4294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295# AC_CACHE_VAL
4296case "x$ac_cv_prog_cc_c89" in
4297 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4299$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4302$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004303 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4324$as_echo_n "checking how to run the C preprocessor... " >&6; }
4325# On Suns, sometimes $CPP names a directory.
4326if test -n "$CPP" && test -d "$CPP"; then
4327 CPP=
4328fi
4329if test -z "$CPP"; then
4330 if ${ac_cv_prog_CPP+:} false; then :
4331 $as_echo_n "(cached) " >&6
4332else
4333 # Double quotes because CPP needs to be expanded
4334 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4335 do
4336 ac_preproc_ok=false
4337for ac_c_preproc_warn_flag in '' yes
4338do
4339 # Use a header file that comes with gcc, so configuring glibc
4340 # with a fresh cross-compiler works.
4341 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4342 # <limits.h> exists even on freestanding compilers.
4343 # On the NeXT, cc -E runs the code through the compiler's parser,
4344 # not just through cpp. "Syntax error" is here to catch this case.
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346/* end confdefs.h. */
4347#ifdef __STDC__
4348# include <limits.h>
4349#else
4350# include <assert.h>
4351#endif
4352 Syntax error
4353_ACEOF
4354if ac_fn_c_try_cpp "$LINENO"; then :
4355
4356else
4357 # Broken: fails on valid input.
4358continue
4359fi
4360rm -f conftest.err conftest.i conftest.$ac_ext
4361
4362 # OK, works on sane cases. Now check whether nonexistent headers
4363 # can be detected and how.
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#include <ac_nonexistent.h>
4367_ACEOF
4368if ac_fn_c_try_cpp "$LINENO"; then :
4369 # Broken: success on invalid input.
4370continue
4371else
4372 # Passes both tests.
4373ac_preproc_ok=:
4374break
4375fi
4376rm -f conftest.err conftest.i conftest.$ac_ext
4377
4378done
4379# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4380rm -f conftest.i conftest.err conftest.$ac_ext
4381if $ac_preproc_ok; then :
4382 break
4383fi
4384
4385 done
4386 ac_cv_prog_CPP=$CPP
4387
4388fi
4389 CPP=$ac_cv_prog_CPP
4390else
4391 ac_cv_prog_CPP=$CPP
4392fi
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4394$as_echo "$CPP" >&6; }
4395ac_preproc_ok=false
4396for ac_c_preproc_warn_flag in '' yes
4397do
4398 # Use a header file that comes with gcc, so configuring glibc
4399 # with a fresh cross-compiler works.
4400 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4401 # <limits.h> exists even on freestanding compilers.
4402 # On the NeXT, cc -E runs the code through the compiler's parser,
4403 # not just through cpp. "Syntax error" is here to catch this case.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#ifdef __STDC__
4407# include <limits.h>
4408#else
4409# include <assert.h>
4410#endif
4411 Syntax error
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414
4415else
4416 # Broken: fails on valid input.
4417continue
4418fi
4419rm -f conftest.err conftest.i conftest.$ac_ext
4420
4421 # OK, works on sane cases. Now check whether nonexistent headers
4422 # can be detected and how.
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4424/* end confdefs.h. */
4425#include <ac_nonexistent.h>
4426_ACEOF
4427if ac_fn_c_try_cpp "$LINENO"; then :
4428 # Broken: success on invalid input.
4429continue
4430else
4431 # Passes both tests.
4432ac_preproc_ok=:
4433break
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437done
4438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4439rm -f conftest.i conftest.err conftest.$ac_ext
4440if $ac_preproc_ok; then :
4441
4442else
4443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4445as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4446See \`config.log' for more details" "$LINENO" 5; }
4447fi
4448
4449ac_ext=c
4450ac_cpp='$CPP $CPPFLAGS'
4451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4453ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4456$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4457if ${ac_cv_path_GREP+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459else
4460 if test -z "$GREP"; then
4461 ac_path_GREP_found=false
4462 # Loop through the user's path and test for each of PROGNAME-LIST
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4465do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
4468 for ac_prog in grep ggrep; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4471 as_fn_executable_p "$ac_path_GREP" || continue
4472# Check for GNU ac_path_GREP and select it if it is found.
4473 # Check for GNU $ac_path_GREP
4474case `"$ac_path_GREP" --version 2>&1` in
4475*GNU*)
4476 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4477*)
4478 ac_count=0
4479 $as_echo_n 0123456789 >"conftest.in"
4480 while :
4481 do
4482 cat "conftest.in" "conftest.in" >"conftest.tmp"
4483 mv "conftest.tmp" "conftest.in"
4484 cp "conftest.in" "conftest.nl"
4485 $as_echo 'GREP' >> "conftest.nl"
4486 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4487 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4488 as_fn_arith $ac_count + 1 && ac_count=$as_val
4489 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4490 # Best one so far, save it but keep looking for a better one
4491 ac_cv_path_GREP="$ac_path_GREP"
4492 ac_path_GREP_max=$ac_count
4493 fi
4494 # 10*(2^10) chars as input seems more than enough
4495 test $ac_count -gt 10 && break
4496 done
4497 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4498esac
4499
4500 $ac_path_GREP_found && break 3
4501 done
4502 done
4503 done
4504IFS=$as_save_IFS
4505 if test -z "$ac_cv_path_GREP"; then
4506 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4507 fi
4508else
4509 ac_cv_path_GREP=$GREP
4510fi
4511
4512fi
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4514$as_echo "$ac_cv_path_GREP" >&6; }
4515 GREP="$ac_cv_path_GREP"
4516
4517
Łukasz Langaa785c872016-09-09 17:37:37 -07004518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4519$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4520if ${ac_cv_path_SED+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4524 for ac_i in 1 2 3 4 5 6 7; do
4525 ac_script="$ac_script$as_nl$ac_script"
4526 done
4527 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4528 { ac_script=; unset ac_script;}
4529 if test -z "$SED"; then
4530 ac_path_SED_found=false
4531 # Loop through the user's path and test for each of PROGNAME-LIST
4532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533for as_dir in $PATH
4534do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
4537 for ac_prog in sed gsed; do
4538 for ac_exec_ext in '' $ac_executable_extensions; do
4539 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4540 as_fn_executable_p "$ac_path_SED" || continue
4541# Check for GNU ac_path_SED and select it if it is found.
4542 # Check for GNU $ac_path_SED
4543case `"$ac_path_SED" --version 2>&1` in
4544*GNU*)
4545 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4546*)
4547 ac_count=0
4548 $as_echo_n 0123456789 >"conftest.in"
4549 while :
4550 do
4551 cat "conftest.in" "conftest.in" >"conftest.tmp"
4552 mv "conftest.tmp" "conftest.in"
4553 cp "conftest.in" "conftest.nl"
4554 $as_echo '' >> "conftest.nl"
4555 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4557 as_fn_arith $ac_count + 1 && ac_count=$as_val
4558 if test $ac_count -gt ${ac_path_SED_max-0}; then
4559 # Best one so far, save it but keep looking for a better one
4560 ac_cv_path_SED="$ac_path_SED"
4561 ac_path_SED_max=$ac_count
4562 fi
4563 # 10*(2^10) chars as input seems more than enough
4564 test $ac_count -gt 10 && break
4565 done
4566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4567esac
4568
4569 $ac_path_SED_found && break 3
4570 done
4571 done
4572 done
4573IFS=$as_save_IFS
4574 if test -z "$ac_cv_path_SED"; then
4575 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4576 fi
4577else
4578 ac_cv_path_SED=$SED
4579fi
4580
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4583$as_echo "$ac_cv_path_SED" >&6; }
4584 SED="$ac_cv_path_SED"
4585 rm -f conftest.sed
4586
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004587
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589
Matthias Kloseb9621712010-04-24 17:59:49 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4591$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004593# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004594if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
4597 case $withval in
4598 no) with_cxx_main=no
4599 MAINCC='$(CC)';;
4600 yes) with_cxx_main=yes
4601 MAINCC='$(CXX)';;
4602 *) with_cxx_main=yes
4603 MAINCC=$withval
4604 if test -z "$CXX"
4605 then
4606 CXX=$withval
4607 fi;;
4608 esac
4609else
4610
4611 with_cxx_main=no
4612 MAINCC='$(CC)'
4613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614fi
4615
Matthias Kloseb9621712010-04-24 17:59:49 +00004616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4617$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004618
4619preset_cxx="$CXX"
4620if test -z "$CXX"
4621then
4622 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 gcc) if test -n "$ac_tool_prefix"; then
4624 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4625set dummy ${ac_tool_prefix}g++; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_CXX+:} false; then :
4629 $as_echo_n "(cached) " >&6
4630else
4631 case $CXX in
4632 [\\/]* | ?:[\\/]*)
4633 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4634 ;;
4635 *)
4636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in notfound
4638do
4639 IFS=$as_save_IFS
4640 test -z "$as_dir" && as_dir=.
4641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004643 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645 break 2
4646 fi
4647done
4648 done
4649IFS=$as_save_IFS
4650
4651 ;;
4652esac
4653fi
4654CXX=$ac_cv_path_CXX
4655if test -n "$CXX"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4657$as_echo "$CXX" >&6; }
4658else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664fi
4665if test -z "$ac_cv_path_CXX"; then
4666 ac_pt_CXX=$CXX
4667 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671if ${ac_cv_path_ac_pt_CXX+:} false; then :
4672 $as_echo_n "(cached) " >&6
4673else
4674 case $ac_pt_CXX in
4675 [\\/]* | ?:[\\/]*)
4676 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4677 ;;
4678 *)
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in notfound
4681do
4682 IFS=$as_save_IFS
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688 break 2
4689 fi
4690done
4691 done
4692IFS=$as_save_IFS
4693
4694 ;;
4695esac
4696fi
4697ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4698if test -n "$ac_pt_CXX"; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4700$as_echo "$ac_pt_CXX" >&6; }
4701else
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706 if test "x$ac_pt_CXX" = x; then
4707 CXX="g++"
4708 else
4709 case $cross_compiling:$ac_tool_warned in
4710yes:)
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4713ac_tool_warned=yes ;;
4714esac
4715 CXX=$ac_pt_CXX
4716 fi
4717else
4718 CXX="$ac_cv_path_CXX"
4719fi
4720 ;;
4721 cc) if test -n "$ac_tool_prefix"; then
4722 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4723set dummy ${ac_tool_prefix}c++; ac_word=$2
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004726if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728else
4729 case $CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743 break 2
4744 fi
4745done
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004747IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 ;;
4750esac
4751fi
4752CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4755$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756else
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761
4762fi
4763if test -z "$ac_cv_path_CXX"; then
4764 ac_pt_CXX=$CXX
4765 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4768$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 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 +00004775 ;;
4776 *)
4777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in notfound
4779do
4780 IFS=$as_save_IFS
4781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 break 2
4787 fi
4788done
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004790IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 ;;
4793esac
4794fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4796if test -n "$ac_pt_CXX"; then
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4798$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799else
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004803
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 if test "x$ac_pt_CXX" = x; then
4805 CXX="c++"
4806 else
4807 case $cross_compiling:$ac_tool_warned in
4808yes:)
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4811ac_tool_warned=yes ;;
4812esac
4813 CXX=$ac_pt_CXX
4814 fi
4815else
4816 CXX="$ac_cv_path_CXX"
4817fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 clang|*/clang) if test -n "$ac_tool_prefix"; then
4820 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4821set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
4824if ${ac_cv_path_CXX+:} false; then :
4825 $as_echo_n "(cached) " >&6
4826else
4827 case $CXX in
4828 [\\/]* | ?:[\\/]*)
4829 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
4837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841 break 2
4842 fi
4843done
4844 done
4845IFS=$as_save_IFS
4846
Ned Deilycbfb9a52012-06-23 16:02:19 -07004847 ;;
4848esac
4849fi
4850CXX=$ac_cv_path_CXX
4851if test -n "$CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4853$as_echo "$CXX" >&6; }
4854else
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859
4860fi
4861if test -z "$ac_cv_path_CXX"; then
4862 ac_pt_CXX=$CXX
4863 # Extract the first word of "clang++", so it can be a program name with args.
4864set dummy clang++; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_ac_pt_CXX+:} false; then :
4868 $as_echo_n "(cached) " >&6
4869else
4870 case $ac_pt_CXX in
4871 [\\/]* | ?:[\\/]*)
4872 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4873 ;;
4874 *)
4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in notfound
4877do
4878 IFS=$as_save_IFS
4879 test -z "$as_dir" && as_dir=.
4880 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884 break 2
4885 fi
4886done
4887 done
4888IFS=$as_save_IFS
4889
4890 ;;
4891esac
4892fi
4893ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4894if test -n "$ac_pt_CXX"; then
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4896$as_echo "$ac_pt_CXX" >&6; }
4897else
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902 if test "x$ac_pt_CXX" = x; then
4903 CXX="clang++"
4904 else
4905 case $cross_compiling:$ac_tool_warned in
4906yes:)
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4909ac_tool_warned=yes ;;
4910esac
4911 CXX=$ac_pt_CXX
4912 fi
4913else
4914 CXX="$ac_cv_path_CXX"
4915fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004916 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004917 icc|*/icc) if test -n "$ac_tool_prefix"; then
4918 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4919set dummy ${ac_tool_prefix}icpc; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948CXX=$ac_cv_path_CXX
4949if test -n "$CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4951$as_echo "$CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958fi
4959if test -z "$ac_cv_path_CXX"; then
4960 ac_pt_CXX=$CXX
4961 # Extract the first word of "icpc", so it can be a program name with args.
4962set dummy icpc; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if ${ac_cv_path_ac_pt_CXX+:} false; then :
4966 $as_echo_n "(cached) " >&6
4967else
4968 case $ac_pt_CXX in
4969 [\\/]* | ?:[\\/]*)
4970 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4971 ;;
4972 *)
4973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in notfound
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
4978 for ac_exec_ext in '' $ac_executable_extensions; do
4979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4980 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982 break 2
4983 fi
4984done
4985 done
4986IFS=$as_save_IFS
4987
4988 ;;
4989esac
4990fi
4991ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4992if test -n "$ac_pt_CXX"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4994$as_echo "$ac_pt_CXX" >&6; }
4995else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000 if test "x$ac_pt_CXX" = x; then
5001 CXX="icpc"
5002 else
5003 case $cross_compiling:$ac_tool_warned in
5004yes:)
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5006$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5007ac_tool_warned=yes ;;
5008esac
5009 CXX=$ac_pt_CXX
5010 fi
5011else
5012 CXX="$ac_cv_path_CXX"
5013fi
5014 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005015 esac
5016 if test "$CXX" = "notfound"
5017 then
5018 CXX=""
5019 fi
5020fi
5021if test -z "$CXX"
5022then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005023 if test -n "$ac_tool_prefix"; then
5024 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5025 do
5026 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005030if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032else
5033 if test -n "$CXX"; then
5034 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5035else
5036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005043 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045 break 2
5046 fi
5047done
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050
5051fi
5052fi
5053CXX=$ac_cv_prog_CXX
5054if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5056$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057else
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060fi
5061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005063 test -n "$CXX" && break
5064 done
5065fi
5066if test -z "$CXX"; then
5067 ac_ct_CXX=$CXX
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069do
5070 # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5075 $as_echo_n "(cached) " >&6
5076else
5077 if test -n "$ac_ct_CXX"; then
5078 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
5085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_ac_ct_CXX="$ac_prog"
5088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089 break 2
5090 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 done
5093IFS=$as_save_IFS
5094
5095fi
5096fi
5097ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5098if test -n "$ac_ct_CXX"; then
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5100$as_echo "$ac_ct_CXX" >&6; }
5101else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107 test -n "$ac_ct_CXX" && break
5108done
5109
5110 if test "x$ac_ct_CXX" = x; then
5111 CXX="notfound"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 CXX=$ac_ct_CXX
5120 fi
5121fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122
5123 if test "$CXX" = "notfound"
5124 then
5125 CXX=""
5126 fi
5127fi
5128if test "$preset_cxx" != "$CXX"
5129then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005130 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131
5132 By default, distutils will build C++ extension modules with \"$CXX\".
5133 If this is not intended, then set CXX on the configure command line.
5134 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005135$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136
5137 By default, distutils will build C++ extension modules with \"$CXX\".
5138 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140fi
5141
5142
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005143MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5144
5145
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5147$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5148cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef bfin
5150#undef cris
5151#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef hppa
5154#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005156#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005157#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005160#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005161 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005162#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163# if defined(__x86_64__) && defined(__LP64__)
5164 x86_64-linux-gnu
5165# elif defined(__x86_64__) && defined(__ILP32__)
5166 x86_64-linux-gnux32
5167# elif defined(__i386__)
5168 i386-linux-gnu
5169# elif defined(__aarch64__) && defined(__AARCH64EL__)
5170# if defined(__ILP32__)
5171 aarch64_ilp32-linux-gnu
5172# else
5173 aarch64-linux-gnu
5174# endif
5175# elif defined(__aarch64__) && defined(__AARCH64EB__)
5176# if defined(__ILP32__)
5177 aarch64_be_ilp32-linux-gnu
5178# else
5179 aarch64_be-linux-gnu
5180# endif
5181# elif defined(__alpha__)
5182 alpha-linux-gnu
5183# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5184# if defined(__ARMEL__)
5185 arm-linux-gnueabihf
5186# else
5187 armeb-linux-gnueabihf
5188# endif
5189# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5190# if defined(__ARMEL__)
5191 arm-linux-gnueabi
5192# else
5193 armeb-linux-gnueabi
5194# endif
5195# elif defined(__hppa__)
5196 hppa-linux-gnu
5197# elif defined(__ia64__)
5198 ia64-linux-gnu
5199# elif defined(__m68k__) && !defined(__mcoldfire__)
5200 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005201# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5202# if _MIPS_SIM == _ABIO32
5203 mipsisa32r6el-linux-gnu
5204# elif _MIPS_SIM == _ABIN32
5205 mipsisa64r6el-linux-gnuabin32
5206# elif _MIPS_SIM == _ABI64
5207 mipsisa64r6el-linux-gnuabi64
5208# else
5209# error unknown platform triplet
5210# endif
5211# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5212# if _MIPS_SIM == _ABIO32
5213 mipsisa32r6-linux-gnu
5214# elif _MIPS_SIM == _ABIN32
5215 mipsisa64r6-linux-gnuabin32
5216# elif _MIPS_SIM == _ABI64
5217 mipsisa64r6-linux-gnuabi64
5218# else
5219# error unknown platform triplet
5220# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005221# elif defined(__mips_hard_float) && defined(_MIPSEL)
5222# if _MIPS_SIM == _ABIO32
5223 mipsel-linux-gnu
5224# elif _MIPS_SIM == _ABIN32
5225 mips64el-linux-gnuabin32
5226# elif _MIPS_SIM == _ABI64
5227 mips64el-linux-gnuabi64
5228# else
5229# error unknown platform triplet
5230# endif
5231# elif defined(__mips_hard_float)
5232# if _MIPS_SIM == _ABIO32
5233 mips-linux-gnu
5234# elif _MIPS_SIM == _ABIN32
5235 mips64-linux-gnuabin32
5236# elif _MIPS_SIM == _ABI64
5237 mips64-linux-gnuabi64
5238# else
5239# error unknown platform triplet
5240# endif
5241# elif defined(__or1k__)
5242 or1k-linux-gnu
5243# elif defined(__powerpc__) && defined(__SPE__)
5244 powerpc-linux-gnuspe
5245# elif defined(__powerpc64__)
5246# if defined(__LITTLE_ENDIAN__)
5247 powerpc64le-linux-gnu
5248# else
5249 powerpc64-linux-gnu
5250# endif
5251# elif defined(__powerpc__)
5252 powerpc-linux-gnu
5253# elif defined(__s390x__)
5254 s390x-linux-gnu
5255# elif defined(__s390__)
5256 s390-linux-gnu
5257# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5258 sh4-linux-gnu
5259# elif defined(__sparc__) && defined(__arch64__)
5260 sparc64-linux-gnu
5261# elif defined(__sparc__)
5262 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005263# elif defined(__riscv)
5264# if __riscv_xlen == 32
5265 riscv32-linux-gnu
5266# elif __riscv_xlen == 64
5267 riscv64-linux-gnu
5268# else
5269# error unknown platform triplet
5270# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005271# else
5272# error unknown platform triplet
5273# endif
5274#elif defined(__FreeBSD_kernel__)
5275# if defined(__LP64__)
5276 x86_64-kfreebsd-gnu
5277# elif defined(__i386__)
5278 i386-kfreebsd-gnu
5279# else
5280# error unknown platform triplet
5281# endif
5282#elif defined(__gnu_hurd__)
5283 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005284#elif defined(__APPLE__)
5285 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005286#else
5287# error unknown platform triplet
5288#endif
5289
5290EOF
5291
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005292if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5295$as_echo "$PLATFORM_TRIPLET" >&6; }
5296else
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5298$as_echo "none" >&6; }
5299fi
5300rm -f conftest.c conftest.out
5301
5302if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5303 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5304 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5305 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005306elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5307 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005308fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309
doko@ubuntu.com55532312016-06-14 08:55:19 +02005310if test x$MULTIARCH != x; then
5311 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5312fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313
5314
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5316$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5317save_LDFLAGS="$LDFLAGS"
5318LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005319
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323int
5324main ()
5325{
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331if ac_fn_c_try_link "$LINENO"; then :
5332 NO_AS_NEEDED="-Wl,--no-as-needed"
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5334$as_echo "yes" >&6; }
5335else
5336 NO_AS_NEEDED=""
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340rm -f core conftest.err conftest.$ac_objext \
5341 conftest$ac_exeext conftest.$ac_ext
5342LDFLAGS="$save_LDFLAGS"
5343
5344
5345
5346# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005347
Matthias Kloseb9621712010-04-24 17:59:49 +00005348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5349$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005350if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352else
5353 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5354 then ac_cv_path_EGREP="$GREP -E"
5355 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 # Loop through the user's path and test for each of PROGNAME-LIST
5359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5361do
5362 IFS=$as_save_IFS
5363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 for ac_prog in egrep; do
5365 for ac_exec_ext in '' $ac_executable_extensions; do
5366 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005367 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005368# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 # Check for GNU $ac_path_EGREP
5370case `"$ac_path_EGREP" --version 2>&1` in
5371*GNU*)
5372 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5373*)
5374 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 while :
5377 do
5378 cat "conftest.in" "conftest.in" >"conftest.tmp"
5379 mv "conftest.tmp" "conftest.in"
5380 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5383 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5386 # Best one so far, save it but keep looking for a better one
5387 ac_cv_path_EGREP="$ac_path_EGREP"
5388 ac_path_EGREP_max=$ac_count
5389 fi
5390 # 10*(2^10) chars as input seems more than enough
5391 test $ac_count -gt 10 && break
5392 done
5393 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5394esac
5395
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 $ac_path_EGREP_found && break 3
5397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005402 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 +00005403 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404else
5405 ac_cv_path_EGREP=$EGREP
5406fi
5407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 fi
5409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5411$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005413
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5416$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005417if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo_n "(cached) " >&6
5419else
5420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005421/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005422#include <stdlib.h>
5423#include <stdarg.h>
5424#include <string.h>
5425#include <float.h>
5426
5427int
5428main ()
5429{
5430
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435if ac_fn_c_try_compile "$LINENO"; then :
5436 ac_cv_header_stdc=yes
5437else
5438 ac_cv_header_stdc=no
5439fi
5440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5441
5442if test $ac_cv_header_stdc = yes; then
5443 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445/* end confdefs.h. */
5446#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005447
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005448_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005451
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005452else
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005455rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
Matthias Kloseb9621712010-04-24 17:59:49 +00005457fi
5458
5459if test $ac_cv_header_stdc = yes; then
5460 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <stdlib.h>
5464
5465_ACEOF
5466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5467 $EGREP "free" >/dev/null 2>&1; then :
5468
5469else
5470 ac_cv_header_stdc=no
5471fi
5472rm -f conftest*
5473
5474fi
5475
5476if test $ac_cv_header_stdc = yes; then
5477 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5478 if test "$cross_compiling" = yes; then :
5479 :
5480else
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#include <ctype.h>
5484#include <stdlib.h>
5485#if ((' ' & 0x0FF) == 0x020)
5486# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5487# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5488#else
5489# define ISLOWER(c) \
5490 (('a' <= (c) && (c) <= 'i') \
5491 || ('j' <= (c) && (c) <= 'r') \
5492 || ('s' <= (c) && (c) <= 'z'))
5493# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5494#endif
5495
5496#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5497int
5498main ()
5499{
5500 int i;
5501 for (i = 0; i < 256; i++)
5502 if (XOR (islower (i), ISLOWER (i))
5503 || toupper (i) != TOUPPER (i))
5504 return 2;
5505 return 0;
5506}
5507_ACEOF
5508if ac_fn_c_try_run "$LINENO"; then :
5509
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5514 conftest.$ac_objext conftest.beam conftest.$ac_ext
5515fi
5516
5517fi
5518fi
5519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5520$as_echo "$ac_cv_header_stdc" >&6; }
5521if test $ac_cv_header_stdc = yes; then
5522
5523$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5524
5525fi
5526
5527# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5528for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5529 inttypes.h stdint.h unistd.h
5530do :
5531 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5532ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5533"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005534if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 cat >>confdefs.h <<_ACEOF
5536#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5537_ACEOF
5538
5539fi
5540
5541done
5542
5543
5544
5545 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 +02005546if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 MINIX=yes
5548else
5549 MINIX=
5550fi
5551
5552
5553 if test "$MINIX" = yes; then
5554
5555$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5556
5557
5558$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5559
5560
5561$as_echo "#define _MINIX 1" >>confdefs.h
5562
5563 fi
5564
5565
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5567$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005568if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 $as_echo_n "(cached) " >&6
5570else
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005574# define __EXTENSIONS__ 1
5575 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005576int
5577main ()
5578{
5579
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584if ac_fn_c_try_compile "$LINENO"; then :
5585 ac_cv_safe_to_define___extensions__=yes
5586else
5587 ac_cv_safe_to_define___extensions__=no
5588fi
5589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5590fi
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5592$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5593 test $ac_cv_safe_to_define___extensions__ = yes &&
5594 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5595
5596 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5597
5598 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5599
5600 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5601
5602 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5603
5604
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605
Xavier de Gaye95750b12016-07-09 11:05:42 +02005606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5607$as_echo_n "checking for the Android API level... " >&6; }
5608cat >> conftest.c <<EOF
5609#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005610android_api = __ANDROID_API__
5611arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612#else
5613#error not Android
5614#endif
5615EOF
5616
5617if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005618 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5619 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5621$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005622 if test -z "$ANDROID_API_LEVEL"; then
5623 echo 'Fatal: you must define __ANDROID_API__'
5624 exit 1
5625 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626
5627cat >>confdefs.h <<_ACEOF
5628#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5629_ACEOF
5630
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5633$as_echo_n "checking for the Android arm ABI... " >&6; }
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5635$as_echo "$_arm_arch" >&6; }
5636 if test "$_arm_arch" = 7; then
5637 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5638 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5639 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005640else
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5642$as_echo "not Android" >&6; }
5643fi
5644rm -f conftest.c conftest.out
5645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646# Check for unsupported systems
5647case $ac_sys_system/$ac_sys_release in
5648atheos*|Linux*/1*)
5649 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5650 echo See README for details.
5651 exit 1;;
5652esac
5653
5654
Matthias Kloseb9621712010-04-24 17:59:49 +00005655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5656$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
5658# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005659if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 withval=$with_suffix;
5661 case $withval in
5662 no) EXEEXT=;;
5663 yes) EXEEXT=.exe;;
5664 *) EXEEXT=$withval;;
5665 esac
5666fi
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5669$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671# Test whether we're running on a non-case-sensitive system, in which
5672# case we give a warning if no ext is given
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5675$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676if test ! -d CaseSensitiveTestDir; then
5677mkdir CaseSensitiveTestDir
5678fi
5679
5680if test -d casesensitivetestdir
5681then
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5683$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 BUILDEXEEXT=.exe
5685else
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 BUILDEXEEXT=$EXEEXT
5689fi
5690rmdir CaseSensitiveTestDir
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692case $ac_sys_system in
5693hp*|HP*)
5694 case $CC in
5695 cc|*/cc) CC="$CC -Ae";;
5696 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697esac
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5701$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702if test -z "$LIBRARY"
5703then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005704 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5707$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709# LDLIBRARY is the name of the library to link against (as opposed to the
5710# name of the library into which to insert object files). BLDLIBRARY is also
5711# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5712# is blank as the main program is not linked directly against LDLIBRARY.
5713# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5714# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5715# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5716# DLLLIBRARY is the shared (i.e., DLL) library.
5717#
5718# RUNSHARED is used to run shared python without installed libraries
5719#
5720# INSTSONAME is the name of the shared library that will be use to install
5721# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005722#
5723# LDVERSION is the shared library version number, normally the Python version
5724# with the ABI build flags appended.
5725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727
5728
5729
5730
5731
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733LDLIBRARY="$LIBRARY"
5734BLDLIBRARY='$(LDLIBRARY)'
5735INSTSONAME='$(LDLIBRARY)'
5736DLLLIBRARY=''
5737LDLIBRARYDIR=''
5738RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005739LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
5741# LINKCC is the command that links the python executable -- default is $(CC).
5742# If CXX is set, and if it is needed to link a main function that was
5743# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5744# python might then depend on the C++ runtime
5745# This is altered for AIX in order to build the export list before
5746# linking.
5747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5749$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750if test -z "$LINKCC"
5751then
5752 LINKCC='$(PURIFY) $(MAINCC)'
5753 case $ac_sys_system in
5754 AIX*)
5755 exp_extra="\"\""
5756 if test $ac_sys_release -ge 5 -o \
5757 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5758 exp_extra="."
5759 fi
5760 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761 QNX*)
5762 # qcc must be used because the other compilers do not
5763 # support -N.
5764 LINKCC=qcc;;
5765 esac
5766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5768$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5771# make sure we default having it set to "no": this is used by
5772# distutils.unixccompiler to know if it should add --enable-new-dtags
5773# to linker command lines, and failing to detect GNU ld simply results
5774# in the same bahaviour as before.
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5777$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_prog=ld
5779if test "$GCC" = yes; then
5780 ac_prog=`$CC -print-prog-name=ld`
5781fi
5782case `"$ac_prog" -V 2>&1 < /dev/null` in
5783 *GNU*)
5784 GNULD=yes;;
5785 *)
5786 GNULD=no;;
5787esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5789$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5792$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005794if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 enableval=$enable_shared;
5796fi
5797
5798
5799if test -z "$enable_shared"
5800then
5801 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005802 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803 enable_shared="yes";;
5804 *)
5805 enable_shared="no";;
5806 esac
5807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5809$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5812$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005815 enableval=$enable_profiling;
5816fi
5817
5818if test "x$enable_profiling" = xyes; then
5819 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005820 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822/* end confdefs.h. */
5823int main() { return 0; }
5824_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005825if ac_fn_c_try_link "$LINENO"; then :
5826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005828 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830rm -f core conftest.err conftest.$ac_objext \
5831 conftest$ac_exeext conftest.$ac_ext
5832 CC="$ac_save_cc"
5833else
5834 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5837$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839if test "x$enable_profiling" = xyes; then
5840 BASECFLAGS="-pg $BASECFLAGS"
5841 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
5843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5845$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
5847# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5848# library that we build, but we do not want to link against it (we
5849# will find it with a -framework option). For this reason there is an
5850# extra variable BLDLIBRARY against which Python and the extension
5851# modules are linked, BLDLIBRARY. This is normally the same as
5852# LDLIBRARY, but empty for MacOSX framework builds.
5853if test "$enable_framework"
5854then
5855 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005856 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 BLDLIBRARY=''
5858else
5859 BLDLIBRARY='$(LDLIBRARY)'
5860fi
5861
5862# Other platforms follow
5863if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005864 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
Matthias Kloseb9621712010-04-24 17:59:49 +00005866$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
5868 case $ac_sys_system in
5869 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005870 LDLIBRARY='libpython$(LDVERSION).dll.a'
5871 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872 ;;
5873 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005874 LDLIBRARY='libpython$(LDVERSION).so'
5875 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005876 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005878 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005879 then
5880 PY3LIBRARY=libpython3.so
5881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005883 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005884 LDLIBRARY='libpython$(LDVERSION).so'
5885 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005886 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005888 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005889 then
5890 PY3LIBRARY=libpython3.so
5891 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ;;
5893 hp*|HP*)
5894 case `uname -m` in
5895 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
5898 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
5901 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005903 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).dylib'
5907 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005908 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005910 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005913 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915 esac
5916else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005917 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 case $ac_sys_system in
5919 CYGWIN*)
5920 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 esac
5924fi
5925
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005926if test "$cross_compiling" = yes; then
5927 RUNSHARED=
5928fi
5929
Matthias Kloseb9621712010-04-24 17:59:49 +00005930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5931$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005934if test -n "$ac_tool_prefix"; then
5935 for ac_prog in ar aal
5936 do
5937 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5938set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5940$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005941if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943else
5944 if test -n "$AR"; then
5945 ac_cv_prog_AR="$AR" # Let the user override the test.
5946else
5947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948for as_dir in $PATH
5949do
5950 IFS=$as_save_IFS
5951 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005952 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005954 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 break 2
5957 fi
5958done
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960IFS=$as_save_IFS
5961
5962fi
5963fi
5964AR=$ac_cv_prog_AR
5965if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5967$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968else
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971fi
5972
5973
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005974 test -n "$AR" && break
5975 done
5976fi
5977if test -z "$AR"; then
5978 ac_ct_AR=$AR
5979 for ac_prog in ar aal
5980do
5981 # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_prog_ac_ct_AR+:} false; then :
5986 $as_echo_n "(cached) " >&6
5987else
5988 if test -n "$ac_ct_AR"; then
5989 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994 IFS=$as_save_IFS
5995 test -z "$as_dir" && as_dir=.
5996 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005998 ac_cv_prog_ac_ct_AR="$ac_prog"
5999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000 break 2
6001 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 done
6004IFS=$as_save_IFS
6005
6006fi
6007fi
6008ac_ct_AR=$ac_cv_prog_ac_ct_AR
6009if test -n "$ac_ct_AR"; then
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6011$as_echo "$ac_ct_AR" >&6; }
6012else
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018 test -n "$ac_ct_AR" && break
6019done
6020
6021 if test "x$ac_ct_AR" = x; then
6022 AR="ar"
6023 else
6024 case $cross_compiling:$ac_tool_warned in
6025yes:)
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6028ac_tool_warned=yes ;;
6029esac
6030 AR=$ac_ct_AR
6031 fi
6032fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033
6034
6035# tweak ARFLAGS only if the user didn't set it on the command line
6036
6037if test -z "$ARFLAGS"
6038then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006039 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040fi
6041
doko@ubuntu.com58844492012-06-30 18:25:32 +02006042if test -n "$ac_tool_prefix"; then
6043 for ac_prog in readelf
6044 do
6045 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if ${ac_cv_prog_READELF+:} false; then :
6050 $as_echo_n "(cached) " >&6
6051else
6052 if test -n "$READELF"; then
6053 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6054else
6055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
6060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006062 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064 break 2
6065 fi
6066done
6067 done
6068IFS=$as_save_IFS
6069
6070fi
6071fi
6072READELF=$ac_cv_prog_READELF
6073if test -n "$READELF"; then
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6075$as_echo "$READELF" >&6; }
6076else
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082 test -n "$READELF" && break
6083 done
6084fi
6085if test -z "$READELF"; then
6086 ac_ct_READELF=$READELF
6087 for ac_prog in readelf
6088do
6089 # Extract the first word of "$ac_prog", so it can be a program name with args.
6090set dummy $ac_prog; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6094 $as_echo_n "(cached) " >&6
6095else
6096 if test -n "$ac_ct_READELF"; then
6097 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6098else
6099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102 IFS=$as_save_IFS
6103 test -z "$as_dir" && as_dir=.
6104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006106 ac_cv_prog_ac_ct_READELF="$ac_prog"
6107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108 break 2
6109 fi
6110done
6111 done
6112IFS=$as_save_IFS
6113
6114fi
6115fi
6116ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6117if test -n "$ac_ct_READELF"; then
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6119$as_echo "$ac_ct_READELF" >&6; }
6120else
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126 test -n "$ac_ct_READELF" && break
6127done
6128
6129 if test "x$ac_ct_READELF" = x; then
6130 READELF=":"
6131 else
6132 case $cross_compiling:$ac_tool_warned in
6133yes:)
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6136ac_tool_warned=yes ;;
6137esac
6138 READELF=$ac_ct_READELF
6139 fi
6140fi
6141
6142if test "$cross_compiling" = yes; then
6143 case "$READELF" in
6144 readelf|:)
6145 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6146 ;;
6147 esac
6148fi
6149
6150
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006153hp*|HP*)
6154 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 if test -z "$INSTALL"
6156 then
6157 INSTALL="${srcdir}/install-sh -c"
6158 fi
6159esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160# Find a good install program. We prefer a C program (faster),
6161# so one script is as good as another. But avoid the broken or
6162# incompatible versions:
6163# SysV /etc/install, /usr/sbin/install
6164# SunOS /usr/etc/install
6165# IRIX /sbin/install
6166# AIX /bin/install
6167# AmigaOS /C/install, which installs bootblocks on floppy discs
6168# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6169# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6170# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6171# OS/2's system install, which has a completely different semantic
6172# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006173# Reject install programs that cannot install multiple files.
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6175$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006177if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179else
6180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
6184 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 # Account for people who put trailing slashes in PATH elements.
6186case $as_dir/ in #((
6187 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 /usr/ucb/* ) ;;
6191 *)
6192 # OSF1 and SCO ODT 3.0 have their own names for install.
6193 # Don't use installbsd from OSF since it installs stuff as root
6194 # by default.
6195 for ac_prog in ginstall scoinst install; do
6196 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006197 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 if test $ac_prog = install &&
6199 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6200 # AIX install. It has an incompatible calling convention.
6201 :
6202 elif test $ac_prog = install &&
6203 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6204 # program-specific install script used by HP pwplus--don't use.
6205 :
6206 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 rm -rf conftest.one conftest.two conftest.dir
6208 echo one > conftest.one
6209 echo two > conftest.two
6210 mkdir conftest.dir
6211 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6212 test -s conftest.one && test -s conftest.two &&
6213 test -s conftest.dir/conftest.one &&
6214 test -s conftest.dir/conftest.two
6215 then
6216 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6217 break 3
6218 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 fi
6220 fi
6221 done
6222 done
6223 ;;
6224esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006225
6226 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227IFS=$as_save_IFS
6228
Matthias Kloseb9621712010-04-24 17:59:49 +00006229rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230
6231fi
6232 if test "${ac_cv_path_install+set}" = set; then
6233 INSTALL=$ac_cv_path_install
6234 else
6235 # As a last resort, use the slow shell script. Don't cache a
6236 # value for INSTALL within a source directory, because that will
6237 # break other packages using the cache if that directory is
6238 # removed, or if the value is a relative name.
6239 INSTALL=$ac_install_sh
6240 fi
6241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6243$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244
6245# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6246# It thinks the first close brace ends the variable substitution.
6247test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6248
6249test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6250
6251test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6252
Matthias Klose93a0ef12012-03-15 18:08:34 +01006253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6254$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6255if test -z "$MKDIR_P"; then
6256 if ${ac_cv_path_mkdir+:} false; then :
6257 $as_echo_n "(cached) " >&6
6258else
6259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6261do
6262 IFS=$as_save_IFS
6263 test -z "$as_dir" && as_dir=.
6264 for ac_prog in mkdir gmkdir; do
6265 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006266 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006267 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6268 'mkdir (GNU coreutils) '* | \
6269 'mkdir (coreutils) '* | \
6270 'mkdir (fileutils) '4.1*)
6271 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6272 break 3;;
6273 esac
6274 done
6275 done
6276 done
6277IFS=$as_save_IFS
6278
6279fi
6280
6281 test -d ./--version && rmdir ./--version
6282 if test "${ac_cv_path_mkdir+set}" = set; then
6283 MKDIR_P="$ac_cv_path_mkdir -p"
6284 else
6285 # As a last resort, use the slow shell script. Don't cache a
6286 # value for MKDIR_P within a source directory, because that will
6287 # break other packages using the cache if that directory is
6288 # removed, or if the value is a relative name.
6289 MKDIR_P="$ac_install_sh -d"
6290 fi
6291fi
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6293$as_echo "$MKDIR_P" >&6; }
6294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
6296# Not every filesystem supports hard links
6297
6298if test -z "$LN" ; then
6299 case $ac_sys_system in
6300 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301 *) LN=ln;;
6302 esac
6303fi
6304
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006305# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006306
6307ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6311$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312
6313# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006314if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 withval=$with_pydebug;
6316if test "$withval" != no
6317then
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6322$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006324 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006325else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327fi
6328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331fi
6332
6333
T. Woutersddbfa2c2017-05-23 01:30:49 +02006334# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6335# the ABI. This allows enabling assertions without changing the ABI.
6336assertions='false'
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6338$as_echo_n "checking for --with-assertions... " >&6; }
6339
6340# Check whether --with-assertions was given.
6341if test "${with_assertions+set}" = set; then :
6342 withval=$with_assertions;
6343if test "$withval" != no
6344then
6345 assertions='true'
6346fi
6347fi
6348
6349if test "$assertions" = 'true'; then
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6351$as_echo "yes" >&6; }
6352elif test "$Py_DEBUG" = 'true'; then
6353 assertions='true'
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6355$as_echo "implied by --with-pydebug" >&6; }
6356else
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358$as_echo "no" >&6; }
6359fi
6360
Brett Cannon63d98bc2016-09-06 17:12:40 -07006361# Enable optimization flags
6362
6363
6364Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6366$as_echo_n "checking for --enable-optimizations... " >&6; }
6367# Check whether --enable-optimizations was given.
6368if test "${enable_optimizations+set}" = set; then :
6369 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006370if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006371then
6372 Py_OPT='true'
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6374$as_echo "yes" >&6; };
6375else
6376 Py_OPT='false'
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; };
6379fi
6380else
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }
6383fi
6384
6385if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006386 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6387 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006388 # 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 +00006389 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006390 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006391 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006392 DEF_MAKE_RULE="build_all"
6393else
6394 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006395 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006396 DEF_MAKE_RULE="all"
6397fi
6398
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006399# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6400# normal names in the default $PATH (ie: Ubuntu). They exist under the
6401# non-suffixed name in their versioned llvm directory.
6402
6403llvm_bin_dir=''
6404llvm_path="${PATH}"
6405if test "${CC}" = "clang"
6406then
6407 clang_bin=`which clang`
6408 # Some systems install clang elsewhere as a symlink to the real path
6409 # which is where the related llvm tools are located.
6410 if test -L "${clang_bin}"
6411 then
6412 clang_dir=`dirname "${clang_bin}"`
6413 clang_bin=`readlink "${clang_bin}"`
6414 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6415 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6416 fi
6417fi
6418
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006419# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6421$as_echo_n "checking for --with-lto... " >&6; }
6422
6423# Check whether --with-lto was given.
6424if test "${with_lto+set}" = set; then :
6425 withval=$with_lto;
6426if test "$withval" != no
6427then
6428 Py_LTO='true'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6430$as_echo "yes" >&6; };
6431else
6432 Py_LTO='false'
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; };
6435fi
6436else
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441if test "$Py_LTO" = 'true' ; then
6442 case $CC in
6443 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006444
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006446$as_echo_n "checking target system type... " >&6; }
6447if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006448 $as_echo_n "(cached) " >&6
6449else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006450 if test "x$target_alias" = x; then
6451 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006452else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006453 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6454 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6455fi
6456
6457fi
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6459$as_echo "$ac_cv_target" >&6; }
6460case $ac_cv_target in
6461*-*-*) ;;
6462*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6463esac
6464target=$ac_cv_target
6465ac_save_IFS=$IFS; IFS='-'
6466set x $ac_cv_target
6467shift
6468target_cpu=$1
6469target_vendor=$2
6470shift; shift
6471# Remember, the first character of IFS is used to create $*,
6472# except with old shells:
6473target_os=$*
6474IFS=$ac_save_IFS
6475case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6476
6477
6478# The aliases save the names the user supplied, while $host etc.
6479# will get canonicalized.
6480test -n "$target_alias" &&
6481 test "$program_prefix$program_suffix$program_transform_name" = \
6482 NONENONEs,x,x, &&
6483 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006484# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6485set dummy $target_alias-llvm-ar; ac_word=$2
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6487$as_echo_n "checking for $ac_word... " >&6; }
6488if ${ac_cv_path_LLVM_AR+:} false; then :
6489 $as_echo_n "(cached) " >&6
6490else
6491 case $LLVM_AR in
6492 [\\/]* | ?:[\\/]*)
6493 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6494 ;;
6495 *)
6496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6497for as_dir in ${llvm_path}
6498do
6499 IFS=$as_save_IFS
6500 test -z "$as_dir" && as_dir=.
6501 for ac_exec_ext in '' $ac_executable_extensions; do
6502 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6503 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6505 break 2
6506 fi
6507done
6508 done
6509IFS=$as_save_IFS
6510
6511 ;;
6512esac
6513fi
6514LLVM_AR=$ac_cv_path_LLVM_AR
6515if test -n "$LLVM_AR"; then
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6517$as_echo "$LLVM_AR" >&6; }
6518else
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520$as_echo "no" >&6; }
6521fi
6522
6523
6524if test -z "$ac_cv_path_LLVM_AR"; then
6525 if test "$build" = "$target"; then
6526 ac_pt_LLVM_AR=$LLVM_AR
6527 # Extract the first word of "llvm-ar", so it can be a program name with args.
6528set dummy llvm-ar; ac_word=$2
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530$as_echo_n "checking for $ac_word... " >&6; }
6531if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533else
6534 case $ac_pt_LLVM_AR in
6535 [\\/]* | ?:[\\/]*)
6536 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6537 ;;
6538 *)
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540for as_dir in ${llvm_path}
6541do
6542 IFS=$as_save_IFS
6543 test -z "$as_dir" && as_dir=.
6544 for ac_exec_ext in '' $ac_executable_extensions; do
6545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6546 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6548 break 2
6549 fi
6550done
6551 done
6552IFS=$as_save_IFS
6553
6554 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6555 ;;
6556esac
6557fi
6558ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6559if test -n "$ac_pt_LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6561$as_echo "$ac_pt_LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567 LLVM_AR=$ac_pt_LLVM_AR
6568 else
6569 LLVM_AR="''"
6570 fi
6571else
6572 LLVM_AR="$ac_cv_path_LLVM_AR"
6573fi
6574
6575
6576 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6577 then
6578 LLVM_AR_FOUND="found"
6579 else
6580 LLVM_AR_FOUND="not-found"
6581 fi
6582 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6583 then
6584 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6585 if test -n "${found_llvm_ar}"
6586 then
6587 LLVM_AR='/usr/bin/xcrun llvm-ar'
6588 LLVM_AR_FOUND=found
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6590$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6591 fi
6592 fi
6593 if test $LLVM_AR_FOUND = not-found
6594 then
6595 LLVM_PROFR_ERR=yes
6596 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6597 else
6598 LLVM_AR_ERR=no
6599 fi
6600 AR="${LLVM_AR}"
6601 case $ac_sys_system in
6602 Darwin*)
6603 # Any changes made here should be reflected in the GCC+Darwin case below
6604 LTOFLAGS="-flto -Wl,-export_dynamic"
6605 ;;
6606 *)
6607 LTOFLAGS="-flto"
6608 ;;
6609 esac
6610 ;;
6611 *gcc*)
6612 case $ac_sys_system in
6613 Darwin*)
6614 LTOFLAGS="-flto -Wl,-export_dynamic"
6615 ;;
6616 *)
6617 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6618 ;;
6619 esac
6620 ;;
6621 esac
6622
6623 if test "$ac_cv_prog_cc_g" = "yes"
6624 then
6625 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6626 # to get debug symbols.
6627 LTOFLAGS="$LTOFLAGS -g"
6628 fi
6629
stratakisf92c7aa2018-12-04 15:54:01 +01006630 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006631 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006632fi
6633
6634# Enable PGO flags.
6635
6636
6637
6638
6639
6640
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6642set dummy $target_alias-llvm-profdata; ac_word=$2
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644$as_echo_n "checking for $ac_word... " >&6; }
6645if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6646 $as_echo_n "(cached) " >&6
6647else
6648 case $LLVM_PROFDATA in
6649 [\\/]* | ?:[\\/]*)
6650 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6651 ;;
6652 *)
6653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655do
6656 IFS=$as_save_IFS
6657 test -z "$as_dir" && as_dir=.
6658 for ac_exec_ext in '' $ac_executable_extensions; do
6659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6662 break 2
6663 fi
6664done
6665 done
6666IFS=$as_save_IFS
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668 ;;
6669esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006670fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006671LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6672if test -n "$LLVM_PROFDATA"; then
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6674$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675else
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677$as_echo "no" >&6; }
6678fi
6679
6680
Gregory P. Smith799520c2016-09-07 16:10:00 -07006681if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6682 if test "$build" = "$target"; then
6683 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6684 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6685set dummy llvm-profdata; ac_word=$2
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6687$as_echo_n "checking for $ac_word... " >&6; }
6688if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6689 $as_echo_n "(cached) " >&6
6690else
6691 case $ac_pt_LLVM_PROFDATA in
6692 [\\/]* | ?:[\\/]*)
6693 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6694 ;;
6695 *)
6696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697for as_dir in ${llvm_path}
6698do
6699 IFS=$as_save_IFS
6700 test -z "$as_dir" && as_dir=.
6701 for ac_exec_ext in '' $ac_executable_extensions; do
6702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6703 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6705 break 2
6706 fi
6707done
6708 done
6709IFS=$as_save_IFS
6710
6711 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6712 ;;
6713esac
6714fi
6715ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6716if test -n "$ac_pt_LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6718$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6725 else
6726 LLVM_PROFDATA="''"
6727 fi
6728else
6729 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6730fi
6731
6732
6733if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6734then
6735 LLVM_PROF_FOUND="found"
6736else
6737 LLVM_PROF_FOUND="not-found"
6738fi
6739if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6740then
6741 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6742 if test -n "${found_llvm_profdata}"
6743 then
6744 # llvm-profdata isn't directly in $PATH in some cases.
6745 # https://apple.stackexchange.com/questions/197053/
6746 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6747 LLVM_PROF_FOUND=found
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6749$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6750 fi
6751fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752LLVM_PROF_ERR=no
6753case $CC in
6754 *clang*)
6755 # Any changes made here should be reflected in the GCC+Darwin case below
6756 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6757 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006758 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006759 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6760 if test $LLVM_PROF_FOUND = not-found
6761 then
6762 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 if test "${REQUIRE_PGO}" = "yes"
6764 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006765 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 -07006766 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006767 fi
6768 ;;
6769 *gcc*)
6770 case $ac_sys_system in
6771 Darwin*)
6772 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006775 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 then
6778 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006779 if test "${REQUIRE_PGO}" = "yes"
6780 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006781 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 -07006782 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006783 fi
6784 ;;
6785 *)
6786 PGO_PROF_GEN_FLAG="-fprofile-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6788 LLVM_PROF_MERGER="true"
6789 LLVM_PROF_FILE=""
6790 ;;
6791 esac
6792 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006793 *icc*)
6794 PGO_PROF_GEN_FLAG="-prof-gen"
6795 PGO_PROF_USE_FLAG="-prof-use"
6796 LLVM_PROF_MERGER="true"
6797 LLVM_PROF_FILE=""
6798 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006799esac
6800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6802# merged with this chunk of code?
6803
6804# Optimizer/debugger flags
6805# ------------------------
6806# (The following bit of code is complicated enough - please keep things
6807# indented properly. Just pretend you're editing Python code. ;-)
6808
6809# There are two parallel sets of case statements below, one that checks to
6810# see if OPT was set and one that does BASECFLAGS setting based upon
6811# compiler and platform. BASECFLAGS tweaks need to be made even if the
6812# user set OPT.
6813
6814# tweak OPT based on compiler and platform, only if the user didn't set
6815# it on the command line
6816
Victor Stinner9ed34a82017-05-02 22:35:58 +02006817
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006818if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819then
6820 case $GCC in
6821 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6823 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6824 WRAP="-fwrapv"
6825 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006826
Stefan Krahaf04ff22011-12-08 22:20:31 +01006827 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006828 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006829 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006830 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006831 *)
6832 if $CC --version 2>&1 | grep -q clang
6833 then
6834 cc_is_clang=1
6835 else
6836 cc_is_clang=
6837 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006838 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006839
Victor Stinner35f3d242017-04-21 12:35:24 +02006840 if test -n "${cc_is_clang}"
6841 then
6842 # Clang also needs -fwrapv
6843 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006844 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6845 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006846 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006847 fi
6848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 case $ac_cv_prog_cc_g in
6850 yes)
6851 if test "$Py_DEBUG" = 'true' ; then
6852 # Optimization messes up debuggers, so turn it off for
6853 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006854 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006855 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006856 else
Victor Stinner28205b22017-04-21 11:24:34 +02006857 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006858 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 else
Victor Stinner28205b22017-04-21 11:24:34 +02006860 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 fi
6862 ;;
6863 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006864 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865 ;;
6866 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 case $ac_sys_system in
6869 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6870 ;;
6871 esac
6872 ;;
6873
6874 *)
6875 OPT="-O"
6876 ;;
6877 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878fi
6879
6880
6881
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006882
stratakiscf10a752018-12-19 18:19:01 +01006883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884# The -arch flags for universal builds on OSX
6885UNIVERSAL_ARCH_FLAGS=
6886
6887
6888# tweak BASECFLAGS based on compiler and platform
6889case $GCC in
6890yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006891 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006892
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6894$as_echo_n "checking for -Wextra... " >&6; }
6895 ac_save_cc="$CC"
6896 CC="$CC -Wextra -Werror"
6897 if ${ac_cv_extra_warnings+:} false; then :
6898 $as_echo_n "(cached) " >&6
6899else
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901/* end confdefs.h. */
6902
6903
6904int
6905main ()
6906{
6907
6908 ;
6909 return 0;
6910}
6911
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"; then :
6914
6915 ac_cv_extra_warnings=yes
6916
6917else
6918
6919 ac_cv_extra_warnings=no
6920
6921fi
6922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923fi
6924
6925 CC="$ac_save_cc"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6927$as_echo "$ac_cv_extra_warnings" >&6; }
6928
6929 if test $ac_cv_extra_warnings = yes
6930 then
6931 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6932 fi
6933
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006934 # Python doesn't violate C99 aliasing rules, but older versions of
6935 # GCC produce warnings for legal Python code. Enable
6936 # -fno-strict-aliasing on versions of GCC that support but produce
6937 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6939$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940 ac_save_cc="$CC"
6941 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006942 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006943 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006945else
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006948
Matthias Kloseb159a552010-04-25 21:00:44 +00006949
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006950int
6951main ()
6952{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006953
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006954 ;
6955 return 0;
6956}
Matthias Kloseb159a552010-04-25 21:00:44 +00006957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006959if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006960
6961 CC="$ac_save_cc -fstrict-aliasing"
6962 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964/* end confdefs.h. */
6965
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006966 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006967int
6968main ()
6969{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006970double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971 ;
6972 return 0;
6973}
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006976if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
6978 ac_cv_no_strict_aliasing=no
6979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980else
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 ac_cv_no_strict_aliasing=yes
6983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006987else
Matthias Kloseb159a552010-04-25 21:00:44 +00006988
6989 ac_cv_no_strict_aliasing=no
6990
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006993fi
6994
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6998$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 then
7001 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7002 fi
7003
Zachary Ware5af85642015-12-21 12:09:17 -06007004 # ICC doesn't recognize the option, but only emits a warning
7005 ## XXX does it emit an unused result warning and can it be disabled?
7006 case "$CC" in
7007 *icc*)
7008 ac_cv_disable_unused_result_warning=no
7009 ;;
7010 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7012$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7013 ac_save_cc="$CC"
7014 CC="$CC -Wunused-result -Werror"
7015 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007016 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_disable_unused_result_warning=yes
7035
7036else
7037
7038 ac_cv_disable_unused_result_warning=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CFLAGS="$save_CFLAGS"
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7047$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007048 ;;
7049 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007050
7051 if test $ac_cv_disable_unused_result_warning = yes
7052 then
7053 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007054 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7055 fi
7056
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7058$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7059 ac_save_cc="$CC"
7060 CC="$CC -Wunused-parameter -Werror"
7061 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7062 $as_echo_n "(cached) " >&6
7063else
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065/* end confdefs.h. */
7066
7067
7068int
7069main ()
7070{
7071
7072 ;
7073 return 0;
7074}
7075
7076_ACEOF
7077if ac_fn_c_try_compile "$LINENO"; then :
7078
7079 ac_cv_disable_unused_parameter_warning=yes
7080
7081else
7082
7083 ac_cv_disable_unused_parameter_warning=no
7084
7085fi
7086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7087fi
7088
7089 CC="$ac_save_cc"
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7091$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7092
7093 if test $ac_cv_disable_unused_parameter_warning = yes
7094 then
7095 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7096 fi
7097
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7099$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7100 ac_save_cc="$CC"
7101 CC="$CC -Wmissing-field-initializers -Werror"
7102 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7103 $as_echo_n "(cached) " >&6
7104else
7105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7106/* end confdefs.h. */
7107
7108
7109int
7110main ()
7111{
7112
7113 ;
7114 return 0;
7115}
7116
7117_ACEOF
7118if ac_fn_c_try_compile "$LINENO"; then :
7119
7120 ac_cv_disable_missing_field_initializers=yes
7121
7122else
7123
7124 ac_cv_disable_missing_field_initializers=no
7125
7126fi
7127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7128fi
7129
7130 CC="$ac_save_cc"
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7132$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7133
7134 if test $ac_cv_disable_missing_field_initializers = yes
7135 then
7136 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007137 fi
7138
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7140$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7141 ac_save_cc="$CC"
7142 CC="$CC -Wsign-compare"
7143 save_CFLAGS="$CFLAGS"
7144 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7145 $as_echo_n "(cached) " >&6
7146else
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148/* end confdefs.h. */
7149
7150
7151int
7152main ()
7153{
7154
7155 ;
7156 return 0;
7157}
7158
7159_ACEOF
7160if ac_fn_c_try_compile "$LINENO"; then :
7161
7162 ac_cv_enable_sign_compare_warning=yes
7163
7164else
7165
7166 ac_cv_enable_sign_compare_warning=no
7167
7168fi
7169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7170fi
7171
7172 CFLAGS="$save_CFLAGS"
7173 CC="$ac_save_cc"
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7175$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7176
7177 if test $ac_cv_enable_sign_compare_warning = yes
7178 then
7179 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7180 fi
7181
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7183$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7184 ac_save_cc="$CC"
7185 CC="$CC -Wunreachable-code"
7186 save_CFLAGS="$CFLAGS"
7187 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192
7193
7194int
7195main ()
7196{
7197
7198 ;
7199 return 0;
7200}
7201
7202_ACEOF
7203if ac_fn_c_try_compile "$LINENO"; then :
7204
7205 ac_cv_enable_unreachable_code_warning=yes
7206
7207else
7208
7209 ac_cv_enable_unreachable_code_warning=no
7210
7211fi
7212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213fi
7214
7215 CFLAGS="$save_CFLAGS"
7216 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217
7218 # Don't enable unreachable code warning in debug mode, since it usually
7219 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007220 # Issue #24324: Unfortunately, the unreachable code warning does not work
7221 # correctly on gcc and has been silently removed from the compiler.
7222 # It is supported on clang but on OS X systems gcc may be an alias
7223 # for clang. Try to determine if the compiler is not really gcc and,
7224 # if so, only then enable the warning.
7225 if test $ac_cv_enable_unreachable_code_warning = yes && \
7226 test "$Py_DEBUG" != "true" && \
7227 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007228 then
7229 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007230 else
7231 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007232 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7234$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007235
INADA Naokie3364842018-06-05 20:40:53 +09007236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7237$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7238 ac_save_cc="$CC"
7239 CC="$CC -Werror -Wstrict-prototypes"
7240 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7241 $as_echo_n "(cached) " >&6
7242else
7243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7244/* end confdefs.h. */
7245
7246
7247int
7248main ()
7249{
7250
7251 ;
7252 return 0;
7253}
7254
7255_ACEOF
7256if ac_fn_c_try_compile "$LINENO"; then :
7257
7258 ac_cv_enable_strict_prototypes_warning=yes
7259
7260else
7261
7262 ac_cv_enable_strict_prototypes_warning=no
7263
7264fi
7265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7266fi
7267
7268 CC="$ac_save_cc"
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7270$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7271
7272 if test $ac_cv_enable_strict_prototypes_warning = yes
7273 then
7274 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7275 fi
7276
Victor Stinner193ee0a2017-02-06 14:24:00 +01007277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7278$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7279 ac_save_cc="$CC"
7280 CC="$CC -Werror=implicit-function-declaration"
7281 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7282 $as_echo_n "(cached) " >&6
7283else
7284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285/* end confdefs.h. */
7286
7287
7288int
7289main ()
7290{
7291
7292 ;
7293 return 0;
7294}
7295
7296_ACEOF
7297if ac_fn_c_try_compile "$LINENO"; then :
7298
7299 ac_cv_enable_implicit_function_declaration_error=yes
7300
7301else
7302
7303 ac_cv_enable_implicit_function_declaration_error=no
7304
7305fi
7306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7307fi
7308
7309 CC="$ac_save_cc"
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7311$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7312
7313 if test $ac_cv_enable_implicit_function_declaration_error = yes
7314 then
7315 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7316 fi
7317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7319 # support. Without this, treatment of subnormals doesn't follow
7320 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007321 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 alpha*)
7323 BASECFLAGS="$BASECFLAGS -mieee"
7324 ;;
7325 esac
7326
7327 case $ac_sys_system in
7328 SCO_SV*)
7329 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7330 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 Darwin*)
7333 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7334 # used to be here, but non-Apple gcc doesn't accept them.
7335 if test "${CC}" = gcc
7336 then
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007338$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 case "${UNIVERSALSDK}" in
7340 */MacOSX10.4u.sdk)
7341 # Build using 10.4 SDK, force usage of gcc when the
7342 # compiler is gcc, otherwise the user will get very
7343 # confusing error messages when building on OSX 10.6
7344 CC=gcc-4.0
7345 CPP=cpp-4.0
7346 ;;
7347 esac
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007349$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351
Ned Deily87adb6e2013-10-18 21:09:56 -07007352 if test "${enable_universalsdk}"
7353 then
7354 case "$UNIVERSAL_ARCHS" in
7355 32-bit)
7356 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7357 LIPO_32BIT_FLAGS=""
7358 ARCH_RUN_32BIT=""
7359 ;;
7360 64-bit)
7361 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7362 LIPO_32BIT_FLAGS=""
7363 ARCH_RUN_32BIT="true"
7364 ;;
7365 all)
7366 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7367 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7368 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7369 ;;
7370 intel)
7371 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7372 LIPO_32BIT_FLAGS="-extract i386"
7373 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7374 ;;
7375 intel-32)
7376 UNIVERSAL_ARCH_FLAGS="-arch i386"
7377 LIPO_32BIT_FLAGS=""
7378 ARCH_RUN_32BIT=""
7379 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007380 intel-64)
7381 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7382 LIPO_32BIT_FLAGS=""
7383 ARCH_RUN_32BIT="true"
7384 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007385 3-way)
7386 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7387 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7388 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7389 ;;
7390 *)
7391 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7392 ;;
7393 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 if test "${UNIVERSALSDK}" != "/"
7396 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007397 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7398 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007400 else
7401 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7402 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007403 fi
7404 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 # Calculate an appropriate deployment target for this build:
7407 # The deployment target value is used explicitly to enable certain
7408 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007409 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007410 # component of the string returned by distutils.get_platform().
7411 #
7412 # Use the value from:
7413 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7414 # 2. the operating system version of the build machine if >= 10.6
7415 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7416 # below to pick either 10.3, 10.4, or 10.5 as the target.
7417 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7420$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007421 cur_target_major=`sw_vers -productVersion | \
7422 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7423 cur_target_minor=`sw_vers -productVersion | \
7424 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7425 cur_target="${cur_target_major}.${cur_target_minor}"
7426 if test ${cur_target_major} -eq 10 && \
7427 test ${cur_target_minor} -ge 3 && \
7428 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 then
Ned Deily36820b62014-06-25 13:44:22 -07007430 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 cur_target=10.3
7432 if test ${enable_universalsdk}
7433 then
7434 case "$UNIVERSAL_ARCHS" in
7435 all|3-way|intel|64-bit)
7436 # These configurations were first supported in 10.5
7437 cur_target='10.5'
7438 ;;
7439 esac
7440 else
7441 if test `/usr/bin/arch` = "i386"
7442 then
7443 # 10.4 was the first release to support Intel archs
7444 cur_target="10.4"
7445 fi
7446 fi
7447 fi
7448 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7451 # environment with a value that is the same as what we'll use
7452 # in the Makefile to ensure that we'll get the same compiler
7453 # environment during configure and build time.
7454 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7455 export MACOSX_DEPLOYMENT_TARGET
7456 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7458$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007459
Ned Deily87adb6e2013-10-18 21:09:56 -07007460 # end of Darwin* tests
7461 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462 esac
7463 ;;
7464
7465*)
7466 case $ac_sys_system in
7467 OpenUNIX*|UnixWare*)
7468 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7469 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470 SCO_SV*)
7471 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7472 ;;
7473 esac
7474 ;;
7475esac
7476
Zachary Ware5af85642015-12-21 12:09:17 -06007477# ICC needs -fp-model strict or floats behave badly
7478case "$CC" in
7479*icc*)
7480 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7481 ;;
7482esac
7483
T. Woutersddbfa2c2017-05-23 01:30:49 +02007484if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485 :
7486else
7487 OPT="-DNDEBUG $OPT"
7488fi
7489
7490if test "$ac_arch_flags"
7491then
7492 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7493fi
7494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495# On some compilers, pthreads are available without further options
7496# (e.g. MacOS X). On some of these systems, the compiler will not
7497# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7498# So we have to see first whether pthreads are available without
7499# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7501$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007502if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 ac_cv_pthread_is_default=no
7507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509/* end confdefs.h. */
7510
Stefan Krah7dba5942012-11-22 22:49:11 +01007511#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512#include <pthread.h>
7513
7514void* routine(void* p){return NULL;}
7515
7516int main(){
7517 pthread_t p;
7518 if(pthread_create(&p,NULL,routine,NULL)!=0)
7519 return 1;
7520 (void)pthread_detach(p);
7521 return 0;
7522}
7523
7524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526
7527 ac_cv_pthread_is_default=yes
7528 ac_cv_kthread=no
7529 ac_cv_pthread=no
7530
7531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539fi
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7542$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543
7544
7545if test $ac_cv_pthread_is_default = yes
7546then
7547 ac_cv_kpthread=no
7548else
7549# -Kpthread, if available, provides the right #defines
7550# and linker options to make pthread_create available
7551# Some compilers won't report that they do not support -Kpthread,
7552# so we need to run a program to see whether it really made the
7553# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7555$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558else
7559 ac_save_cc="$CC"
7560CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562 ac_cv_kpthread=no
7563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565/* end confdefs.h. */
7566
Stefan Krah7dba5942012-11-22 22:49:11 +01007567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568#include <pthread.h>
7569
7570void* routine(void* p){return NULL;}
7571
7572int main(){
7573 pthread_t p;
7574 if(pthread_create(&p,NULL,routine,NULL)!=0)
7575 return 1;
7576 (void)pthread_detach(p);
7577 return 0;
7578}
7579
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582 ac_cv_kpthread=yes
7583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590CC="$ac_save_cc"
7591fi
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7594$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596
7597if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7598then
7599# -Kthread, if available, provides the right #defines
7600# and linker options to make pthread_create available
7601# Some compilers won't report that they do not support -Kthread,
7602# so we need to run a program to see whether it really made the
7603# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7605$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608else
7609 ac_save_cc="$CC"
7610CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007611if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612 ac_cv_kthread=no
7613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615/* end confdefs.h. */
7616
Stefan Krah7dba5942012-11-22 22:49:11 +01007617#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618#include <pthread.h>
7619
7620void* routine(void* p){return NULL;}
7621
7622int main(){
7623 pthread_t p;
7624 if(pthread_create(&p,NULL,routine,NULL)!=0)
7625 return 1;
7626 (void)pthread_detach(p);
7627 return 0;
7628}
7629
7630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632 ac_cv_kthread=yes
7633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640CC="$ac_save_cc"
7641fi
7642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7644$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645fi
7646
7647if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7648then
7649# -pthread, if available, provides the right #defines
7650# and linker options to make pthread_create available
7651# Some compilers won't report that they do not support -pthread,
7652# so we need to run a program to see whether it really made the
7653# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7655$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007656if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658else
7659 ac_save_cc="$CC"
7660CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007661if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662 ac_cv_pthread=no
7663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665/* end confdefs.h. */
7666
Stefan Krah7dba5942012-11-22 22:49:11 +01007667#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668#include <pthread.h>
7669
7670void* routine(void* p){return NULL;}
7671
7672int main(){
7673 pthread_t p;
7674 if(pthread_create(&p,NULL,routine,NULL)!=0)
7675 return 1;
7676 (void)pthread_detach(p);
7677 return 0;
7678}
7679
7680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007681if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682 ac_cv_pthread=yes
7683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688fi
7689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690CC="$ac_save_cc"
7691fi
7692
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7694$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695fi
7696
7697# If we have set a CC compiler flag for thread support then
7698# check if it works for CXX, too.
7699ac_cv_cxx_thread=no
7700if test ! -z "$CXX"
7701then
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7703$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704ac_save_cxx="$CXX"
7705
7706if test "$ac_cv_kpthread" = "yes"
7707then
7708 CXX="$CXX -Kpthread"
7709 ac_cv_cxx_thread=yes
7710elif test "$ac_cv_kthread" = "yes"
7711then
7712 CXX="$CXX -Kthread"
7713 ac_cv_cxx_thread=yes
7714elif test "$ac_cv_pthread" = "yes"
7715then
7716 CXX="$CXX -pthread"
7717 ac_cv_cxx_thread=yes
7718fi
7719
7720if test $ac_cv_cxx_thread = yes
7721then
7722 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7723 $CXX -c conftest.$ac_ext 2>&5
7724 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7725 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7726 then
7727 ac_cv_cxx_thread=yes
7728 else
7729 ac_cv_cxx_thread=no
7730 fi
7731 rm -fr conftest*
7732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7734$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735fi
7736CXX="$ac_save_cxx"
7737
7738
7739# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7741$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007742if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746/* end confdefs.h. */
7747#include <stdlib.h>
7748#include <stdarg.h>
7749#include <string.h>
7750#include <float.h>
7751
7752int
7753main ()
7754{
7755
7756 ;
7757 return 0;
7758}
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_header_stdc=yes
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7766
7767if test $ac_cv_header_stdc = yes; then
7768 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770/* end confdefs.h. */
7771#include <string.h>
7772
7773_ACEOF
7774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 $EGREP "memchr" >/dev/null 2>&1; then :
7776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777else
7778 ac_cv_header_stdc=no
7779fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007780rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781
7782fi
7783
7784if test $ac_cv_header_stdc = yes; then
7785 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787/* end confdefs.h. */
7788#include <stdlib.h>
7789
7790_ACEOF
7791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $EGREP "free" >/dev/null 2>&1; then :
7793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794else
7795 ac_cv_header_stdc=no
7796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007797rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798
7799fi
7800
7801if test $ac_cv_header_stdc = yes; then
7802 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804 :
7805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807/* end confdefs.h. */
7808#include <ctype.h>
7809#include <stdlib.h>
7810#if ((' ' & 0x0FF) == 0x020)
7811# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7812# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7813#else
7814# define ISLOWER(c) \
7815 (('a' <= (c) && (c) <= 'i') \
7816 || ('j' <= (c) && (c) <= 'r') \
7817 || ('s' <= (c) && (c) <= 'z'))
7818# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7819#endif
7820
7821#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7822int
7823main ()
7824{
7825 int i;
7826 for (i = 0; i < 256; i++)
7827 if (XOR (islower (i), ISLOWER (i))
7828 || toupper (i) != TOUPPER (i))
7829 return 2;
7830 return 0;
7831}
7832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007833if ac_fn_c_try_run "$LINENO"; then :
7834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840fi
7841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842fi
7843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7845$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846if test $ac_cv_header_stdc = yes; then
7847
Matthias Kloseb9621712010-04-24 17:59:49 +00007848$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849
7850fi
7851
stratakise768c862018-01-23 16:11:24 +01007852for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007853fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007854ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007855sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007856utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007857poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007858sys/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 +01007859sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007860sys/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 +01007861sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007862sys/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 -07007863libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007864linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007865sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007866do :
7867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7868ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007869if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007871#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007872_ACEOF
7873
7874fi
7875
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876done
7877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007878ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007879for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7882$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007887/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007888#include <sys/types.h>
7889#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
7894if ((DIR *) 0)
7895return 0;
7896 ;
7897 return 0;
7898}
7899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907eval ac_res=\$$as_ac_Header
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7909$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007910if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007911 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007912#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007913_ACEOF
7914
7915ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918done
7919# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7920if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7922$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930/* Override any GCC internal prototype to avoid an error.
7931 Use char because int might match the return type of a GCC
7932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933#ifdef __cplusplus
7934extern "C"
7935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007936char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
7944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945for ac_lib in '' dir; do
7946 if test -z "$ac_lib"; then
7947 ac_res="none required"
7948 else
7949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955rm -f core conftest.err conftest.$ac_objext \
7956 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007957 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960done
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963else
7964 ac_cv_search_opendir=no
7965fi
7966rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007967LIBS=$ac_func_search_save_LIBS
7968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7970$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Michael W. Hudson54241132001-12-07 15:38:26 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7979$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007980if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007982else
7983 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987/* Override any GCC internal prototype to avoid an error.
7988 Use char because int might match the return type of a GCC
7989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990#ifdef __cplusplus
7991extern "C"
7992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007993char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007994int
7995main ()
7996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ;
7999 return 0;
8000}
8001_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002for ac_lib in '' x; do
8003 if test -z "$ac_lib"; then
8004 ac_res="none required"
8005 else
8006 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008007 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012rm -f core conftest.err conftest.$ac_objext \
8013 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008014 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017done
Victor Stinnere0be4232011-10-25 13:06:09 +02008018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020else
8021 ac_cv_search_opendir=no
8022fi
8023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008024LIBS=$ac_func_search_save_LIBS
8025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8027$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008029if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032fi
8033
8034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8037$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008040else
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008042/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008043#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008044int
8045main ()
8046{
8047return makedev(0, 0);
8048 ;
8049 return 0;
8050}
8051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008053 ac_cv_header_sys_types_h_makedev=yes
8054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057rm -f core conftest.err conftest.$ac_objext \
8058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008059
8060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8062$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008063
8064if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008065ac_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 +02008066if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008067
Matthias Kloseb9621712010-04-24 17:59:49 +00008068$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008069
8070fi
8071
8072
8073
8074 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 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 +02008076if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008077
Matthias Kloseb9621712010-04-24 17:59:49 +00008078$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008079
8080fi
8081
8082
8083 fi
8084fi
8085
Michael W. Hudson54241132001-12-07 15:38:26 +00008086
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008087# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8088# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8089SAVE_CFLAGS=$CFLAGS
8090CFLAGS="-std=c99 $CFLAGS"
8091for ac_header in bluetooth/bluetooth.h
8092do :
8093 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8094if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8095 cat >>confdefs.h <<_ACEOF
8096#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8097_ACEOF
8098
8099fi
8100
8101done
8102
8103CFLAGS=$SAVE_CFLAGS
8104
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008105# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8106for ac_header in net/if.h
8107do :
8108 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8109#ifdef STDC_HEADERS
8110# include <stdlib.h>
8111# include <stddef.h>
8112#else
8113# ifdef HAVE_STDLIB_H
8114# include <stdlib.h>
8115# endif
8116#endif
8117#ifdef HAVE_SYS_SOCKET_H
8118# include <sys/socket.h>
8119#endif
8120
8121"
Victor Stinnere0be4232011-10-25 13:06:09 +02008122if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008123 cat >>confdefs.h <<_ACEOF
8124#define HAVE_NET_IF_H 1
8125_ACEOF
8126
8127fi
8128
8129done
8130
8131
Martin v. Löwis11017b12006-01-14 18:12:57 +00008132# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008133for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008134do :
8135 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 +00008136#ifdef HAVE_ASM_TYPES_H
8137#include <asm/types.h>
8138#endif
8139#ifdef HAVE_SYS_SOCKET_H
8140#include <sys/socket.h>
8141#endif
8142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143"
Victor Stinnere0be4232011-10-25 13:06:09 +02008144if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008145 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008146#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008147_ACEOF
8148
8149fi
8150
8151done
8152
8153
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008154# On Linux, qrtr.h requires asm/types.h
8155for ac_header in linux/qrtr.h
8156do :
8157 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8158#ifdef HAVE_ASM_TYPES_H
8159#include <asm/types.h>
8160#endif
8161#ifdef HAVE_SYS_SOCKET_H
8162#include <sys/socket.h>
8163#endif
8164
8165"
8166if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8167 cat >>confdefs.h <<_ACEOF
8168#define HAVE_LINUX_QRTR_H 1
8169_ACEOF
8170
8171fi
8172
8173done
8174
8175
caaveryeffc12f2017-09-06 18:18:10 -04008176for ac_header in linux/vm_sockets.h
8177do :
8178 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8179#ifdef HAVE_SYS_SOCKET_H
8180#include <sys/socket.h>
8181#endif
8182
8183"
8184if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8185 cat >>confdefs.h <<_ACEOF
8186#define HAVE_LINUX_VM_SOCKETS_H 1
8187_ACEOF
8188
8189fi
8190
8191done
8192
8193
Charles-François Natali47413c12011-10-06 19:47:44 +02008194# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008195for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008196do :
8197 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8199#ifdef HAVE_SYS_SOCKET_H
8200#include <sys/socket.h>
8201#endif
8202
8203"
8204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8205 cat >>confdefs.h <<_ACEOF
8206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8207_ACEOF
8208
8209fi
8210
8211done
8212
8213
Guido van Rossum627b2d71993-12-24 10:39:16 +00008214# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008215was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8217$as_echo_n "checking for clock_t in time.h... " >&6; }
8218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008219/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008225 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008226else
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008230
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008231
Guido van Rossum627b2d71993-12-24 10:39:16 +00008232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008233rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8236$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8239$as_echo_n "checking for makedev... " >&6; }
8240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008242
Jesus Cea740f53a2010-04-28 11:35:30 +00008243#if defined(MAJOR_IN_MKDEV)
8244#include <sys/mkdev.h>
8245#elif defined(MAJOR_IN_SYSMACROS)
8246#include <sys/sysmacros.h>
8247#else
8248#include <sys/types.h>
8249#endif
8250
Neal Norwitz11690112002-07-30 01:08:28 +00008251int
8252main ()
8253{
Jesus Cea740f53a2010-04-28 11:35:30 +00008254
8255 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008256 ;
8257 return 0;
8258}
Matthias Kloseb159a552010-04-25 21:00:44 +00008259
Neal Norwitz11690112002-07-30 01:08:28 +00008260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008262 ac_cv_has_makedev=yes
8263else
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266rm -f core conftest.err conftest.$ac_objext \
8267 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8269$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008270if test "$ac_cv_has_makedev" = "yes"; then
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008273
8274fi
8275
Christian Heimes985ecdc2013-11-20 11:46:18 +01008276# byte swapping
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8278$as_echo_n "checking for le64toh... " >&6; }
8279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8280/* end confdefs.h. */
8281
8282#ifdef HAVE_ENDIAN_H
8283#include <endian.h>
8284#elif defined(HAVE_SYS_ENDIAN_H)
8285#include <sys/endian.h>
8286#endif
8287
8288int
8289main ()
8290{
8291
8292 le64toh(1)
8293 ;
8294 return 0;
8295}
8296
8297_ACEOF
8298if ac_fn_c_try_link "$LINENO"; then :
8299 ac_cv_has_le64toh=yes
8300else
8301 ac_cv_has_le64toh=no
8302fi
8303rm -f core conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8306$as_echo "$ac_cv_has_le64toh" >&6; }
8307if test "$ac_cv_has_le64toh" = "yes"; then
8308
8309$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8310
8311fi
8312
Martin v. Löwis399a6892002-10-04 10:22:02 +00008313use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008314# Don't use largefile support for GNU/Hurd
8315case $ac_sys_system in GNU*)
8316 use_lfs=no
8317esac
8318
Martin v. Löwis399a6892002-10-04 10:22:02 +00008319if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008320# Two defines needed to enable largefile support on various platforms
8321# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008322case $ac_sys_system/$ac_sys_release in
8323AIX*)
8324
8325$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8326
8327 ;;
8328esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008334
Martin v. Löwis399a6892002-10-04 10:22:02 +00008335fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008336
Guido van Rossum84e7b241996-08-19 21:59:00 +00008337# Add some code to confdefs.h so that the test for off_t works on SCO
8338cat >> confdefs.h <<\EOF
8339#if defined(SCO_DS)
8340#undef _OFF_T
8341#endif
8342EOF
8343
Guido van Rossumef2255b2000-03-10 22:30:29 +00008344# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008345ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008346if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008348else
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350cat >>confdefs.h <<_ACEOF
8351#define mode_t int
8352_ACEOF
8353
8354fi
8355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008359else
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008363_ACEOF
8364
8365fi
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370else
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
8372cat >>confdefs.h <<_ACEOF
8373#define pid_t int
8374_ACEOF
8375
8376fi
8377
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008380#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008386else
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
8391
8392fi
8393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8395$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008396if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008401#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008402
8403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406 ac_cv_type_uid_t=yes
8407else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008408 ac_cv_type_uid_t=no
8409fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008410rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8414$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008415if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008421
8422fi
8423
Mark Dickinson983bc162012-12-02 12:11:38 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008426if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008429
8430fi
8431
Stefan Krah1919b7e2012-03-21 18:25:23 +01008432ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8433if test "x$ac_cv_type___uint128_t" = xyes; then :
8434
8435$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8436
8437fi
8438
Jack Jansendd19cf82001-12-06 22:36:17 +00008439
Michael W. Hudson54241132001-12-07 15:38:26 +00008440# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008441# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442# The cast to long int works around a bug in the HP C Compiler
8443# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8444# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8445# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8447$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008450else
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 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 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 if test "$ac_cv_type_int" = yes; then
8455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008457as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008458See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 else
8460 ac_cv_sizeof_int=0
8461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008463
Martin v. Löwis11437992002-04-12 09:54:03 +00008464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8466$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467
8468
8469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008471#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008472_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008473
8474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475# The cast to long int works around a bug in the HP C Compiler
8476# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8477# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8478# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8480$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008481if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 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 +00008485
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 if test "$ac_cv_type_long" = yes; then
8488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008490as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008491See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 else
8493 ac_cv_sizeof_long=0
8494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8499$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500
8501
8502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008504#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008505_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008506
8507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508# The cast to long int works around a bug in the HP C Compiler
8509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8511# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8513$as_echo_n "checking size of long long... " >&6; }
8514if ${ac_cv_sizeof_long_long+:} false; then :
8515 $as_echo_n "(cached) " >&6
8516else
8517 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8518
8519else
8520 if test "$ac_cv_type_long_long" = yes; then
8521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8523as_fn_error 77 "cannot compute sizeof (long long)
8524See \`config.log' for more details" "$LINENO" 5; }
8525 else
8526 ac_cv_sizeof_long_long=0
8527 fi
8528fi
8529
8530fi
8531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8532$as_echo "$ac_cv_sizeof_long_long" >&6; }
8533
8534
8535
8536cat >>confdefs.h <<_ACEOF
8537#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8538_ACEOF
8539
8540
8541# The cast to long int works around a bug in the HP C Compiler
8542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8546$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 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 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 if test "$ac_cv_type_void_p" = yes; then
8554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008556as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008557See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 else
8559 ac_cv_sizeof_void_p=0
8560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8565$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566
8567
8568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008570#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008572
8573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574# The cast to long int works around a bug in the HP C Compiler
8575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8577# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8579$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008580if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 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 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 if test "$ac_cv_type_short" = yes; then
8587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008589as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008590See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 else
8592 ac_cv_sizeof_short=0
8593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8598$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599
8600
8601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008603#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008604_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008605
8606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607# The cast to long int works around a bug in the HP C Compiler
8608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8610# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8612$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008613if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 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 +00008617
Martin v. Löwis11437992002-04-12 09:54:03 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 if test "$ac_cv_type_float" = yes; then
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008622as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008623See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 else
8625 ac_cv_sizeof_float=0
8626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628
Martin v. Löwis11437992002-04-12 09:54:03 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8631$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632
8633
8634
Martin v. Löwis11437992002-04-12 09:54:03 +00008635cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008636#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008638
8639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8645$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008646if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 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 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_double" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_double=0
8659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8664$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665
8666
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008670_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008671
8672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673# The cast to long int works around a bug in the HP C Compiler
8674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8676# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8678$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008679if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 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 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 if test "$ac_cv_type_fpos_t" = yes; then
8686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008688as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008689See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 else
8691 ac_cv_sizeof_fpos_t=0
8692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8697$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698
8699
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008702#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008703_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008704
Michael W. Hudson54241132001-12-07 15:38:26 +00008705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8711$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 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 +00008716
Martin v. Löwis18e16552006-02-15 17:27:45 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_size_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_size_t=0
8725 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis18e16552006-02-15 17:27:45 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8730$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis18e16552006-02-15 17:27:45 +00008734cat >>confdefs.h <<_ACEOF
8735#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8736_ACEOF
8737
8738
Christian Heimes400adb02008-02-01 08:12:03 +00008739# The cast to long int works around a bug in the HP C Compiler
8740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8742# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8744$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008745if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 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 +00008749
Christian Heimes400adb02008-02-01 08:12:03 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if test "$ac_cv_type_pid_t" = yes; then
8752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008755See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008756 else
8757 ac_cv_sizeof_pid_t=0
8758 fi
8759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760
Christian Heimes400adb02008-02-01 08:12:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8763$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008764
8765
8766
8767cat >>confdefs.h <<_ACEOF
8768#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8769_ACEOF
8770
8771
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008772# The cast to long int works around a bug in the HP C Compiler
8773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8775# This bug is HP SR number 8606223364.
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8777$as_echo_n "checking size of uintptr_t... " >&6; }
8778if ${ac_cv_sizeof_uintptr_t+:} false; then :
8779 $as_echo_n "(cached) " >&6
8780else
8781 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8782
8783else
8784 if test "$ac_cv_type_uintptr_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8787as_fn_error 77 "cannot compute sizeof (uintptr_t)
8788See \`config.log' for more details" "$LINENO" 5; }
8789 else
8790 ac_cv_sizeof_uintptr_t=0
8791 fi
8792fi
8793
8794fi
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8796$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8797
8798
8799
8800cat >>confdefs.h <<_ACEOF
8801#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8802_ACEOF
8803
8804
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008806
Eitan Adler3055c942018-05-15 22:58:09 -07008807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8808$as_echo_n "checking for long double... " >&6; }
8809if ${ac_cv_type_long_double+:} false; then :
8810 $as_echo_n "(cached) " >&6
8811else
8812 if test "$GCC" = yes; then
8813 ac_cv_type_long_double=yes
8814 else
8815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817/* The Stardent Vistra knows sizeof (long double), but does
8818 not support it. */
8819 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008820int
8821main ()
8822{
Eitan Adler3055c942018-05-15 22:58:09 -07008823static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8824 sizeof (double) <= sizeof (long double))];
8825test_array [0] = 0;
8826return test_array [0];
8827
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008828 ;
8829 return 0;
8830}
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008833 ac_cv_type_long_double=yes
8834else
8835 ac_cv_type_long_double=no
8836fi
8837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8838 fi
8839fi
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8841$as_echo "$ac_cv_type_long_double" >&6; }
8842 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008845
Eitan Adler3055c942018-05-15 22:58:09 -07008846 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008847
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008848# The cast to long int works around a bug in the HP C Compiler
8849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8853$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 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 +00008858
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if test "$ac_cv_type_long_double" = yes; then
8861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008863as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008864See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008865 else
8866 ac_cv_sizeof_long_double=0
8867 fi
8868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8872$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
8874
8875
8876cat >>confdefs.h <<_ACEOF
8877#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8878_ACEOF
8879
8880
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882# The cast to long int works around a bug in the HP C Compiler
8883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8887$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 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 +00008892
Thomas Woutersb2137042007-02-01 18:02:27 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 if test "$ac_cv_type__Bool" = yes; then
8895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008897as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008898See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 else
8900 ac_cv_sizeof__Bool=0
8901 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903
Thomas Woutersb2137042007-02-01 18:02:27 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8906$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908
8909
Thomas Woutersb2137042007-02-01 18:02:27 +00008910cat >>confdefs.h <<_ACEOF
8911#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8912_ACEOF
8913
8914
Thomas Woutersb2137042007-02-01 18:02:27 +00008915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916# The cast to long int works around a bug in the HP C Compiler
8917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8921$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008922if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926#ifdef HAVE_SYS_TYPES_H
8927#include <sys/types.h>
8928#endif
8929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 if test "$ac_cv_type_off_t" = yes; then
8934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008936as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008937See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938 else
8939 ac_cv_sizeof_off_t=0
8940 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8945$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008947
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008952
Michael W. Hudson54241132001-12-07 15:38:26 +00008953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954
Matthias Kloseb9621712010-04-24 17:59:49 +00008955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8956$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008957if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008958 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8963$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008967fi
8968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969# The cast to long int works around a bug in the HP C Compiler
8970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8974$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008975if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979#ifdef HAVE_SYS_TYPES_H
8980#include <sys/types.h>
8981#endif
8982#ifdef HAVE_TIME_H
8983#include <time.h>
8984#endif
8985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type_time_t" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994 else
8995 ac_cv_sizeof_time_t=0
8996 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9001$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
9004
Martin v. Löwis11437992002-04-12 09:54:03 +00009005cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009007_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009008
Michael W. Hudson54241132001-12-07 15:38:26 +00009009
9010
Trent Mick635f6fb2000-08-23 21:33:05 +00009011# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009012ac_save_cc="$CC"
9013if test "$ac_cv_kpthread" = "yes"
9014then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009015elif test "$ac_cv_kthread" = "yes"
9016then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009017elif test "$ac_cv_pthread" = "yes"
9018then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009019fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9022$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009023have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
9030{
Guido van Rossum12580492000-09-24 16:47:19 +00009031pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ;
9033 return 0;
9034}
Matthias Kloseb159a552010-04-25 21:00:44 +00009035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009037if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009038 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9042$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009043if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9049$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009050if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052else
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009054#ifdef HAVE_PTHREAD_H
9055#include <pthread.h>
9056#endif
9057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060else
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 if test "$ac_cv_type_pthread_t" = yes; then
9062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009065See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009066 else
9067 ac_cv_sizeof_pthread_t=0
9068 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009070
Trent Mick635f6fb2000-08-23 21:33:05 +00009071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9073$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009075
9076
Martin v. Löwis11437992002-04-12 09:54:03 +00009077cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009078#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009079_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081
Trent Mick635f6fb2000-08-23 21:33:05 +00009082fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009083
9084# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9085# This checking will be unnecessary after removing deprecated TLS API.
9086# The cast to long int works around a bug in the HP C Compiler
9087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9089# This bug is HP SR number 8606223364.
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9091$as_echo_n "checking size of pthread_key_t... " >&6; }
9092if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9093 $as_echo_n "(cached) " >&6
9094else
9095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9096"; then :
9097
9098else
9099 if test "$ac_cv_type_pthread_key_t" = yes; then
9100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9102as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9103See \`config.log' for more details" "$LINENO" 5; }
9104 else
9105 ac_cv_sizeof_pthread_key_t=0
9106 fi
9107fi
9108
9109fi
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9111$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9112
9113
9114
9115cat >>confdefs.h <<_ACEOF
9116#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9117_ACEOF
9118
9119
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9121$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9122if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9124/* end confdefs.h. */
9125#include <pthread.h>
9126int
9127main ()
9128{
9129pthread_key_t k; k * 1;
9130 ;
9131 return 0;
9132}
9133_ACEOF
9134if ac_fn_c_try_compile "$LINENO"; then :
9135 ac_pthread_key_t_is_arithmetic_type=yes
9136else
9137 ac_pthread_key_t_is_arithmetic_type=no
9138
9139fi
9140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9142$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9143 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9144
9145$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9146
9147 fi
9148else
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150$as_echo "no" >&6; }
9151fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009152CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009153
Michael W. Hudson54241132001-12-07 15:38:26 +00009154
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009156 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009157 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9158 ;;
9159 Darwin/*)
9160 OTHER_LIBTOOL_OPT=""
9161 ;;
9162esac
9163
9164
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009165
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009166case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009167 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009168 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9169 if test "${enable_universalsdk}"; then
9170 :
9171 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009172 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009173 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009174 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009175 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009176 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009177 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009178 if test ${gcc_version} '<' 4.0
9179 then
9180 LIBTOOL_CRUFT="-lcc_dynamic"
9181 else
9182 LIBTOOL_CRUFT=""
9183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009185 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009186else
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009188/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009189
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009190 #include <unistd.h>
9191 int main(int argc, char*argv[])
9192 {
9193 if (sizeof(long) == 4) {
9194 return 0;
9195 } else {
9196 return 1;
9197 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009198 }
9199
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009201if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009202 ac_osx_32bit=yes
9203else
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009208fi
9209
9210
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009211 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009212 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009213 i386)
9214 MACOSX_DEFAULT_ARCH="i386"
9215 ;;
9216 ppc)
9217 MACOSX_DEFAULT_ARCH="ppc"
9218 ;;
9219 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009220 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009221 ;;
9222 esac
9223 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009224 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009225 i386)
9226 MACOSX_DEFAULT_ARCH="x86_64"
9227 ;;
9228 ppc)
9229 MACOSX_DEFAULT_ARCH="ppc64"
9230 ;;
9231 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009232 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009233 ;;
9234 esac
9235
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236 fi
9237
9238 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009239 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009240 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009241esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9243$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009244if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009245then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009246 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009248 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009249
Matthias Kloseb9621712010-04-24 17:59:49 +00009250$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9253$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009254 if test $enable_shared = "yes"
9255 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009256 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 +00009257 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009258else
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9260$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009261fi
9262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9264$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009265case $ac_sys_system/$ac_sys_release in
9266 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267
Matthias Kloseb9621712010-04-24 17:59:49 +00009268$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9271$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009272 ;;
9273 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009276 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009277esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009278
Guido van Rossum0a516c91994-09-12 10:58:40 +00009279# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
9282
9283
9284
Benjamin Peterson99f03762010-04-11 22:15:28 +00009285
Thomas Wouters477c8d52006-05-27 19:21:47 +00009286
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009287# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9288# -- usually .so, .sl on HP-UX, .dll on Cygwin
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9290$as_echo_n "checking the extension of shared libraries... " >&6; }
9291if test -z "$SHLIB_SUFFIX"; then
9292 case $ac_sys_system in
9293 hp*|HP*)
9294 case `uname -m` in
9295 ia64) SHLIB_SUFFIX=.so;;
9296 *) SHLIB_SUFFIX=.sl;;
9297 esac
9298 ;;
9299 CYGWIN*) SHLIB_SUFFIX=.dll;;
9300 *) SHLIB_SUFFIX=.so;;
9301 esac
9302fi
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9304$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009305
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009307# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308# (Shared libraries in this instance are shared modules to be loaded into
9309# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9311$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312if test -z "$LDSHARED"
9313then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009314 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009315 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009316 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009317 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009320 if test "$GCC" = "yes" ; then
9321 LDSHARED='$(CC) -shared'
9322 LDCXXSHARED='$(CXX) -shared'
9323 else
9324 LDSHARED='$(CC) -G'
9325 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009326 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009327 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009328 if test "$GCC" = "yes" ; then
9329 LDSHARED='$(CC) -shared'
9330 LDCXXSHARED='$(CXX) -shared'
9331 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009332 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009333 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009334 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009335 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009336 LDSHARED='$(CC) -bundle'
9337 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009338 if test "$enable_framework" ; then
9339 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009340 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9341 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009343 else
9344 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009345 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009347 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009348 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009349 LDSHARED='$(CC) -bundle'
9350 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009351 if test "$enable_framework" ; then
9352 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009353 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9354 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009355 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009356 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009357 # No framework, use the Python app as bundle-loader
9358 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009359 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009360 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009361 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009362 Darwin/*)
9363 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9364 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009365
Ned Deily36820b62014-06-25 13:44:22 -07009366 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9367 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9368 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9369 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9370 if test ${dep_target_major} -eq 10 && \
9371 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009372 then
Ned Deily36820b62014-06-25 13:44:22 -07009373 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009374 LDSHARED='$(CC) -bundle'
9375 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009376 if test "$enable_framework" ; then
9377 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009378 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9379 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009380 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009381 else
9382 # No framework, use the Python app as bundle-loader
9383 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9384 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009385 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009386 fi
Ned Deily36820b62014-06-25 13:44:22 -07009387 else
9388 # building for OS X 10.3 and later
9389 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9390 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9391 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009392 fi
9393 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009394 Linux*|GNU*|QNX*)
9395 LDSHARED='$(CC) -shared'
9396 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009397 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009398 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009399 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009400 LDSHARED='$(CC) -shared'
9401 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009402 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009403 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009404 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009405 OpenBSD*)
9406 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9407 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009408 LDSHARED='$(CC) -shared $(CCSHARED)'
9409 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009410 else
9411 case `uname -r` in
9412 [01].* | 2.[0-7] | 2.[0-7].*)
9413 LDSHARED="ld -Bshareable ${LDFLAGS}"
9414 ;;
9415 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -shared $(CCSHARED)'
9417 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009418 ;;
9419 esac
9420 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009422 LDSHARED='$(CC) -shared'
9423 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009424 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009425 if test "$GCC" = "yes" ; then
9426 LDSHARED='$(CC) -shared'
9427 LDCXXSHARED='$(CXX) -shared'
9428 else
9429 LDSHARED='$(CC) -G'
9430 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009431 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009432 SCO_SV*)
9433 LDSHARED='$(CC) -Wl,-G,-Bexport'
9434 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9435 CYGWIN*)
9436 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9437 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009438 *) LDSHARED="ld";;
9439 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9442$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009444BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009445# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009446# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9448$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009449if test -z "$CCSHARED"
9450then
Guido van Rossum07397971997-04-29 21:49:50 +00009451 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009452 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009453 then CCSHARED="-fPIC";
9454 elif test `uname -p` = sparc;
9455 then CCSHARED="-xcode=pic32";
9456 else CCSHARED="-Kpic";
9457 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009458 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009459 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009460 else CCSHARED="+z";
9461 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009462 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009463 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009464 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009465 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009466 if test "$GCC" = "yes"
9467 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009469 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009470 SCO_SV*)
9471 if test "$GCC" = "yes"
9472 then CCSHARED="-fPIC"
9473 else CCSHARED="-Kpic -belf"
9474 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009475 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9478$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009479# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009480# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9482$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009483if test -z "$LINKFORSHARED"
9484then
Guido van Rossum07397971997-04-29 21:49:50 +00009485 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009486 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009487 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009488 LINKFORSHARED="-Wl,-E -Wl,+s";;
9489# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009490 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009491 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009492 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009494 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009495
9496 # Issue #18075: the default maximum stack size (8MBytes) is too
9497 # small for the default recursion limit. Increase the stack size
9498 # to ensure that tests don't crash
9499 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9500
Jack Jansene578a632001-08-15 01:27:14 +00009501 if test "$enable_framework"
9502 then
Jack Jansenda49e192005-01-07 13:08:22 +00009503 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009504 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009505 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009506 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009507 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009508 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009509 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009510 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9511 then
9512 LINKFORSHARED="-Wl,--export-dynamic"
9513 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009514 SunOS/5*) case $CC in
9515 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009516 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009517 then
9518 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009519 fi;;
9520 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009521 CYGWIN*)
9522 if test $enable_shared = "no"
9523 then
9524 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9525 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009526 QNX*)
9527 # -Wl,-E causes the symbols to be added to the dynamic
9528 # symbol table so that they can be found when a module
9529 # is loaded. -N 2048K causes the stack size to be set
9530 # to 2048 kilobytes so that the stack doesn't overflow
9531 # when running test_compile.py.
9532 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9536$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537
Michael W. Hudson54241132001-12-07 15:38:26 +00009538
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9541$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009542if test ! "$LIBRARY" = "$LDLIBRARY"
9543then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009544 case $ac_sys_system in
9545 CYGWIN*)
9546 # Cygwin needs CCSHARED when building extension DLLs
9547 # but not when building the interpreter DLL.
9548 CFLAGSFORSHARED='';;
9549 *)
9550 CFLAGSFORSHARED='$(CCSHARED)'
9551 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9554$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009555
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009556# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9557# library (with --enable-shared).
9558# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009559# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9560# if it is not required, since it creates a dependency of the shared library
9561# to LIBS. This, in turn, means that applications linking the shared libpython
9562# don't need to link LIBS explicitly. The default should be only changed
9563# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009564
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9566$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009567case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009568 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009569 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009570esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9572$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009573
9574
Guido van Rossum627b2d71993-12-24 10:39:16 +00009575# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9577$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009579 $as_echo_n "(cached) " >&6
9580else
9581 ac_check_lib_save_LIBS=$LIBS
9582LIBS="-lsendfile $LIBS"
9583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9584/* end confdefs.h. */
9585
9586/* Override any GCC internal prototype to avoid an error.
9587 Use char because int might match the return type of a GCC
9588 builtin and then its argument prototype would still apply. */
9589#ifdef __cplusplus
9590extern "C"
9591#endif
9592char sendfile ();
9593int
9594main ()
9595{
9596return sendfile ();
9597 ;
9598 return 0;
9599}
9600_ACEOF
9601if ac_fn_c_try_link "$LINENO"; then :
9602 ac_cv_lib_sendfile_sendfile=yes
9603else
9604 ac_cv_lib_sendfile_sendfile=no
9605fi
9606rm -f core conftest.err conftest.$ac_objext \
9607 conftest$ac_exeext conftest.$ac_ext
9608LIBS=$ac_check_lib_save_LIBS
9609fi
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9611$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009613 cat >>confdefs.h <<_ACEOF
9614#define HAVE_LIBSENDFILE 1
9615_ACEOF
9616
9617 LIBS="-lsendfile $LIBS"
9618
9619fi
9620
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9622$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009623if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625else
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631/* Override any GCC internal prototype to avoid an error.
9632 Use char because int might match the return type of a GCC
9633 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009634#ifdef __cplusplus
9635extern "C"
9636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009637char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009638int
9639main ()
9640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009642 ;
9643 return 0;
9644}
9645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009646if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651rm -f core conftest.err conftest.$ac_objext \
9652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009653LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9656$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009657if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 cat >>confdefs.h <<_ACEOF
9659#define HAVE_LIBDL 1
9660_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009661
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009662 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009663
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009664fi
9665 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9667$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009668if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009672LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676/* Override any GCC internal prototype to avoid an error.
9677 Use char because int might match the return type of a GCC
9678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009682char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693else
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9701$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 cat >>confdefs.h <<_ACEOF
9704#define HAVE_LIBDLD 1
9705_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009707 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709fi
9710 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009711
Michael Felt0d3ccb42017-12-30 22:39:20 +01009712# checks for uuid.h location
9713for ac_header in uuid/uuid.h uuid.h
9714do :
9715 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9716ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9717if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9718 cat >>confdefs.h <<_ACEOF
9719#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9720_ACEOF
9721
9722fi
9723
9724done
9725
9726
Berker Peksag9a10ff42017-11-08 23:09:16 +03009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9728$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730/* end confdefs.h. */
9731#include <uuid/uuid.h>
9732int
9733main ()
9734{
9735
9736#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009737void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009738#endif
9739
9740 ;
9741 return 0;
9742}
9743_ACEOF
9744if ac_fn_c_try_compile "$LINENO"; then :
9745
9746$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9747
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9749$as_echo "yes" >&6; }
9750else
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9752$as_echo "no" >&6; }
9753
9754fi
9755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9756
Michael Felt0d3ccb42017-12-30 22:39:20 +01009757# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009758# FreeBSD and OpenBSD provides support as well
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9760$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762/* end confdefs.h. */
9763#include <uuid.h>
9764int
9765main ()
9766{
9767
9768#ifndef uuid_create
9769void *x = uuid_create
9770#endif
9771
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776if ac_fn_c_try_compile "$LINENO"; then :
9777
9778$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9781$as_echo "yes" >&6; }
9782else
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785
9786fi
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9788
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009789# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9790# stream in big-endian byte-order
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9792$as_echo_n "checking for uuid_enc_be... " >&6; }
9793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9794/* end confdefs.h. */
9795#include <uuid.h>
9796int
9797main ()
9798{
9799
9800#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009801void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009802#endif
9803
9804 ;
9805 return 0;
9806}
9807_ACEOF
9808if ac_fn_c_try_compile "$LINENO"; then :
9809
9810$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9811
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817
9818fi
9819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9820
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009821# 'Real Time' functions on Solaris
9822# posix4 on Solaris 2.6
9823# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009826if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009828else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009829 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833/* Override any GCC internal prototype to avoid an error.
9834 Use char because int might match the return type of a GCC
9835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009836#ifdef __cplusplus
9837extern "C"
9838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009839char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009840int
9841main ()
9842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ;
9845 return 0;
9846}
9847_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848for ac_lib in '' pthread rt posix4; do
9849 if test -z "$ac_lib"; then
9850 ac_res="none required"
9851 else
9852 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009853 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009860 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863done
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866else
9867 ac_cv_search_sem_init=no
9868fi
9869rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009870LIBS=$ac_func_search_save_LIBS
9871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9873$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009875if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009877
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009878fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009879
Martin v. Löwis519adae2003-09-20 10:47:47 +00009880
Martin v. Löwis19d17342003-06-14 21:03:05 +00009881# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9883$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009884if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009886else
9887 ac_check_lib_save_LIBS=$LIBS
9888LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009890/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892/* Override any GCC internal prototype to avoid an error.
9893 Use char because int might match the return type of a GCC
9894 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009895#ifdef __cplusplus
9896extern "C"
9897#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009898char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009899int
9900main ()
9901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009903 ;
9904 return 0;
9905}
9906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009908 ac_cv_lib_intl_textdomain=yes
9909else
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912rm -f core conftest.err conftest.$ac_objext \
9913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009914LIBS=$ac_check_lib_save_LIBS
9915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9917$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009918if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921
Brett Cannonc6d936e2009-06-07 20:09:53 +00009922 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923fi
9924
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009925
9926# checks for system dependent C++ extensions support
9927case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9929$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009932
Georg Brandl59e87bd2011-02-15 19:48:59 +00009933 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009934int
9935main ()
9936{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009937loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ;
9939 return 0;
9940}
Matthias Kloseb159a552010-04-25 21:00:44 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009944
Matthias Kloseb159a552010-04-25 21:00:44 +00009945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
Matthias Kloseb159a552010-04-25 21:00:44 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009951else
Matthias Kloseb159a552010-04-25 21:00:44 +00009952
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009957rm -f core conftest.err conftest.$ac_objext \
9958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009959 *) ;;
9960esac
9961
Christian Heimes985ecdc2013-11-20 11:46:18 +01009962# check for systems that require aligned memory access
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9964$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009965if ${ac_cv_aligned_required+:} false; then :
9966 $as_echo_n "(cached) " >&6
9967else
9968 if test "$cross_compiling" = yes; then :
9969 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009970else
9971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9972/* end confdefs.h. */
9973
9974int main()
9975{
9976 char s[16];
9977 int i, *p1, *p2;
9978 for (i=0; i < 16; i++)
9979 s[i] = i;
9980 p1 = (int*)(s+1);
9981 p2 = (int*)(s+2);
9982 if (*p1 == *p2)
9983 return 1;
9984 return 0;
9985}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009986_ACEOF
9987if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009988 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009989else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009990 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009991fi
9992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9993 conftest.$ac_objext conftest.beam conftest.$ac_ext
9994fi
9995
9996
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009997fi
9998
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10000$as_echo "$ac_cv_aligned_required" >&6; }
10001if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010002
10003$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10004
10005fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010006
10007# str, bytes and memoryview hash algorithm
10008
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10011$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10012
10013# Check whether --with-hash_algorithm was given.
10014if test "${with_hash_algorithm+set}" = set; then :
10015 withval=$with_hash_algorithm;
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10017$as_echo "$withval" >&6; }
10018case "$withval" in
10019 siphash24)
10020 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10021
10022 ;;
10023 fnv)
10024 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10025
10026 ;;
10027 *)
10028 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10029 ;;
10030esac
10031
10032else
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10034$as_echo "default" >&6; }
10035fi
10036
10037
Charles-François Natalid30b0222014-05-08 23:08:51 +010010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10039$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10040
10041# Check whether --with-address_sanitizer was given.
10042if test "${with_address_sanitizer+set}" = set; then :
10043 withval=$with_address_sanitizer;
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10045$as_echo "$withval" >&6; }
10046BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10047LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010048# ASan works by controlling memory allocation, our own malloc interferes.
10049with_pymalloc="no"
10050
10051else
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10058$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10059
10060# Check whether --with-memory_sanitizer was given.
10061if test "${with_memory_sanitizer+set}" = set; then :
10062 withval=$with_memory_sanitizer;
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10064$as_echo "$withval" >&6; }
10065BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10066LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10067# MSan works by controlling memory allocation, our own malloc interferes.
10068with_pymalloc="no"
10069
10070else
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10077$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10078
10079# Check whether --with-undefined_behavior_sanitizer was given.
10080if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10081 withval=$with_undefined_behavior_sanitizer;
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10083$as_echo "$withval" >&6; }
10084BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10085LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010086
10087else
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
Guido van Rossum70c7f481998-03-26 18:44:10 +000010093# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10095$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010096if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010100LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104/* Override any GCC internal prototype to avoid an error.
10105 Use char because int might match the return type of a GCC
10106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107#ifdef __cplusplus
10108extern "C"
10109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010110char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010111int
10112main ()
10113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010121else
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010124rm -f core conftest.err conftest.$ac_objext \
10125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10129$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010130if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010131 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010132fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010133 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10135$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010136if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010140LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144/* Override any GCC internal prototype to avoid an error.
10145 Use char because int might match the return type of a GCC
10146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147#ifdef __cplusplus
10148extern "C"
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ;
10156 return 0;
10157}
10158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10169$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010171 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010172fi
10173 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10176$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10182$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010183LIBS="$withval $LIBS"
10184
10185else
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188fi
10189
Guido van Rossum7f43da71994-08-01 12:15:30 +000010190
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010191
10192
10193
10194
10195
10196
10197
10198if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10199 if test -n "$ac_tool_prefix"; then
10200 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10201set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_PKG_CONFIG+:} false; then :
10205 $as_echo_n "(cached) " >&6
10206else
10207 case $PKG_CONFIG in
10208 [\\/]* | ?:[\\/]*)
10209 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10210 ;;
10211 *)
10212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215 IFS=$as_save_IFS
10216 test -z "$as_dir" && as_dir=.
10217 for ac_exec_ext in '' $ac_executable_extensions; do
10218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221 break 2
10222 fi
10223done
10224 done
10225IFS=$as_save_IFS
10226
10227 ;;
10228esac
10229fi
10230PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10231if test -n "$PKG_CONFIG"; then
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10233$as_echo "$PKG_CONFIG" >&6; }
10234else
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240fi
10241if test -z "$ac_cv_path_PKG_CONFIG"; then
10242 ac_pt_PKG_CONFIG=$PKG_CONFIG
10243 # Extract the first word of "pkg-config", so it can be a program name with args.
10244set dummy pkg-config; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10248 $as_echo_n "(cached) " >&6
10249else
10250 case $ac_pt_PKG_CONFIG in
10251 [\\/]* | ?:[\\/]*)
10252 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10253 ;;
10254 *)
10255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258 IFS=$as_save_IFS
10259 test -z "$as_dir" && as_dir=.
10260 for ac_exec_ext in '' $ac_executable_extensions; do
10261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264 break 2
10265 fi
10266done
10267 done
10268IFS=$as_save_IFS
10269
10270 ;;
10271esac
10272fi
10273ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10274if test -n "$ac_pt_PKG_CONFIG"; then
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10276$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10277else
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282 if test "x$ac_pt_PKG_CONFIG" = x; then
10283 PKG_CONFIG=""
10284 else
10285 case $cross_compiling:$ac_tool_warned in
10286yes:)
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10289ac_tool_warned=yes ;;
10290esac
10291 PKG_CONFIG=$ac_pt_PKG_CONFIG
10292 fi
10293else
10294 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10295fi
10296
10297fi
10298if test -n "$PKG_CONFIG"; then
10299 _pkg_min_version=0.9.0
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10301$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10302 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10304$as_echo "yes" >&6; }
10305 else
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308 PKG_CONFIG=""
10309 fi
10310fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010311
10312# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10314$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010315
10316# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010318 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010319else
10320 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010321fi
10322
10323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10325$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010326
10327# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10329$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010330
10331# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010333 withval=$with_system_ffi;
10334fi
10335
10336
Zachary Waref40d4dd2016-09-17 01:25:24 -050010337if test "$ac_sys_system" = "Darwin"
10338then
10339 case "$with_system_ffi" in
10340 "")
10341 with_system_ffi="no"
10342 ;;
10343 yes|no)
10344 ;;
10345 *)
10346 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10347 ;;
10348 esac
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10350$as_echo "$with_system_ffi" >&6; }
10351else
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10353$as_echo "yes" >&6; }
10354 if test "$with_system_ffi" != ""
10355 then
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10357$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10358 fi
10359 with_system_ffi="yes"
10360fi
Zachary Ware935043d2016-09-09 17:01:21 -070010361
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010362if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010363 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10364else
10365 LIBFFI_INCLUDEDIR=""
10366fi
10367
10368
Stefan Krah60187b52012-03-23 19:06:27 +010010369# Check for use of the system libmpdec library
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10371$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10372
10373# Check whether --with-system_libmpdec was given.
10374if test "${with_system_libmpdec+set}" = set; then :
10375 withval=$with_system_libmpdec;
10376else
10377 with_system_libmpdec="no"
10378fi
10379
10380
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10382$as_echo "$with_system_libmpdec" >&6; }
10383
Benjamin Peterson076ed002010-10-31 17:11:02 +000010384# Check for support for loadable sqlite extensions
10385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10386$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10387# Check whether --enable-loadable-sqlite-extensions was given.
10388if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10389 enableval=$enable_loadable_sqlite_extensions;
10390else
10391 enable_loadable_sqlite_extensions="no"
10392fi
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10396$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10397
Ned Deilyd819b932013-09-06 01:07:05 -070010398# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10399
10400
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10402$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10403
10404# Check whether --with-tcltk-includes was given.
10405if test "${with_tcltk_includes+set}" = set; then :
10406 withval=$with_tcltk_includes;
10407else
10408 with_tcltk_includes="default"
10409fi
10410
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10412$as_echo "$with_tcltk_includes" >&6; }
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10414$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10415
10416# Check whether --with-tcltk-libs was given.
10417if test "${with_tcltk_libs+set}" = set; then :
10418 withval=$with_tcltk_libs;
10419else
10420 with_tcltk_libs="default"
10421fi
10422
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10424$as_echo "$with_tcltk_libs" >&6; }
10425if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10426then
10427 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10428 then
10429 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10430 fi
10431 TCLTK_INCLUDES=""
10432 TCLTK_LIBS=""
10433else
10434 TCLTK_INCLUDES="$with_tcltk_includes"
10435 TCLTK_LIBS="$with_tcltk_libs"
10436fi
10437
Matthias Klose55708cc2009-04-30 08:06:49 +000010438# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10440$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010441
10442# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010444 withval=$with_dbmliborder;
10445if test x$with_dbmliborder = xyes
10446then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010447as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010448else
10449 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10450 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10451 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010452 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010453 fi
10454 done
10455fi
10456fi
10457
Matthias Kloseb9621712010-04-24 17:59:49 +000010458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10459$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010460
Martin v. Löwis11437992002-04-12 09:54:03 +000010461# Templates for things AC_DEFINEd more than once.
10462# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010463
10464
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010465if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010466then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010467 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010469
10470 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471elif test "$ac_cv_kpthread" = "yes"
10472then
10473 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010474 if test "$ac_cv_cxx_thread" = "yes"; then
10475 CXX="$CXX -Kpthread"
10476 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010478elif test "$ac_cv_kthread" = "yes"
10479then
10480 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010481 if test "$ac_cv_cxx_thread" = "yes"; then
10482 CXX="$CXX -Kthread"
10483 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010484 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010485elif test "$ac_cv_pthread" = "yes"
10486then
10487 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010488 if test "$ac_cv_cxx_thread" = "yes"; then
10489 CXX="$CXX -pthread"
10490 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010491 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010492else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010493 if test ! -z "$withval" -a -d "$withval"
10494 then LDFLAGS="$LDFLAGS -L$withval"
10495 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010496
10497 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010498 # define _POSIX_THREADS in unistd.h. Some apparently don't
10499 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10501$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010504
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010505#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010506#ifdef _POSIX_THREADS
10507yes
10508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
10510_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010513 unistd_defines_pthreads=yes
10514else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010515 unistd_defines_pthreads=no
10516fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010517rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10520$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010521
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010523
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010524 # Just looking for pthread_create in libpthread is not enough:
10525 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10526 # So we really have to include pthread.h, and then link.
10527 _libs=$LIBS
10528 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10530$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010533
10534#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010535#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010536
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010537void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010538int
10539main ()
10540{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010541
10542pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ;
10544 return 0;
10545}
10546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010548
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10550$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010551 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010552
Guido van Rossum02a1c402000-02-25 19:26:31 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010555 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010557if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010560
Guido van Rossumad678af1998-10-02 14:42:15 +000010561else
Guido van Rossumad678af1998-10-02 14:42:15 +000010562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10564$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567else
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010569LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573/* Override any GCC internal prototype to avoid an error.
10574 Use char because int might match the return type of a GCC
10575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010576#ifdef __cplusplus
10577extern "C"
10578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010579char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010580int
10581main ()
10582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010593rm -f core conftest.err conftest.$ac_objext \
10594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010595LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10598$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010602 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010603
Greg Steinadf63d62000-07-05 10:38:09 +000010604else
Greg Steinadf63d62000-07-05 10:38:09 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10607$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010610else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010612LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616/* Override any GCC internal prototype to avoid an error.
10617 Use char because int might match the return type of a GCC
10618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010619#ifdef __cplusplus
10620extern "C"
10621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010622char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10641$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010644 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010645 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010646
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010647else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10650$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010651if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010653else
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010655LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659/* Override any GCC internal prototype to avoid an error.
10660 Use char because int might match the return type of a GCC
10661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010662#ifdef __cplusplus
10663extern "C"
10664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010665char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010666int
10667main ()
10668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 ;
10671 return 0;
10672}
10673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010676else
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010679rm -f core conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10684$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010685if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010686
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010687 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010688 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010689
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010690else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10693$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010694if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010696else
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010698LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702/* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010708char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010709int
10710main ()
10711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010722rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010724LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10727$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010728if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010729
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010730 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010731 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010732
Guido van Rossumb93a8621998-05-07 13:27:32 +000010733else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010734
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010735 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10736
Guido van Rossum2d38f911996-06-26 19:47:01 +000010737fi
10738
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010740fi
10741
Guido van Rossum0be3e491997-05-22 20:33:33 +000010742fi
10743
Guido van Rossum49545951997-12-02 19:28:29 +000010744fi
10745
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746fi
10747
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749rm -f core conftest.err conftest.$ac_objext \
10750 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10753$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010754if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756else
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010758LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762/* Override any GCC internal prototype to avoid an error.
10763 Use char because int might match the return type of a GCC
10764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010765#ifdef __cplusplus
10766extern "C"
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010769int
10770main ()
10771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010782rm -f core conftest.err conftest.$ac_objext \
10783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10787$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010789
Martin v. Löwis130fb172001-07-19 11:00:41 +000010790 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010791
Guido van Rossum627b2d71993-12-24 10:39:16 +000010792fi
10793
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010794
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010795fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010796
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010797if test "$posix_threads" = "yes"; then
10798 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010801
10802 fi
10803
10804 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10805 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010806 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010808
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010809 ;;
10810 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812
10813 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010814 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010816
10817 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818 esac
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10821$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010822 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824else
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010826 ac_cv_pthread_system_supported=no
10827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010830
10831 #include <stdio.h>
10832 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833 void *foo(void *parm) {
10834 return NULL;
10835 }
10836 main() {
10837 pthread_attr_t attr;
10838 pthread_t id;
10839 if (pthread_attr_init(&attr)) exit(-1);
10840 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10841 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10842 exit(0);
10843 }
10844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010845if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846 ac_cv_pthread_system_supported=yes
10847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855fi
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10858$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 if test "$ac_cv_pthread_system_supported" = "yes"; then
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862
10863 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 for ac_func in pthread_sigmask
10865do :
10866 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010867if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010869#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010870_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010871 case $ac_sys_system in
10872 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010875
10876 ;;
10877 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878fi
10879done
10880
pdoxe14679c2017-10-05 00:01:56 -070010881 for ac_func in pthread_getcpuclockid
10882do :
10883 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10884if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10885 cat >>confdefs.h <<_ACEOF
10886#define HAVE_PTHREAD_GETCPUCLOCKID 1
10887_ACEOF
10888
10889fi
10890done
10891
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010892fi
10893
10894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10898$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10904$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6=no
10906 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10908$as_echo "yes" >&6; }
10909 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910
10911 ipv6=yes
10912 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914else
Martin v. Löwis11437992002-04-12 09:54:03 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918 /* AF_INET6 available check */
10919#include <sys/types.h>
10920#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010921int
10922main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010924int domain = AF_INET6;
10925 ;
10926 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927}
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010929if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10932$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935else
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010944if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10946$as_echo_n "checking if RFC2553 API is available... " >&6; }
10947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010949
10950 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010951#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010955struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010956 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ;
10958 return 0;
10959}
Matthias Kloseb159a552010-04-25 21:00:44 +000010960
Martin v. Löwis11437992002-04-12 09:54:03 +000010961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010963
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010966 ipv6=yes
10967
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010968else
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010972 ipv6=no
10973
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010976fi
10977
10978if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010980
10981fi
10982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983fi
10984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985
10986ipv6type=unknown
10987ipv6lib=none
10988ipv6trylibc=no
10989
10990if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10992$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010993 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10994 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995 case $i in
10996 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000#include <netinet/in.h>
11001#ifdef IPV6_INRIA_VERSION
11002yes
11003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011007 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010
11011 ;;
11012 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include <netinet/in.h>
11017#ifdef __KAME__
11018yes
11019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023 ipv6type=$i;
11024 ipv6lib=inet6
11025 ipv6libdir=/usr/local/v6/lib
11026 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011028rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029
11030 ;;
11031 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035#include <features.h>
11036#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11037yes
11038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042 ipv6type=$i;
11043 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011045rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046
11047 ;;
11048 linux-inet6)
11049 if test -d /usr/inet6; then
11050 ipv6type=$i
11051 ipv6lib=inet6
11052 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011053 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054 fi
11055 ;;
11056 solaris)
11057 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011058 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059 ipv6type=$i
11060 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061 fi
11062 fi
11063 ;;
11064 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068#include <sys/param.h>
11069#ifdef _TOSHIBA_INET6
11070yes
11071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 ipv6type=$i;
11076 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011077 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080
11081 ;;
11082 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086#include </usr/local/v6/include/sys/v6config.h>
11087#ifdef __V6D__
11088yes
11089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 ipv6type=$i;
11094 ipv6lib=v6;
11095 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011096 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099
11100 ;;
11101 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011104
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105#include <sys/param.h>
11106#ifdef _ZETA_MINAMI_INET6
11107yes
11108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 ipv6type=$i;
11113 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011114 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011116rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117
11118 ;;
11119 esac
11120 if test "$ipv6type" != "unknown"; then
11121 break
11122 fi
11123 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11125$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126fi
11127
11128if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11129 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11130 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11131 echo "using lib$ipv6lib"
11132 else
11133 if test $ipv6trylibc = "yes"; then
11134 echo "using libc"
11135 else
11136 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11137 echo "You need to fetch lib$ipv6lib.a from appropriate"
11138 echo 'ipv6 kit and compile beforehand.'
11139 exit 1
11140 fi
11141 fi
11142fi
11143
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11145$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11147/* end confdefs.h. */
11148 /* CAN_RAW_FD_FRAMES available check */
11149#include <linux/can/raw.h>
11150int
11151main ()
11152{
11153int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158if ac_fn_c_try_compile "$LINENO"; then :
11159
11160
11161$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11162
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11164$as_echo "yes" >&6; }
11165
11166else
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11169$as_echo "no" >&6; }
11170
11171fi
11172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11173
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011174# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11176$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180 withval=$with_doc_strings;
11181fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011182
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011183
11184if test -z "$with_doc_strings"
11185then with_doc_strings="yes"
11186fi
11187if test "$with_doc_strings" != "no"
11188then
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011191
11192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11194$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011195
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011196# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11198$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011201if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202 withval=$with_pymalloc;
11203fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011204
Neil Schemenauera35c6882001-02-27 04:45:05 +000011205
Neil Schemenauer16c22972002-03-22 15:34:49 +000011206if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011207then
11208 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011209fi
11210if test "$with_pymalloc" != "no"
11211then
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011214
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011215 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11218$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011219
Nick Coghlan6ea41862017-06-11 13:16:15 +100011220# Check for --with-c-locale-coercion
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11222$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11223
11224# Check whether --with-c-locale-coercion was given.
11225if test "${with_c_locale_coercion+set}" = set; then :
11226 withval=$with_c_locale_coercion;
11227fi
11228
11229
11230if test -z "$with_c_locale_coercion"
11231then
11232 with_c_locale_coercion="yes"
11233fi
11234if test "$with_c_locale_coercion" != "no"
11235then
11236
11237$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11238
11239fi
11240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11241$as_echo "$with_c_locale_coercion" >&6; }
11242
Benjamin Peterson05159c42009-12-03 03:01:27 +000011243# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11245$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011246
11247# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011248if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011249 withval=$with_valgrind;
11250else
11251 with_valgrind=no
11252fi
11253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11255$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011256if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 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 +020011258if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011261
11262else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011263 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011264
11265fi
11266
11267
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011268 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011269fi
11270
Łukasz Langaa785c872016-09-09 17:37:37 -070011271# Check for DTrace support
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11273$as_echo_n "checking for --with-dtrace... " >&6; }
11274
11275# Check whether --with-dtrace was given.
11276if test "${with_dtrace+set}" = set; then :
11277 withval=$with_dtrace;
11278else
11279 with_dtrace=no
11280fi
11281
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11283$as_echo "$with_dtrace" >&6; }
11284
11285
11286
11287
11288
11289DTRACE=
11290DFLAGS=
11291DTRACE_HEADERS=
11292DTRACE_OBJS=
11293
11294if test "$with_dtrace" = "yes"
11295then
11296 # Extract the first word of "dtrace", so it can be a program name with args.
11297set dummy dtrace; ac_word=$2
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11299$as_echo_n "checking for $ac_word... " >&6; }
11300if ${ac_cv_path_DTRACE+:} false; then :
11301 $as_echo_n "(cached) " >&6
11302else
11303 case $DTRACE in
11304 [\\/]* | ?:[\\/]*)
11305 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11306 ;;
11307 *)
11308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11309for as_dir in $PATH
11310do
11311 IFS=$as_save_IFS
11312 test -z "$as_dir" && as_dir=.
11313 for ac_exec_ext in '' $ac_executable_extensions; do
11314 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11315 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11317 break 2
11318 fi
11319done
11320 done
11321IFS=$as_save_IFS
11322
11323 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11324 ;;
11325esac
11326fi
11327DTRACE=$ac_cv_path_DTRACE
11328if test -n "$DTRACE"; then
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11330$as_echo "$DTRACE" >&6; }
11331else
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337 if test "$DTRACE" = "not found"; then
11338 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11339 fi
11340
11341$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11342
11343 DTRACE_HEADERS="Include/pydtrace_probes.h"
11344
11345 # On OS X, DTrace providers do not need to be explicitly compiled and
11346 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11347 # generation flag '-G'. We check for presence of this flag, rather than
11348 # hardcoding support by OS, in the interest of robustness.
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11350$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11351if ${ac_cv_dtrace_link+:} false; then :
11352 $as_echo_n "(cached) " >&6
11353else
11354 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011355 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011356 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11357 ac_cv_dtrace_link=yes
11358
11359fi
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11361$as_echo "$ac_cv_dtrace_link" >&6; }
11362 if test "$ac_cv_dtrace_link" = "yes"; then
11363 DTRACE_OBJS="Python/pydtrace.o"
11364 fi
11365fi
11366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011367# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011368
Guido van Rossum98935bf2001-09-05 19:13:16 +000011369DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011370
Guido van Rossume97ee181999-12-20 21:27:22 +000011371# the dlopen() function means we might want to use dynload_shlib.o. some
11372# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011373for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011374do :
11375 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011376if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011379_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011380
Guido van Rossume97ee181999-12-20 21:27:22 +000011381fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011382done
Guido van Rossume97ee181999-12-20 21:27:22 +000011383
Michael W. Hudson54241132001-12-07 15:38:26 +000011384
Guido van Rossume97ee181999-12-20 21:27:22 +000011385# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11386# loading of modules.
11387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11389$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011390if test -z "$DYNLOADFILE"
11391then
11392 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011393 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11394 if test "$ac_cv_func_dlopen" = yes
11395 then DYNLOADFILE="dynload_shlib.o"
11396 else DYNLOADFILE="dynload_aix.o"
11397 fi
11398 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011399 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011400 *)
11401 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11402 # out any dynamic loading
11403 if test "$ac_cv_func_dlopen" = yes
11404 then DYNLOADFILE="dynload_shlib.o"
11405 else DYNLOADFILE="dynload_stub.o"
11406 fi
11407 ;;
11408 esac
11409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11411$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011412if test "$DYNLOADFILE" != "dynload_stub.o"
11413then
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011416
11417fi
11418
Neil Schemenauer4e425612001-06-19 15:44:15 +000011419# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11420
Michael W. Hudson54241132001-12-07 15:38:26 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11423$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011424if test -z "$MACHDEP_OBJS"
11425then
Jack Jansene578a632001-08-15 01:27:14 +000011426 MACHDEP_OBJS=$extra_machdep_objs
11427else
11428 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011429fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011430if test -z "$MACHDEP_OBJS"; then
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11432$as_echo "none" >&6; }
11433else
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11435$as_echo "$MACHDEP_OBJS" >&6; }
11436fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011437
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011439for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011440 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011441 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011442 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011443 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011444 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011445 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011446 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011447 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011448 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011449 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011450 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011451 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11452 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011453 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011454 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011455 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011456 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11457 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011458 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011459 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011460 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011461 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011462 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011463do :
11464 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11465ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011466if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011469_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011471fi
11472done
11473
Michael W. Hudson54241132001-12-07 15:38:26 +000011474
Benjamin Peterson40caa052018-09-12 15:52:40 -070011475# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11476# links. Some libc implementations have a stub lchmod implementation that always
11477# returns an error.
11478if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011479 for ac_func in lchmod
11480do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011481 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11482if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011483 cat >>confdefs.h <<_ACEOF
11484#define HAVE_LCHMOD 1
11485_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011486
11487fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011488done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011489
11490fi
11491
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011492ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11493 #include <dirent.h>
11494"
11495if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11496
11497$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11498
11499fi
11500
11501
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011502# For some functions, having a definition is not sufficient, since
11503# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11505$as_echo_n "checking for chroot... " >&6; }
11506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011507/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011508#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011509int
11510main ()
11511{
11512void *x=chroot
11513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011520
Matthias Kloseb159a552010-04-25 21:00:44 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011523else
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011526
11527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11530$as_echo_n "checking for link... " >&6; }
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011533#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011534int
11535main ()
11536{
11537void *x=link
11538 ;
11539 return 0;
11540}
11541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011545
Matthias Kloseb159a552010-04-25 21:00:44 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551
11552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11555$as_echo_n "checking for symlink... " >&6; }
11556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559int
11560main ()
11561{
11562void *x=symlink
11563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570
Matthias Kloseb159a552010-04-25 21:00:44 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576
11577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11580$as_echo_n "checking for fchdir... " >&6; }
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011583#include <unistd.h>
11584int
11585main ()
11586{
11587void *x=fchdir
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11605$as_echo_n "checking for fsync... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011608#include <unistd.h>
11609int
11610main ()
11611{
11612void *x=fsync
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11630$as_echo_n "checking for fdatasync... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633#include <unistd.h>
11634int
11635main ()
11636{
11637void *x=fdatasync
11638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645
Matthias Kloseb159a552010-04-25 21:00:44 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011651
11652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11655$as_echo_n "checking for epoll... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011657/* end confdefs.h. */
11658#include <sys/epoll.h>
11659int
11660main ()
11661{
11662void *x=epoll_create
11663 ;
11664 return 0;
11665}
11666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011676
11677fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11680$as_echo_n "checking for epoll_create1... " >&6; }
11681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11682/* end confdefs.h. */
11683#include <sys/epoll.h>
11684int
11685main ()
11686{
11687void *x=epoll_create1
11688 ;
11689 return 0;
11690}
11691_ACEOF
11692if ac_fn_c_try_compile "$LINENO"; then :
11693
11694$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11695
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11697$as_echo "yes" >&6; }
11698else
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
11701
11702fi
11703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11705$as_echo_n "checking for kqueue... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011707/* end confdefs.h. */
11708
11709#include <sys/types.h>
11710#include <sys/event.h>
11711
11712int
11713main ()
11714{
11715int x=kqueue()
11716 ;
11717 return 0;
11718}
11719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011720if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011723
Matthias Kloseb159a552010-04-25 21:00:44 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011725$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011729
11730fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11733$as_echo_n "checking for prlimit... " >&6; }
11734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11735/* end confdefs.h. */
11736
11737#include <sys/time.h>
11738#include <sys/resource.h>
11739
11740int
11741main ()
11742{
11743void *x=prlimit
11744 ;
11745 return 0;
11746}
11747_ACEOF
11748if ac_fn_c_try_compile "$LINENO"; then :
11749
11750$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11751
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11753$as_echo "yes" >&6; }
11754else
11755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11756$as_echo "no" >&6; }
11757
11758fi
11759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11760
Martin v. Löwisd5843682002-11-21 20:41:28 +000011761# On some systems (eg. FreeBSD 5), we would find a definition of the
11762# functions ctermid_r, setgroups in the library, but no prototype
11763# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11764# address to avoid compiler warnings and potential miscompilations
11765# because of the missing prototypes.
11766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11768$as_echo_n "checking for ctermid_r... " >&6; }
11769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011770/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011771
Martin v. Löwisd5843682002-11-21 20:41:28 +000011772#include <stdio.h>
11773
Martin v. Löwisd5843682002-11-21 20:41:28 +000011774int
11775main ()
11776{
11777void* p = ctermid_r
11778 ;
11779 return 0;
11780}
11781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011785
Matthias Kloseb159a552010-04-25 21:00:44 +000011786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011787$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11790$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011791
11792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11796$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011798 $as_echo_n "(cached) " >&6
11799else
11800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011802#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011803int
11804main ()
11805{
11806void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011807
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011808 ;
11809 return 0;
11810}
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011813 ac_cv_flock_decl=yes
11814else
11815 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011816
11817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011819
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011820fi
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11822$as_echo "$ac_cv_flock_decl" >&6; }
11823if test "x${ac_cv_flock_decl}" = xyes; then
11824 for ac_func in flock
11825do :
11826 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011828 cat >>confdefs.h <<_ACEOF
11829#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011830_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011831
Antoine Pitroua3000072010-09-07 14:52:42 +000011832else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011834$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011836 $as_echo_n "(cached) " >&6
11837else
11838 ac_check_lib_save_LIBS=$LIBS
11839LIBS="-lbsd $LIBS"
11840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841/* end confdefs.h. */
11842
11843/* Override any GCC internal prototype to avoid an error.
11844 Use char because int might match the return type of a GCC
11845 builtin and then its argument prototype would still apply. */
11846#ifdef __cplusplus
11847extern "C"
11848#endif
11849char flock ();
11850int
11851main ()
11852{
11853return flock ();
11854 ;
11855 return 0;
11856}
11857_ACEOF
11858if ac_fn_c_try_link "$LINENO"; then :
11859 ac_cv_lib_bsd_flock=yes
11860else
11861 ac_cv_lib_bsd_flock=no
11862fi
11863rm -f core conftest.err conftest.$ac_objext \
11864 conftest$ac_exeext conftest.$ac_ext
11865LIBS=$ac_check_lib_save_LIBS
11866fi
11867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11868$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011870 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011871
11872
11873$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11874
11875
11876fi
11877
11878
11879fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011880done
11881
Antoine Pitroua3000072010-09-07 14:52:42 +000011882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11885$as_echo_n "checking for getpagesize... " >&6; }
11886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011887/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011888
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011889#include <unistd.h>
11890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011891int
11892main ()
11893{
11894void* p = getpagesize
11895 ;
11896 return 0;
11897}
11898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011902
Matthias Kloseb159a552010-04-25 21:00:44 +000011903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011904$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011905else
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11907$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011908
11909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011911
Victor Stinner984890f2011-11-24 13:53:38 +010011912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11913$as_echo_n "checking for broken unsetenv... " >&6; }
11914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11915/* end confdefs.h. */
11916
11917#include <stdlib.h>
11918
11919int
11920main ()
11921{
11922int res = unsetenv("DUMMY")
11923 ;
11924 return 0;
11925}
11926_ACEOF
11927if ac_fn_c_try_compile "$LINENO"; then :
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
11930else
11931
11932$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11933
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11935$as_echo "yes" >&6; }
11936
11937fi
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011940for ac_prog in true
11941do
11942 # Extract the first word of "$ac_prog", so it can be a program name with args.
11943set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011946if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011948else
11949 if test -n "$TRUE"; then
11950 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11951else
11952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11953for as_dir in $PATH
11954do
11955 IFS=$as_save_IFS
11956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011959 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 $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 +000011961 break 2
11962 fi
11963done
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011966
11967fi
11968fi
11969TRUE=$ac_cv_prog_TRUE
11970if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11972$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011976fi
11977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011979 test -n "$TRUE" && break
11980done
11981test -n "$TRUE" || TRUE="/bin/true"
11982
11983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11985$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011986if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011988else
11989 ac_check_lib_save_LIBS=$LIBS
11990LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011992/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994/* Override any GCC internal prototype to avoid an error.
11995 Use char because int might match the return type of a GCC
11996 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011997#ifdef __cplusplus
11998extern "C"
11999#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012000char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012001int
12002main ()
12003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012005 ;
12006 return 0;
12007}
12008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012010 ac_cv_lib_c_inet_aton=yes
12011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012014rm -f core conftest.err conftest.$ac_objext \
12015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012016LIBS=$ac_check_lib_save_LIBS
12017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12019$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012020if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012021 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12024$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012025if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012027else
12028 ac_check_lib_save_LIBS=$LIBS
12029LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033/* Override any GCC internal prototype to avoid an error.
12034 Use char because int might match the return type of a GCC
12035 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012036#ifdef __cplusplus
12037extern "C"
12038#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012040int
12041main ()
12042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049 ac_cv_lib_resolv_inet_aton=yes
12050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012053rm -f core conftest.err conftest.$ac_objext \
12054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012055LIBS=$ac_check_lib_save_LIBS
12056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12058$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060 cat >>confdefs.h <<_ACEOF
12061#define HAVE_LIBRESOLV 1
12062_ACEOF
12063
12064 LIBS="-lresolv $LIBS"
12065
12066fi
12067
12068
12069fi
12070
12071
Christian Heimesd0764e22007-12-04 15:00:33 +000012072# On Tru64, chflags seems to be present, but calling it will
12073# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12075$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012080 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012083/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012084
Christian Heimesd0764e22007-12-04 15:00:33 +000012085#include <sys/stat.h>
12086#include <unistd.h>
12087int main(int argc, char*argv[])
12088{
12089 if(chflags(argv[0], 0) != 0)
12090 return 1;
12091 return 0;
12092}
Ned Deily3eb67d52011-06-28 00:00:28 -070012093
Christian Heimesd0764e22007-12-04 15:00:33 +000012094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012096 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012102fi
12103
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12107$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012108if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012111 ac_cv_have_chflags="yes"
12112else
12113 ac_cv_have_chflags="no"
12114fi
12115
12116fi
12117if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012120
12121fi
12122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12124$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012129 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012132/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012133
Christian Heimesd0764e22007-12-04 15:00:33 +000012134#include <sys/stat.h>
12135#include <unistd.h>
12136int main(int argc, char*argv[])
12137{
12138 if(lchflags(argv[0], 0) != 0)
12139 return 1;
12140 return 0;
12141}
Ned Deily3eb67d52011-06-28 00:00:28 -070012142
Christian Heimesd0764e22007-12-04 15:00:33 +000012143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012151fi
12152
12153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12156$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012157if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012160 ac_cv_have_lchflags="yes"
12161else
12162 ac_cv_have_lchflags="no"
12163fi
12164
12165fi
12166if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169
12170fi
12171
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012172case $ac_sys_system/$ac_sys_release in
12173Darwin/*)
12174 _CUR_CFLAGS="${CFLAGS}"
12175 _CUR_LDFLAGS="${LDFLAGS}"
12176 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12177 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12178 ;;
12179esac
12180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12182$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012185else
12186 ac_check_lib_save_LIBS=$LIBS
12187LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012189/* end confdefs.h. */
12190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191/* Override any GCC internal prototype to avoid an error.
12192 Use char because int might match the return type of a GCC
12193 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012194#ifdef __cplusplus
12195extern "C"
12196#endif
12197char inflateCopy ();
12198int
12199main ()
12200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012206if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012207 ac_cv_lib_z_inflateCopy=yes
12208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211rm -f core conftest.err conftest.$ac_objext \
12212 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012213LIBS=$ac_check_lib_save_LIBS
12214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12216$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012217if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012220
12221fi
12222
12223
12224case $ac_sys_system/$ac_sys_release in
12225Darwin/*)
12226 CFLAGS="${_CUR_CFLAGS}"
12227 LDFLAGS="${_CUR_LDFLAGS}"
12228 ;;
12229esac
12230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12232$as_echo_n "checking for hstrerror... " >&6; }
12233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012234/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012235
Martin v. Löwise9416172003-05-03 10:12:45 +000012236#include <netdb.h>
12237
Martin v. Löwise9416172003-05-03 10:12:45 +000012238int
12239main ()
12240{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012241void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012242 ;
12243 return 0;
12244}
12245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012249
Matthias Kloseb159a552010-04-25 21:00:44 +000012250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012251$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12254$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012255
12256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012257rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12261$as_echo_n "checking for inet_aton... " >&6; }
12262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012264
Martin v. Löwis86d66262006-02-17 08:40:11 +000012265#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012266#include <sys/socket.h>
12267#include <netinet/in.h>
12268#include <arpa/inet.h>
12269
Martin v. Löwise9416172003-05-03 10:12:45 +000012270int
12271main ()
12272{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012273void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012281
Matthias Kloseb159a552010-04-25 21:00:44 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012283$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012284else
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12286$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012287
12288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012289rm -f core conftest.err conftest.$ac_objext \
12290 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12293$as_echo_n "checking for inet_pton... " >&6; }
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012297#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012298#include <sys/socket.h>
12299#include <netinet/in.h>
12300#include <arpa/inet.h>
12301
Martin v. Löwise9416172003-05-03 10:12:45 +000012302int
12303main ()
12304{
12305void* p = inet_pton
12306 ;
12307 return 0;
12308}
12309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012313
Matthias Kloseb159a552010-04-25 21:00:44 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012315$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012316else
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12318$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012319
12320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012322
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012323# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12325$as_echo_n "checking for setgroups... " >&6; }
12326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012328
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012329#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012330#ifdef HAVE_GRP_H
12331#include <grp.h>
12332#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012333
Martin v. Löwisd5843682002-11-21 20:41:28 +000012334int
12335main ()
12336{
12337void* p = setgroups
12338 ;
12339 return 0;
12340}
12341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012345
Matthias Kloseb159a552010-04-25 21:00:44 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012348else
Matthias Kloseb9621712010-04-24 17:59:49 +000012349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12350$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012351
12352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012355# check for openpty and forkpty
12356
12357for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012358do :
12359 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012363_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12367$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012368if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012369 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012370else
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012372LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376/* Override any GCC internal prototype to avoid an error.
12377 Use char because int might match the return type of a GCC
12378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012379#ifdef __cplusplus
12380extern "C"
12381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012382char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393else
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012396rm -f core conftest.err conftest.$ac_objext \
12397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012398LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12401$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012402if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012404 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012405else
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12407$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012408if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012410else
12411 ac_check_lib_save_LIBS=$LIBS
12412LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012414/* end confdefs.h. */
12415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416/* Override any GCC internal prototype to avoid an error.
12417 Use char because int might match the return type of a GCC
12418 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012419#ifdef __cplusplus
12420extern "C"
12421#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012422char openpty ();
12423int
12424main ()
12425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012427 ;
12428 return 0;
12429}
12430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012432 ac_cv_lib_bsd_openpty=yes
12433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012436rm -f core conftest.err conftest.$ac_objext \
12437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012438LIBS=$ac_check_lib_save_LIBS
12439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12441$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012442if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012444 LIBS="$LIBS -lbsd"
12445fi
12446
12447
12448fi
12449
Fred Drake8cef4cf2000-06-28 16:40:38 +000012450
12451fi
12452done
12453
12454for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012455do :
12456 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012460_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461
Fred Drake8cef4cf2000-06-28 16:40:38 +000012462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12464$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467else
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012469LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012473/* Override any GCC internal prototype to avoid an error.
12474 Use char because int might match the return type of a GCC
12475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012476#ifdef __cplusplus
12477extern "C"
12478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012479char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012480int
12481main ()
12482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 ;
12485 return 0;
12486}
12487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012490else
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012493rm -f core conftest.err conftest.$ac_objext \
12494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12498$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012499if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12504$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012505if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012507else
12508 ac_check_lib_save_LIBS=$LIBS
12509LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012511/* end confdefs.h. */
12512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513/* Override any GCC internal prototype to avoid an error.
12514 Use char because int might match the return type of a GCC
12515 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012516#ifdef __cplusplus
12517extern "C"
12518#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519char forkpty ();
12520int
12521main ()
12522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012529 ac_cv_lib_bsd_forkpty=yes
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012535LIBS=$ac_check_lib_save_LIBS
12536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12538$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012539if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541 LIBS="$LIBS -lbsd"
12542fi
12543
12544
12545fi
12546
Fred Drake8cef4cf2000-06-28 16:40:38 +000012547
12548fi
12549done
12550
Jack Jansendd19cf82001-12-06 22:36:17 +000012551
Michael W. Hudson54241132001-12-07 15:38:26 +000012552# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012553for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012554do :
12555 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12556ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012557if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012560_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563done
12564
Michael W. Hudson54241132001-12-07 15:38:26 +000012565
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012566ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012567if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012568 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012569
Martin v. Löwis1142de32002-03-29 16:28:31 +000012570else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012572 *" dup2.$ac_objext "* ) ;;
12573 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012575esac
12576
Martin v. Löwis1142de32002-03-29 16:28:31 +000012577fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012578
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012579ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012580if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012581 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12582
12583else
12584 case " $LIBOBJS " in
12585 *" strdup.$ac_objext "* ) ;;
12586 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12587 ;;
12588esac
12589
12590fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012591
12592
12593for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012594do :
12595 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012596if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012597 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012603int
12604main ()
12605{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012614
Guido van Rossum627b2d71993-12-24 10:39:16 +000012615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012617
Guido van Rossum627b2d71993-12-24 10:39:16 +000012618fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012619done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620
Jack Jansen150753c2003-03-29 22:07:47 +000012621for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012622do :
12623 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012624if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012625 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012630#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012631int
12632main ()
12633{
12634setpgrp(0,0);
12635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012642
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012645
12646fi
12647done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012648
Thomas Wouters3a584202000-08-05 23:28:51 +000012649for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012650do :
12651 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012652if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012658#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_compile "$LINENO"; then :
12668
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669else
Skip Montanaro6dead952003-09-25 14:50:04 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Guido van Rossum627b2d71993-12-24 10:39:16 +000012674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012676
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012678done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679
Michael W. Hudson54241132001-12-07 15:38:26 +000012680
Gregory P. Smith387512c2018-12-30 15:42:32 -080012681# We search for both crypt and crypt_r as one or the other may be defined
12682# This gets us our -lcrypt in LIBS when required on the target platform.
12683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12684$as_echo_n "checking for library containing crypt... " >&6; }
12685if ${ac_cv_search_crypt+:} false; then :
12686 $as_echo_n "(cached) " >&6
12687else
12688 ac_func_search_save_LIBS=$LIBS
12689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12690/* end confdefs.h. */
12691
12692/* Override any GCC internal prototype to avoid an error.
12693 Use char because int might match the return type of a GCC
12694 builtin and then its argument prototype would still apply. */
12695#ifdef __cplusplus
12696extern "C"
12697#endif
12698char crypt ();
12699int
12700main ()
12701{
12702return crypt ();
12703 ;
12704 return 0;
12705}
12706_ACEOF
12707for ac_lib in '' crypt; do
12708 if test -z "$ac_lib"; then
12709 ac_res="none required"
12710 else
12711 ac_res=-l$ac_lib
12712 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12713 fi
12714 if ac_fn_c_try_link "$LINENO"; then :
12715 ac_cv_search_crypt=$ac_res
12716fi
12717rm -f core conftest.err conftest.$ac_objext \
12718 conftest$ac_exeext
12719 if ${ac_cv_search_crypt+:} false; then :
12720 break
12721fi
12722done
12723if ${ac_cv_search_crypt+:} false; then :
12724
12725else
12726 ac_cv_search_crypt=no
12727fi
12728rm conftest.$ac_ext
12729LIBS=$ac_func_search_save_LIBS
12730fi
12731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12732$as_echo "$ac_cv_search_crypt" >&6; }
12733ac_res=$ac_cv_search_crypt
12734if test "$ac_res" != no; then :
12735 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12736
12737fi
12738
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12740$as_echo_n "checking for library containing crypt_r... " >&6; }
12741if ${ac_cv_search_crypt_r+:} false; then :
12742 $as_echo_n "(cached) " >&6
12743else
12744 ac_func_search_save_LIBS=$LIBS
12745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746/* end confdefs.h. */
12747
12748/* Override any GCC internal prototype to avoid an error.
12749 Use char because int might match the return type of a GCC
12750 builtin and then its argument prototype would still apply. */
12751#ifdef __cplusplus
12752extern "C"
12753#endif
12754char crypt_r ();
12755int
12756main ()
12757{
12758return crypt_r ();
12759 ;
12760 return 0;
12761}
12762_ACEOF
12763for ac_lib in '' crypt; do
12764 if test -z "$ac_lib"; then
12765 ac_res="none required"
12766 else
12767 ac_res=-l$ac_lib
12768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12769 fi
12770 if ac_fn_c_try_link "$LINENO"; then :
12771 ac_cv_search_crypt_r=$ac_res
12772fi
12773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext
12775 if ${ac_cv_search_crypt_r+:} false; then :
12776 break
12777fi
12778done
12779if ${ac_cv_search_crypt_r+:} false; then :
12780
12781else
12782 ac_cv_search_crypt_r=no
12783fi
12784rm conftest.$ac_ext
12785LIBS=$ac_func_search_save_LIBS
12786fi
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12788$as_echo "$ac_cv_search_crypt_r" >&6; }
12789ac_res=$ac_cv_search_crypt_r
12790if test "$ac_res" != no; then :
12791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12792
12793fi
12794
12795
12796ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12797if test "x$ac_cv_func_crypt_r" = xyes; then :
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799/* end confdefs.h. */
12800
12801#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12802#include <crypt.h>
12803
12804int
12805main ()
12806{
12807
12808struct crypt_data d;
12809char *r = crypt_r("", "", &d);
12810
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815if ac_fn_c_try_compile "$LINENO"; then :
12816
12817$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12818
12819fi
12820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12821
12822fi
12823
12824
Victor Stinnere0be4232011-10-25 13:06:09 +020012825for ac_func in clock_gettime
12826do :
12827 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12828if test "x$ac_cv_func_clock_gettime" = xyes; then :
12829 cat >>confdefs.h <<_ACEOF
12830#define HAVE_CLOCK_GETTIME 1
12831_ACEOF
12832
12833else
12834
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12836$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12837if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12838 $as_echo_n "(cached) " >&6
12839else
12840 ac_check_lib_save_LIBS=$LIBS
12841LIBS="-lrt $LIBS"
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843/* end confdefs.h. */
12844
12845/* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
12848#ifdef __cplusplus
12849extern "C"
12850#endif
12851char clock_gettime ();
12852int
12853main ()
12854{
12855return clock_gettime ();
12856 ;
12857 return 0;
12858}
12859_ACEOF
12860if ac_fn_c_try_link "$LINENO"; then :
12861 ac_cv_lib_rt_clock_gettime=yes
12862else
12863 ac_cv_lib_rt_clock_gettime=no
12864fi
12865rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
12867LIBS=$ac_check_lib_save_LIBS
12868fi
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12870$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12871if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12872
Victor Stinner7efb8332014-08-29 15:41:08 +020012873 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012874 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12875
12876
12877$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12878
12879
12880fi
12881
12882
12883fi
12884done
12885
12886
12887for ac_func in clock_getres
12888do :
12889 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12890if test "x$ac_cv_func_clock_getres" = xyes; then :
12891 cat >>confdefs.h <<_ACEOF
12892#define HAVE_CLOCK_GETRES 1
12893_ACEOF
12894
12895else
12896
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12898$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12899if ${ac_cv_lib_rt_clock_getres+:} false; then :
12900 $as_echo_n "(cached) " >&6
12901else
12902 ac_check_lib_save_LIBS=$LIBS
12903LIBS="-lrt $LIBS"
12904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12905/* end confdefs.h. */
12906
12907/* Override any GCC internal prototype to avoid an error.
12908 Use char because int might match the return type of a GCC
12909 builtin and then its argument prototype would still apply. */
12910#ifdef __cplusplus
12911extern "C"
12912#endif
12913char clock_getres ();
12914int
12915main ()
12916{
12917return clock_getres ();
12918 ;
12919 return 0;
12920}
12921_ACEOF
12922if ac_fn_c_try_link "$LINENO"; then :
12923 ac_cv_lib_rt_clock_getres=yes
12924else
12925 ac_cv_lib_rt_clock_getres=no
12926fi
12927rm -f core conftest.err conftest.$ac_objext \
12928 conftest$ac_exeext conftest.$ac_ext
12929LIBS=$ac_check_lib_save_LIBS
12930fi
12931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12932$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12933if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12934
12935 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12936
12937
12938fi
12939
12940
12941fi
12942done
12943
12944
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012945for ac_func in clock_settime
12946do :
12947 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12948if test "x$ac_cv_func_clock_settime" = xyes; then :
12949 cat >>confdefs.h <<_ACEOF
12950#define HAVE_CLOCK_SETTIME 1
12951_ACEOF
12952
12953else
12954
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12956$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12957if ${ac_cv_lib_rt_clock_settime+:} false; then :
12958 $as_echo_n "(cached) " >&6
12959else
12960 ac_check_lib_save_LIBS=$LIBS
12961LIBS="-lrt $LIBS"
12962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12963/* end confdefs.h. */
12964
12965/* Override any GCC internal prototype to avoid an error.
12966 Use char because int might match the return type of a GCC
12967 builtin and then its argument prototype would still apply. */
12968#ifdef __cplusplus
12969extern "C"
12970#endif
12971char clock_settime ();
12972int
12973main ()
12974{
12975return clock_settime ();
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980if ac_fn_c_try_link "$LINENO"; then :
12981 ac_cv_lib_rt_clock_settime=yes
12982else
12983 ac_cv_lib_rt_clock_settime=no
12984fi
12985rm -f core conftest.err conftest.$ac_objext \
12986 conftest$ac_exeext conftest.$ac_ext
12987LIBS=$ac_check_lib_save_LIBS
12988fi
12989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12990$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12991if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12992
12993 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12994
12995
12996fi
12997
12998
12999fi
13000done
13001
13002
Matthias Kloseb9621712010-04-24 17:59:49 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13004$as_echo_n "checking for major... " >&6; }
13005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013006/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013007
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013008#if defined(MAJOR_IN_MKDEV)
13009#include <sys/mkdev.h>
13010#elif defined(MAJOR_IN_SYSMACROS)
13011#include <sys/sysmacros.h>
13012#else
13013#include <sys/types.h>
13014#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013015
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013016int
13017main ()
13018{
13019
13020 makedev(major(0),minor(0));
13021
13022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013027
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13032$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013033
13034else
Skip Montanaro6dead952003-09-25 14:50:04 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13037$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013038
13039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013040rm -f core conftest.err conftest.$ac_objext \
13041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013042
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013043# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013044# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13046$as_echo_n "checking for getaddrinfo... " >&6; }
13047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013048/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013049
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013050#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013051#include <sys/socket.h>
13052#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013053#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013054
Martin v. Löwis11437992002-04-12 09:54:03 +000013055int
13056main ()
13057{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013058getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 ;
13060 return 0;
13061}
13062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013064 have_getaddrinfo=yes
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013068rm -f core conftest.err conftest.$ac_objext \
13069 conftest$ac_exeext conftest.$ac_ext
13070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13071$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013072if test $have_getaddrinfo = yes
13073then
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13075$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013076 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013080
13081if test "${enable_ipv6+set}" = set; then
13082 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13083else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013084 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013085fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013088/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089
Stefan Krah19c21392012-11-22 23:47:32 +010013090#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091#include <sys/types.h>
13092#include <netdb.h>
13093#include <string.h>
13094#include <sys/socket.h>
13095#include <netinet/in.h>
13096
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013097int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098{
13099 int passive, gaierr, inet4 = 0, inet6 = 0;
13100 struct addrinfo hints, *ai, *aitop;
13101 char straddr[INET6_ADDRSTRLEN], strport[16];
13102
13103 for (passive = 0; passive <= 1; passive++) {
13104 memset(&hints, 0, sizeof(hints));
13105 hints.ai_family = AF_UNSPEC;
13106 hints.ai_flags = passive ? AI_PASSIVE : 0;
13107 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013108 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013109 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13110 (void)gai_strerror(gaierr);
13111 goto bad;
13112 }
13113 for (ai = aitop; ai; ai = ai->ai_next) {
13114 if (ai->ai_addr == NULL ||
13115 ai->ai_addrlen == 0 ||
13116 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13117 straddr, sizeof(straddr), strport, sizeof(strport),
13118 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13119 goto bad;
13120 }
13121 switch (ai->ai_family) {
13122 case AF_INET:
13123 if (strcmp(strport, "54321") != 0) {
13124 goto bad;
13125 }
13126 if (passive) {
13127 if (strcmp(straddr, "0.0.0.0") != 0) {
13128 goto bad;
13129 }
13130 } else {
13131 if (strcmp(straddr, "127.0.0.1") != 0) {
13132 goto bad;
13133 }
13134 }
13135 inet4++;
13136 break;
13137 case AF_INET6:
13138 if (strcmp(strport, "54321") != 0) {
13139 goto bad;
13140 }
13141 if (passive) {
13142 if (strcmp(straddr, "::") != 0) {
13143 goto bad;
13144 }
13145 } else {
13146 if (strcmp(straddr, "::1") != 0) {
13147 goto bad;
13148 }
13149 }
13150 inet6++;
13151 break;
13152 case AF_UNSPEC:
13153 goto bad;
13154 break;
13155 default:
13156 /* another family support? */
13157 break;
13158 }
13159 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013160 freeaddrinfo(aitop);
13161 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013162 }
13163
13164 if (!(inet4 == 0 || inet4 == 2))
13165 goto bad;
13166 if (!(inet6 == 0 || inet6 == 2))
13167 goto bad;
13168
13169 if (aitop)
13170 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013171 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172
13173 bad:
13174 if (aitop)
13175 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013176 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177}
13178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013180if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013181 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182else
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013189fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013190
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13194$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13195
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013196if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197then
13198 if test $ipv6 = yes
13199 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200 echo 'Fatal: You must get working getaddrinfo() function.'
13201 echo ' or you can specify "--disable-ipv6"'.
13202 exit 1
13203 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013204else
Martin v. Löwis11437992002-04-12 09:54:03 +000013205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013207
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013209
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013210for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013211do :
13212 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013213if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013215#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013216_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218fi
13219done
13220
Michael W. Hudson54241132001-12-07 15:38:26 +000013221
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13224$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013225if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013230#include <sys/types.h>
13231#include <sys/time.h>
13232#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234int
13235main ()
13236{
13237if ((struct tm *) 0)
13238return 0;
13239 ;
13240 return 0;
13241}
13242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013244 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13251$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013252if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255
13256fi
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13259$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013260if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265#include <sys/types.h>
13266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268int
13269main ()
13270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271struct tm tm;
13272 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ;
13275 return 0;
13276}
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279 ac_cv_struct_tm=time.h
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13286$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013287if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290
13291fi
13292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293ac_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 +000013294#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296"
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013298
13299cat >>confdefs.h <<_ACEOF
13300#define HAVE_STRUCT_TM_TM_ZONE 1
13301_ACEOF
13302
13303
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309
13310else
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13312"
Victor Stinnere0be4232011-10-25 13:06:09 +020013313if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317fi
13318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013321_ACEOF
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13324$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013325if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331#if !HAVE_DECL_TZNAME
13332extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335int
13336main ()
13337{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 ;
13340 return 0;
13341}
13342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013343if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344 ac_cv_var_tzname=yes
13345else
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013348rm -f core conftest.err conftest.$ac_objext \
13349 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13352$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013353 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013357 fi
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360ac_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 +020013361if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
13363cat >>confdefs.h <<_ACEOF
13364#define HAVE_STRUCT_STAT_ST_RDEV 1
13365_ACEOF
13366
13367
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013368fi
13369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370ac_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 +020013371if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373cat >>confdefs.h <<_ACEOF
13374#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13375_ACEOF
13376
13377
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013378fi
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380ac_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 +020013381if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013382
13383cat >>confdefs.h <<_ACEOF
13384#define HAVE_STRUCT_STAT_ST_FLAGS 1
13385_ACEOF
13386
13387
13388fi
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390ac_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 +020013391if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013392
13393cat >>confdefs.h <<_ACEOF
13394#define HAVE_STRUCT_STAT_ST_GEN 1
13395_ACEOF
13396
13397
13398fi
13399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400ac_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 +020013401if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013402
13403cat >>confdefs.h <<_ACEOF
13404#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13405_ACEOF
13406
13407
13408fi
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410ac_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 +020013411if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413cat >>confdefs.h <<_ACEOF
13414#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13415_ACEOF
13416
13417
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013418fi
13419
Stefan Krah267b6392016-04-26 01:09:18 +020013420ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13421 #include <sys/types.h>
13422 #include <pwd.h>
13423
13424"
13425if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13426
13427cat >>confdefs.h <<_ACEOF
13428#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13429_ACEOF
13430
13431
13432fi
13433ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13434 #include <sys/types.h>
13435 #include <pwd.h>
13436
13437"
13438if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13439
13440cat >>confdefs.h <<_ACEOF
13441#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13442_ACEOF
13443
13444
13445fi
13446
Zachary Ware6a6967e2016-10-01 00:47:27 -050013447# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13448ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13449"
13450if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_SIGINFO_T_SI_BAND 1
13454_ACEOF
13455
13456
13457fi
13458
Michael W. Hudson54241132001-12-07 15:38:26 +000013459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13461$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013462if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464else
Matthias Kloseb159a552010-04-25 21:00:44 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013467/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013468#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013469int
13470main ()
13471{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013472return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478 ac_cv_header_time_altzone=yes
13479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013484fi
13485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13487$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013491
13492fi
13493
Guido van Rossumda88dad1995-01-26 00:46:29 +000013494was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13496$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013498/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013499
13500#include <sys/types.h>
13501#include <sys/select.h>
13502#include <sys/time.h>
13503
Martin v. Löwis11437992002-04-12 09:54:03 +000013504int
13505main ()
13506{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013507;
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013517 was_it_defined=yes
13518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13522$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13525$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013526if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013530/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013531#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013532int
13533main ()
13534{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013535struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013541 ac_cv_struct_addrinfo=yes
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546fi
13547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13549$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013550if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013553
13554fi
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13557$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013558if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013563
13564# include <sys/types.h>
13565# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013569struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013575 ac_cv_struct_sockaddr_storage=yes
13576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13583$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013587
13588fi
13589
Christian Heimesdffa3942016-09-05 23:54:41 +020013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13591$as_echo_n "checking for sockaddr_alg... " >&6; }
13592if ${ac_cv_struct_sockaddr_alg+:} false; then :
13593 $as_echo_n "(cached) " >&6
13594else
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596/* end confdefs.h. */
13597
13598# include <sys/types.h>
13599# include <sys/socket.h>
13600# include <linux/if_alg.h>
13601int
13602main ()
13603{
13604struct sockaddr_alg s
13605 ;
13606 return 0;
13607}
13608_ACEOF
13609if ac_fn_c_try_compile "$LINENO"; then :
13610 ac_cv_struct_sockaddr_alg=yes
13611else
13612 ac_cv_struct_sockaddr_alg=no
13613fi
13614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13615fi
13616
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13618$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13619if test $ac_cv_struct_sockaddr_alg = yes; then
13620
13621$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13622
13623fi
13624
Guido van Rossum627b2d71993-12-24 10:39:16 +000013625# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13628$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013629if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013635int
13636main ()
13637{
13638static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013639test_array [0] = 0;
13640return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013641
13642 ;
13643 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013644}
Martin v. Löwis11437992002-04-12 09:54:03 +000013645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013646if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013647 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13654$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013655if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657
13658fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13661$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013662if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013666/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013667
Martin v. Löwis11437992002-04-12 09:54:03 +000013668int
13669main ()
13670{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013671
Martin v. Löwis11437992002-04-12 09:54:03 +000013672#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013673 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013675 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677 char const *const *pcpcc;
13678 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 /* NEC SVR4.0.2 mips cc rejects this. */
13680 struct point {int x, y;};
13681 static struct point const zero = {0,0};
13682 /* AIX XL C 1.02.0.0 rejects this.
13683 It does not let you subtract one const X* pointer from another in
13684 an arm of an if-expression whose if-part is not a constant
13685 expression */
13686 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013687 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013688 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013689 ++pcpcc;
13690 ppc = (char**) pcpcc;
13691 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013692 { /* SCO 3.2v4 cc rejects this sort of thing. */
13693 char tx;
13694 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 }
13700 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13701 int x[] = {25, 17};
13702 const int *foo = &x[0];
13703 ++foo;
13704 }
13705 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13706 typedef const int *iptr;
13707 iptr p = 0;
13708 ++p;
13709 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013710 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013712 struct s { int j; const int *ap[3]; } bx;
13713 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 }
13715 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13716 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722 ;
13723 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013724}
Martin v. Löwis11437992002-04-12 09:54:03 +000013725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013726if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727 ac_cv_c_const=yes
13728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13734$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738
13739fi
13740
Michael W. Hudson54241132001-12-07 15:38:26 +000013741
Guido van Rossumda88dad1995-01-26 00:46:29 +000013742works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13744$as_echo_n "checking for working signed char... " >&6; }
13745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748int
13749main ()
13750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ;
13753 return 0;
13754}
13755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013757 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013758else
Skip Montanaro6dead952003-09-25 14:50:04 +000013759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013761
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013762
Guido van Rossum7f43da71994-08-01 12:15:30 +000013763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13766$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013767
Guido van Rossumda88dad1995-01-26 00:46:29 +000013768have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13770$as_echo_n "checking for prototypes... " >&6; }
13771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013772/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013773int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013774int
13775main ()
13776{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 ;
13779 return 0;
13780}
13781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Matthias Kloseb159a552010-04-25 21:00:44 +000013786 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13790$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791
Guido van Rossumda88dad1995-01-26 00:46:29 +000013792works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13794$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013796/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013797
13798#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013799int foo(int x, ...) {
13800 va_list va;
13801 va_start(va, x);
13802 va_arg(va, int);
13803 va_arg(va, char *);
13804 va_arg(va, double);
13805 return 0;
13806}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013807
Martin v. Löwis11437992002-04-12 09:54:03 +000013808int
13809main ()
13810{
Guido van Rossum90eea071996-08-30 20:58:57 +000013811return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ;
13813 return 0;
13814}
13815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013821 works=yes
13822
Guido van Rossum627b2d71993-12-24 10:39:16 +000013823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13826$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013827
Martin v. Löwisd6320502004-08-12 13:45:08 +000013828# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13830$as_echo_n "checking for socketpair... " >&6; }
13831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013832/* end confdefs.h. */
13833
13834#include <sys/types.h>
13835#include <sys/socket.h>
13836
13837int
13838main ()
13839{
13840void *x=socketpair
13841 ;
13842 return 0;
13843}
13844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013848
Matthias Kloseb159a552010-04-25 21:00:44 +000013849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013851else
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13853$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013854
13855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013857
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013858# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13860$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013863#include <sys/types.h>
13864#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013865int
13866main ()
13867{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013868struct sockaddr x;
13869x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 ;
13871 return 0;
13872}
13873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013874if ac_fn_c_try_compile "$LINENO"; then :
13875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13876$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013879
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13882$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013883
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013886
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013887# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013891if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13896$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013897 OLD_CFLAGS=$CFLAGS
13898 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013900/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013901
13902# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Martin v. Löwis11437992002-04-12 09:54:03 +000013904int
13905main ()
13906{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013907
13908 char *name;
13909 struct hostent *he, *res;
13910 char buffer[2048];
13911 int buflen = 2048;
13912 int h_errnop;
13913
13914 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
13916 ;
13917 return 0;
13918}
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013923
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13928$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013930else
Skip Montanaro6dead952003-09-25 14:50:04 +000013931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13933$as_echo "no" >&6; }
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13935$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013937/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013939# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941int
13942main ()
13943{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944
13945 char *name;
13946 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013947 char buffer[2048];
13948 int buflen = 2048;
13949 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950
Matthias Kloseb159a552010-04-25 21:00:44 +000013951 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
13953 ;
13954 return 0;
13955}
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
Matthias Kloseb159a552010-04-25 21:00:44 +000013962$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13965$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967else
Skip Montanaro6dead952003-09-25 14:50:04 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13970$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13972$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13974/* end confdefs.h. */
13975
13976# include <netdb.h>
13977
13978int
13979main ()
13980{
13981
13982 char *name;
13983 struct hostent *he;
13984 struct hostent_data data;
13985
13986 (void) gethostbyname_r(name, he, &data);
13987
13988 ;
13989 return 0;
13990}
13991_ACEOF
13992if ac_fn_c_try_compile "$LINENO"; then :
13993
13994 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13995
13996
13997$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13998
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14000$as_echo "yes" >&6; }
14001
14002else
14003
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14005$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014015 CFLAGS=$OLD_CFLAGS
14016
14017else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 for ac_func in gethostbyname
14020do :
14021 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014022if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014024#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014025_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014028done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029
Michael W. Hudson54241132001-12-07 15:38:26 +000014030
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031fi
14032
Michael W. Hudson54241132001-12-07 15:38:26 +000014033
14034
14035
14036
14037
14038
Guido van Rossum627b2d71993-12-24 10:39:16 +000014039# checks for system services
14040# (none yet)
14041
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014042# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014043ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014045
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14048$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014049if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014051else
Martin v. Löwis11437992002-04-12 09:54:03 +000014052 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014053LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057/* Override any GCC internal prototype to avoid an error.
14058 Use char because int might match the return type of a GCC
14059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014060#ifdef __cplusplus
14061extern "C"
14062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014063char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014064int
14065main ()
14066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ;
14069 return 0;
14070}
14071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014074else
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014077rm -f core conftest.err conftest.$ac_objext \
14078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014079LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14082$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 cat >>confdefs.h <<_ACEOF
14085#define HAVE_LIBIEEE 1
14086_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014088 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014089
Guido van Rossum627b2d71993-12-24 10:39:16 +000014090fi
14091
Michael W. Hudson54241132001-12-07 15:38:26 +000014092
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014093fi
14094
Michael W. Hudson54241132001-12-07 15:38:26 +000014095
Guido van Rossum7f43da71994-08-01 12:15:30 +000014096# check for --with-libm=...
14097
Guido van Rossum563e7081996-09-10 18:20:48 +000014098case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014099Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014100*) LIBM=-lm
14101esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14103$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014106if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014108if test "$withval" = no
14109then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14111$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014112elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14115$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014116else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014117fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14120$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121fi
14122
Guido van Rossum7f43da71994-08-01 12:15:30 +000014123
14124# check for --with-libc=...
14125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14127$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014132if test "$withval" = no
14133then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14135$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014136elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014137then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14139$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014140else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014141fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014142else
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14144$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145fi
14146
Guido van Rossum7f43da71994-08-01 12:15:30 +000014147
Stefan Krah1919b7e2012-03-21 18:25:23 +010014148# **************************************
14149# * Check for gcc x64 inline assembler *
14150# **************************************
14151
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14153$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14155/* end confdefs.h. */
14156
14157int
14158main ()
14159{
14160
14161 __asm__ __volatile__ ("movq %rcx, %rax");
14162
14163 ;
14164 return 0;
14165}
14166_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014167if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014168 have_gcc_asm_for_x64=yes
14169else
14170 have_gcc_asm_for_x64=no
14171fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014172rm -f core conftest.err conftest.$ac_objext \
14173 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14175$as_echo "$have_gcc_asm_for_x64" >&6; }
14176if test "$have_gcc_asm_for_x64" = yes
14177then
14178
14179$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14180
14181fi
14182
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014183# **************************************************
14184# * Check for various properties of floating point *
14185# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014186
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14188$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14189if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014191else
14192
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014193
14194ax_cv_c_float_words_bigendian=unknown
14195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014196/* end confdefs.h. */
14197
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014198
14199double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14200
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014201
14202_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014203if ac_fn_c_try_compile "$LINENO"; then :
14204
14205
14206if grep noonsees conftest.$ac_objext >/dev/null ; then
14207 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014208fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014209if grep seesnoon conftest.$ac_objext >/dev/null ; then
14210 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14211 ax_cv_c_float_words_bigendian=no
14212 else
14213 ax_cv_c_float_words_bigendian=unknown
14214 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014215fi
14216
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014217
14218fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014220fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14222$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014223
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014224case $ax_cv_c_float_words_bigendian in
14225 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014226
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014227$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14228 ;;
14229 no)
14230 ;;
14231 *)
14232 as_fn_error $? "
14233
14234Unknown float word ordering. You need to manually preset
14235ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14236
14237 " "$LINENO" 5 ;;
14238esac
14239
14240
14241if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014242then
14243
Matthias Kloseb9621712010-04-24 17:59:49 +000014244$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014245
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014246elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247then
14248
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014249$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14250
14251else
14252 # Some ARM platforms use a mixed-endian representation for doubles.
14253 # While Python doesn't currently have full support for these platforms
14254 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14255 # conversions work.
14256 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14257 # or little, then it must be this?
14258
Matthias Kloseb9621712010-04-24 17:59:49 +000014259$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260
14261fi
14262
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014263# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014264# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014265# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014266# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014267# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014268# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014269
14270# This inline assembler syntax may also work for suncc and icc,
14271# so we try it on all platforms.
14272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14274$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276/* end confdefs.h. */
14277
14278int
14279main ()
14280{
14281
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014282 unsigned short cw;
14283 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14284 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014285
14286 ;
14287 return 0;
14288}
14289_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014290if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291 have_gcc_asm_for_x87=yes
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014294fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014295rm -f core conftest.err conftest.$ac_objext \
14296 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14298$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014299if test "$have_gcc_asm_for_x87" = yes
14300then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14307$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309/* end confdefs.h. */
14310
14311int
14312main ()
14313{
14314
14315 unsigned int fpcr;
14316 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14317 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14318
14319 ;
14320 return 0;
14321}
14322_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014323if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014324 have_gcc_asm_for_mc68881=yes
14325else
14326 have_gcc_asm_for_mc68881=no
14327fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014328rm -f core conftest.err conftest.$ac_objext \
14329 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14331$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14332if test "$have_gcc_asm_for_mc68881" = yes
14333then
14334
14335$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14336
14337fi
14338
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014339# Detect whether system arithmetic is subject to x87-style double
14340# rounding issues. The result of this test has little meaning on non
14341# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14342# mode is round-to-nearest and double rounding issues are present, and
14343# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14345$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014346# $BASECFLAGS may affect the result
14347ac_save_cc="$CC"
14348CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014350 ac_cv_x87_double_rounding=no
14351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014353/* end confdefs.h. */
14354
14355#include <stdlib.h>
14356#include <math.h>
14357int main() {
14358 volatile double x, y, z;
14359 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14360 x = 0.99999999999999989; /* 1-2**-53 */
14361 y = 1./x;
14362 if (y != 1.)
14363 exit(0);
14364 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14365 x = 1e16;
14366 y = 2.99999;
14367 z = x + y;
14368 if (z != 1e16+4.)
14369 exit(0);
14370 /* both tests show evidence of double rounding */
14371 exit(1);
14372}
14373
14374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014375if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376 ac_cv_x87_double_rounding=no
14377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14381 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014382fi
14383
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014384CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14386$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014387if test "$ac_cv_x87_double_rounding" = yes
14388then
14389
Matthias Kloseb9621712010-04-24 17:59:49 +000014390$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014391
14392fi
14393
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014394# ************************************
14395# * Check for mathematical functions *
14396# ************************************
14397
14398LIBS_SAVE=$LIBS
14399LIBS="$LIBS $LIBM"
14400
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014401for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14402do :
14403 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14404ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014405if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014406 cat >>confdefs.h <<_ACEOF
14407#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14408_ACEOF
14409
14410fi
14411done
14412
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014413for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014414do :
14415 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14416ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014417if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014418 cat >>confdefs.h <<_ACEOF
14419#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14420_ACEOF
14421
14422fi
14423done
14424
14425ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14426"
Victor Stinnere0be4232011-10-25 13:06:09 +020014427if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014428 ac_have_decl=1
14429else
14430 ac_have_decl=0
14431fi
14432
14433cat >>confdefs.h <<_ACEOF
14434#define HAVE_DECL_ISINF $ac_have_decl
14435_ACEOF
14436ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14437"
Victor Stinnere0be4232011-10-25 13:06:09 +020014438if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014439 ac_have_decl=1
14440else
14441 ac_have_decl=0
14442fi
14443
14444cat >>confdefs.h <<_ACEOF
14445#define HAVE_DECL_ISNAN $ac_have_decl
14446_ACEOF
14447ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14448"
Victor Stinnere0be4232011-10-25 13:06:09 +020014449if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014450 ac_have_decl=1
14451else
14452 ac_have_decl=0
14453fi
14454
14455cat >>confdefs.h <<_ACEOF
14456#define HAVE_DECL_ISFINITE $ac_have_decl
14457_ACEOF
14458
14459
Mark Dickinsona614f042009-11-28 12:48:43 +000014460# For multiprocessing module, check that sem_open
14461# actually works. For FreeBSD versions <= 7.2,
14462# the kernel module that provides POSIX semaphores
14463# isn't loaded by default, so an attempt to call
14464# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14466$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014471 ac_cv_posix_semaphores_enabled=yes
14472else
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014474/* end confdefs.h. */
14475
14476#include <unistd.h>
14477#include <fcntl.h>
14478#include <stdio.h>
14479#include <semaphore.h>
14480#include <sys/stat.h>
14481
14482int main(void) {
14483 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14484 if (a == SEM_FAILED) {
14485 perror("sem_open");
14486 return 1;
14487 }
14488 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014489 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014490 return 0;
14491}
14492
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014495 ac_cv_posix_semaphores_enabled=yes
14496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014501fi
14502
14503
Mark Dickinsona614f042009-11-28 12:48:43 +000014504fi
14505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14507$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014508if test $ac_cv_posix_semaphores_enabled = no
14509then
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014512
14513fi
14514
Mark Dickinson10683072009-04-18 21:18:19 +000014515# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14517$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014522 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014525/* end confdefs.h. */
14526
14527#include <unistd.h>
14528#include <fcntl.h>
14529#include <stdio.h>
14530#include <semaphore.h>
14531#include <sys/stat.h>
14532
14533int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014534 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014535 int count;
14536 int res;
14537 if(a==SEM_FAILED){
14538 perror("sem_open");
14539 return 1;
14540
14541 }
14542 res = sem_getvalue(a, &count);
14543 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014544 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014545 return res==-1 ? 1 : 0;
14546}
14547
Mark Dickinson10683072009-04-18 21:18:19 +000014548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014550 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014556fi
14557
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014559fi
14560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14562$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014563if test $ac_cv_broken_sem_getvalue = yes
14564then
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014567
14568fi
14569
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014570ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14571"
14572if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14573 ac_have_decl=1
14574else
14575 ac_have_decl=0
14576fi
14577
14578cat >>confdefs.h <<_ACEOF
14579#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14580_ACEOF
14581ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14582"
14583if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14584 ac_have_decl=1
14585else
14586 ac_have_decl=0
14587fi
14588
14589cat >>confdefs.h <<_ACEOF
14590#define HAVE_DECL_RTLD_NOW $ac_have_decl
14591_ACEOF
14592ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14593"
14594if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14595 ac_have_decl=1
14596else
14597 ac_have_decl=0
14598fi
14599
14600cat >>confdefs.h <<_ACEOF
14601#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14602_ACEOF
14603ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14604"
14605if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14606 ac_have_decl=1
14607else
14608 ac_have_decl=0
14609fi
14610
14611cat >>confdefs.h <<_ACEOF
14612#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14613_ACEOF
14614ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14615"
14616if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14617 ac_have_decl=1
14618else
14619 ac_have_decl=0
14620fi
14621
14622cat >>confdefs.h <<_ACEOF
14623#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14624_ACEOF
14625ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14626"
14627if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14628 ac_have_decl=1
14629else
14630 ac_have_decl=0
14631fi
14632
14633cat >>confdefs.h <<_ACEOF
14634#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14635_ACEOF
14636ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14637"
14638if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14639 ac_have_decl=1
14640else
14641 ac_have_decl=0
14642fi
14643
14644cat >>confdefs.h <<_ACEOF
14645#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14646_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014647ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14648"
14649if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14650 ac_have_decl=1
14651else
14652 ac_have_decl=0
14653fi
14654
14655cat >>confdefs.h <<_ACEOF
14656#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14657_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014658
14659
Mark Dickinsonbd792642009-03-18 20:06:12 +000014660# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14662$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014663# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014664if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014665 enableval=$enable_big_digits; case $enable_big_digits in
14666yes)
14667 enable_big_digits=30 ;;
14668no)
14669 enable_big_digits=15 ;;
1467015|30)
14671 ;;
14672*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014673 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 +000014674esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14676$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014677
14678cat >>confdefs.h <<_ACEOF
14679#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14680_ACEOF
14681
14682
14683else
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14685$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014686fi
14687
14688
Guido van Rossumef2255b2000-03-10 22:30:29 +000014689# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014690ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014691if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014692
14693
Matthias Kloseb9621712010-04-24 17:59:49 +000014694$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014696 wchar_h="yes"
14697
Guido van Rossumef2255b2000-03-10 22:30:29 +000014698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014700
14701fi
14702
Michael W. Hudson54241132001-12-07 15:38:26 +000014703
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014705# determine wchar_t size
14706if test "$wchar_h" = yes
14707then
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14713$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014714if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14718"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014719
Martin v. Löwis11437992002-04-12 09:54:03 +000014720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 if test "$ac_cv_type_wchar_t" = yes; then
14722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014724as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014725See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726 else
14727 ac_cv_sizeof_wchar_t=0
14728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14733$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734
14735
14736
Martin v. Löwis11437992002-04-12 09:54:03 +000014737cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014738#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014739_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014740
Michael W. Hudson54241132001-12-07 15:38:26 +000014741
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014742fi
14743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14745$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014746have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014748/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014749
14750#include <tcl.h>
14751#if TCL_UTF_MAX != 6
14752# error "NOT UCS4_TCL"
14753#endif
14754int
14755main ()
14756{
14757
14758 ;
14759 return 0;
14760}
14761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014763
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014766
14767 have_ucs4_tcl=yes
14768
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14772$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014773
Skip Montanaro6dead952003-09-25 14:50:04 +000014774# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014775if test "$wchar_h" = yes
14776then
14777 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14779$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014780 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014782else
14783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014785 ac_cv_wchar_t_signed=yes
14786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014788/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014789
14790 #include <wchar.h>
14791 int main()
14792 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014793 /* Success: exit code 0 */
14794 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014795 }
14796
14797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014798if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014799 ac_cv_wchar_t_signed=yes
14800else
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014805fi
14806
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014807fi
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14810$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811fi
14812
Michael Osipov3738fad2018-08-24 18:17:19 +020014813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14814$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014815# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014816if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014817 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014818then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Michael Osipov3738fad2018-08-24 18:17:19 +020014822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14823$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014824else
Michael Osipov3738fad2018-08-24 18:17:19 +020014825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14826$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014827fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014828
14829# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14831$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014832if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_c_bigendian=unknown
14836 # See if we're dealing with a universal compiler.
14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838/* end confdefs.h. */
14839#ifndef __APPLE_CC__
14840 not a universal capable compiler
14841 #endif
14842 typedef int dummy;
14843
Skip Montanaro6dead952003-09-25 14:50:04 +000014844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014845if ac_fn_c_try_compile "$LINENO"; then :
14846
14847 # Check for potential -arch flags. It is not universal unless
14848 # there are at least two -arch flags with different values.
14849 ac_arch=
14850 ac_prev=
14851 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14852 if test -n "$ac_prev"; then
14853 case $ac_word in
14854 i?86 | x86_64 | ppc | ppc64)
14855 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14856 ac_arch=$ac_word
14857 else
14858 ac_cv_c_bigendian=universal
14859 break
14860 fi
14861 ;;
14862 esac
14863 ac_prev=
14864 elif test "x$ac_word" = "x-arch"; then
14865 ac_prev=arch
14866 fi
14867 done
14868fi
14869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14870 if test $ac_cv_c_bigendian = unknown; then
14871 # See if sys/param.h defines the BYTE_ORDER macro.
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014873/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014874#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014876
Martin v. Löwis11437992002-04-12 09:54:03 +000014877int
14878main ()
14879{
Matthias Kloseb9621712010-04-24 17:59:49 +000014880#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14881 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14882 && LITTLE_ENDIAN)
14883 bogus endian macros
14884 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014885
14886 ;
14887 return 0;
14888}
14889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014890if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014891 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014893/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014894#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014896
Martin v. Löwis11437992002-04-12 09:54:03 +000014897int
14898main ()
14899{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 not big endian
14902 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014903
14904 ;
14905 return 0;
14906}
14907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014908if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014909 ac_cv_c_bigendian=yes
14910else
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014914fi
14915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14916 fi
14917 if test $ac_cv_c_bigendian = unknown; then
14918 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014921#include <limits.h>
14922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923int
14924main ()
14925{
Matthias Kloseb9621712010-04-24 17:59:49 +000014926#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14927 bogus endian macros
14928 #endif
14929
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ;
14931 return 0;
14932}
14933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934if ac_fn_c_try_compile "$LINENO"; then :
14935 # It does; now see whether it defined to _BIG_ENDIAN or not.
14936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14937/* end confdefs.h. */
14938#include <limits.h>
14939
14940int
14941main ()
14942{
14943#ifndef _BIG_ENDIAN
14944 not big endian
14945 #endif
14946
14947 ;
14948 return 0;
14949}
14950_ACEOF
14951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014953else
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14957fi
14958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14959 fi
14960 if test $ac_cv_c_bigendian = unknown; then
14961 # Compile a test program.
14962 if test "$cross_compiling" = yes; then :
14963 # Try to guess by grepping values from an object file.
14964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14965/* end confdefs.h. */
14966short int ascii_mm[] =
14967 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14968 short int ascii_ii[] =
14969 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14970 int use_ascii (int i) {
14971 return ascii_mm[i] + ascii_ii[i];
14972 }
14973 short int ebcdic_ii[] =
14974 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14975 short int ebcdic_mm[] =
14976 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14977 int use_ebcdic (int i) {
14978 return ebcdic_mm[i] + ebcdic_ii[i];
14979 }
14980 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982int
14983main ()
14984{
14985return use_ascii (foo) == use_ebcdic (foo);
14986 ;
14987 return 0;
14988}
14989_ACEOF
14990if ac_fn_c_try_compile "$LINENO"; then :
14991 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14992 ac_cv_c_bigendian=yes
14993 fi
14994 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14995 if test "$ac_cv_c_bigendian" = unknown; then
14996 ac_cv_c_bigendian=no
14997 else
14998 # finding both strings is unlikely to happen, but who knows?
14999 ac_cv_c_bigendian=unknown
15000 fi
15001 fi
15002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015004else
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015008int
15009main ()
15010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 /* Are we little or big endian? From Harbison&Steele. */
15013 union
15014 {
15015 long int l;
15016 char c[sizeof (long int)];
15017 } u;
15018 u.l = 1;
15019 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020
15021 ;
15022 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015023}
Martin v. Löwis11437992002-04-12 09:54:03 +000015024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015025if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015026 ac_cv_c_bigendian=no
15027else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15031 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15037$as_echo "$ac_cv_c_bigendian" >&6; }
15038 case $ac_cv_c_bigendian in #(
15039 yes)
15040 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15041;; #(
15042 no)
15043 ;; #(
15044 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 ;; #(
15049 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015050 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015051 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053
Michael W. Hudson54241132001-12-07 15:38:26 +000015054
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015055# ABI version string for Python extension modules. This appears between the
15056# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15057# from the following attributes which affect the ABI of this Python build (in
15058# this order):
15059#
15060# * The Python implementation (always 'cpython-' for us)
15061# * The major and minor version numbers
15062# * --with-pydebug (adds a 'd')
15063# * --with-pymalloc (adds a 'm')
15064# * --with-wide-unicode (adds a 'u')
15065#
15066# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015067# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15068# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015069
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15071$as_echo_n "checking ABIFLAGS... " >&6; }
15072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15073$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15075$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015076SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15078$as_echo "$SOABI" >&6; }
15079
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015080
15081case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015082 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015083 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15084 *)
15085 EXT_SUFFIX=${SHLIB_SUFFIX};;
15086esac
15087
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15089$as_echo_n "checking LDVERSION... " >&6; }
15090LDVERSION='$(VERSION)$(ABIFLAGS)'
15091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15092$as_echo "$LDVERSION" >&6; }
15093
doko@python.org87421192013-01-26 11:39:31 +010015094
doko@ubuntu.com55532312016-06-14 08:55:19 +020015095if test x$PLATFORM_TRIPLET = x; then
15096 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15097else
15098 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15099fi
doko@python.org87421192013-01-26 11:39:31 +010015100
15101
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015102# Check whether right shifting a negative integer extends the sign bit
15103# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15105$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015106if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015108else
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015111 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015112else
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015114/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015115
15116int main()
15117{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015118 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015119}
15120
Martin v. Löwis11437992002-04-12 09:54:03 +000015121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015122if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015123 ac_cv_rshift_extends_sign=yes
15124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015129fi
15130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131fi
15132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15134$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015135if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015136then
Martin v. Löwis11437992002-04-12 09:54:03 +000015137
Matthias Kloseb9621712010-04-24 17:59:49 +000015138$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015139
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015140fi
15141
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015142# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15144$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015145if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015150/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015151#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015152int
15153main ()
15154{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015155
15156 FILE *f = fopen("/dev/null", "r");
15157 flockfile(f);
15158 getc_unlocked(f);
15159 funlockfile(f);
15160
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ;
15162 return 0;
15163}
15164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015166 ac_cv_have_getc_unlocked=yes
15167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 ac_cv_have_getc_unlocked=no
15169fi
15170rm -f core conftest.err conftest.$ac_objext \
15171 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173
Matthias Kloseb9621712010-04-24 17:59:49 +000015174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15175$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015176if test "$ac_cv_have_getc_unlocked" = yes
15177then
Martin v. Löwis11437992002-04-12 09:54:03 +000015178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015180
15181fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015182
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015183# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015184# save the value of LIBS so we don't actually link Python with readline
15185LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015186
Gregory P. Smith18820942008-09-07 06:24:49 +000015187# On some systems we need to link readline to a termcap compatible
15188# library. NOTE: Keep the precedence of listed libraries synchronised
15189# with setup.py.
15190py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15192$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015193for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015194 if test -z "$py_libtermcap"; then
15195 READLINE_LIBS="-lreadline"
15196 else
15197 READLINE_LIBS="-lreadline -l$py_libtermcap"
15198 fi
15199 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015201/* end confdefs.h. */
15202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203/* Override any GCC internal prototype to avoid an error.
15204 Use char because int might match the return type of a GCC
15205 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015206#ifdef __cplusplus
15207extern "C"
15208#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015209char readline ();
15210int
15211main ()
15212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015214 ;
15215 return 0;
15216}
15217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015218if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015219 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015221rm -f core conftest.err conftest.$ac_objext \
15222 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015223 if test $py_cv_lib_readline = yes; then
15224 break
15225 fi
15226done
15227# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15228#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015229if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15231$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015232else
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15234$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015237
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015238fi
15239
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015240# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015242/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015243#include <readline/readline.h>
15244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015245if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015246 have_readline=yes
15247else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015248 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015249
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015250fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015251rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015252if test $have_readline = yes
15253then
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015255/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015256#include <readline/readline.h>
15257
15258_ACEOF
15259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015263
15264fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015265rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015268/* end confdefs.h. */
15269#include <readline/readline.h>
15270
15271_ACEOF
15272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015274
Matthias Kloseb9621712010-04-24 17:59:49 +000015275$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015276
15277fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015278rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015279
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015280fi
15281
Martin v. Löwis0daad592001-09-30 21:09:59 +000015282# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15284$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015285if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015287else
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015289LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296#ifdef __cplusplus
15297extern "C"
15298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015299char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015300int
15301main ()
15302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ;
15305 return 0;
15306}
15307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015310else
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015313rm -f core conftest.err conftest.$ac_objext \
15314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015315LIBS=$ac_check_lib_save_LIBS
15316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15318$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015319if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015322
Martin v. Löwis0daad592001-09-30 21:09:59 +000015323fi
15324
Michael W. Hudson54241132001-12-07 15:38:26 +000015325
Thomas Wouters89d996e2007-09-08 17:39:28 +000015326# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15328$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015329if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015331else
15332 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015333LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015335/* end confdefs.h. */
15336
15337/* Override any GCC internal prototype to avoid an error.
15338 Use char because int might match the return type of a GCC
15339 builtin and then its argument prototype would still apply. */
15340#ifdef __cplusplus
15341extern "C"
15342#endif
15343char rl_completion_display_matches_hook ();
15344int
15345main ()
15346{
15347return rl_completion_display_matches_hook ();
15348 ;
15349 return 0;
15350}
15351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015352if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015353 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15354else
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015357rm -f core conftest.err conftest.$ac_objext \
15358 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015359LIBS=$ac_check_lib_save_LIBS
15360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15362$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015363if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015366
15367fi
15368
15369
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015370# also in 4.0, but not in editline
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15372$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15373if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15374 $as_echo_n "(cached) " >&6
15375else
15376 ac_check_lib_save_LIBS=$LIBS
15377LIBS="-lreadline $READLINE_LIBS $LIBS"
15378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15379/* end confdefs.h. */
15380
15381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
15384#ifdef __cplusplus
15385extern "C"
15386#endif
15387char rl_resize_terminal ();
15388int
15389main ()
15390{
15391return rl_resize_terminal ();
15392 ;
15393 return 0;
15394}
15395_ACEOF
15396if ac_fn_c_try_link "$LINENO"; then :
15397 ac_cv_lib_readline_rl_resize_terminal=yes
15398else
15399 ac_cv_lib_readline_rl_resize_terminal=no
15400fi
15401rm -f core conftest.err conftest.$ac_objext \
15402 conftest$ac_exeext conftest.$ac_ext
15403LIBS=$ac_check_lib_save_LIBS
15404fi
15405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15406$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15407if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15408
15409$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15410
15411fi
15412
15413
Martin v. Löwis0daad592001-09-30 21:09:59 +000015414# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15416$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015417if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015419else
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015421LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425/* Override any GCC internal prototype to avoid an error.
15426 Use char because int might match the return type of a GCC
15427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015428#ifdef __cplusplus
15429extern "C"
15430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015431char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015432int
15433main ()
15434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ;
15437 return 0;
15438}
15439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015445rm -f core conftest.err conftest.$ac_objext \
15446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015447LIBS=$ac_check_lib_save_LIBS
15448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15450$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015451if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015454
Guido van Rossum353ae582001-07-10 16:45:32 +000015455fi
15456
Jack Jansendd19cf82001-12-06 22:36:17 +000015457
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015458# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015460/* end confdefs.h. */
15461#include <readline/readline.h>
15462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015463if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015464 have_readline=yes
15465else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015466 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015467
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015468fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015469rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015470if test $have_readline = yes
15471then
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015473/* end confdefs.h. */
15474#include <readline/readline.h>
15475
15476_ACEOF
15477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015479
Matthias Kloseb9621712010-04-24 17:59:49 +000015480$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015481
15482fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015483rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015484
15485fi
15486
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15488$as_echo_n "checking for append_history in -lreadline... " >&6; }
15489if ${ac_cv_lib_readline_append_history+:} false; then :
15490 $as_echo_n "(cached) " >&6
15491else
15492 ac_check_lib_save_LIBS=$LIBS
15493LIBS="-lreadline $READLINE_LIBS $LIBS"
15494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495/* end confdefs.h. */
15496
15497/* Override any GCC internal prototype to avoid an error.
15498 Use char because int might match the return type of a GCC
15499 builtin and then its argument prototype would still apply. */
15500#ifdef __cplusplus
15501extern "C"
15502#endif
15503char append_history ();
15504int
15505main ()
15506{
15507return append_history ();
15508 ;
15509 return 0;
15510}
15511_ACEOF
15512if ac_fn_c_try_link "$LINENO"; then :
15513 ac_cv_lib_readline_append_history=yes
15514else
15515 ac_cv_lib_readline_append_history=no
15516fi
15517rm -f core conftest.err conftest.$ac_objext \
15518 conftest$ac_exeext conftest.$ac_ext
15519LIBS=$ac_check_lib_save_LIBS
15520fi
15521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15522$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15523if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15524
15525$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15526
15527fi
15528
15529
Martin v. Löwis82bca632006-02-10 20:49:30 +000015530# End of readline checks: restore LIBS
15531LIBS=$LIBS_no_readline
15532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15534$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015535if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015537else
Martin v. Löwis11437992002-04-12 09:54:03 +000015538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015540 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015543/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015544
15545int main()
15546{
15547 int val1 = nice(1);
15548 if (val1 != -1 && val1 == nice(2))
15549 exit(0);
15550 exit(1);
15551}
15552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015554if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015555 ac_cv_broken_nice=yes
15556else
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +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
Thomas Wouterse38b2f12001-07-11 22:35:31 +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_broken_nice" >&5
15566$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015567if test "$ac_cv_broken_nice" = yes
15568then
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
Matthias Kloseb9621712010-04-24 17:59:49 +000015570$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015571
15572fi
15573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15575$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015576if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015578else
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015580 ac_cv_broken_poll=no
15581else
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015583/* end confdefs.h. */
15584
15585#include <poll.h>
15586
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015587int main()
15588{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015589 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015590 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015591
15592 close (42);
15593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015594 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015595 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015596 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015597 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015598 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015599 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015600 return 1;
15601}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015602
15603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015604if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015605 ac_cv_broken_poll=yes
15606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015613fi
15614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15616$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015617if test "$ac_cv_broken_poll" = yes
15618then
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015621
15622fi
15623
Martin v. Löwis1d459062005-03-14 21:23:33 +000015624# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15626$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015627if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015629else
15630
Matthias Kloseb9621712010-04-24 17:59:49 +000015631if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015632 ac_cv_working_tzset=no
15633else
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015635/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015636
15637#include <stdlib.h>
15638#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015639#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015640
15641#if HAVE_TZNAME
15642extern char *tzname[];
15643#endif
15644
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015645int main()
15646{
Brett Cannon18367812003-09-19 00:59:16 +000015647 /* Note that we need to ensure that not only does tzset(3)
15648 do 'something' with localtime, but it works as documented
15649 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015650 This includes making sure that tzname is set properly if
15651 tm->tm_zone does not exist since it is the alternative way
15652 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015653
15654 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015655 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015656 */
15657
Martin v. Löwis1d459062005-03-14 21:23:33 +000015658 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015659 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15660
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015661 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015662 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015663 if (localtime(&groundhogday)->tm_hour != 0)
15664 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015665#if HAVE_TZNAME
15666 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15667 if (strcmp(tzname[0], "UTC") ||
15668 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15669 exit(1);
15670#endif
Brett Cannon18367812003-09-19 00:59:16 +000015671
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015672 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015673 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015674 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015675 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015676#if HAVE_TZNAME
15677 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15678 exit(1);
15679#endif
Brett Cannon18367812003-09-19 00:59:16 +000015680
15681 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15682 tzset();
15683 if (localtime(&groundhogday)->tm_hour != 11)
15684 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015685#if HAVE_TZNAME
15686 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15687 exit(1);
15688#endif
15689
15690#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015691 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15692 exit(1);
15693 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15694 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015695#endif
Brett Cannon18367812003-09-19 00:59:16 +000015696
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015697 exit(0);
15698}
15699
15700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015701if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015702 ac_cv_working_tzset=yes
15703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015708fi
15709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710fi
15711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15713$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015714if test "$ac_cv_working_tzset" = yes
15715then
15716
Matthias Kloseb9621712010-04-24 17:59:49 +000015717$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015718
15719fi
15720
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015721# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15723$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015724if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015726else
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015728/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015729#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015730int
15731main ()
15732{
15733
15734struct stat st;
15735st.st_mtim.tv_nsec = 1;
15736
15737 ;
15738 return 0;
15739}
15740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015742 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15747fi
15748
Matthias Kloseb9621712010-04-24 17:59:49 +000015749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15750$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015751if test "$ac_cv_stat_tv_nsec" = yes
15752then
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015755
15756fi
15757
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015758# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15760$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015761if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015763else
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015765/* end confdefs.h. */
15766#include <sys/stat.h>
15767int
15768main ()
15769{
15770
15771struct stat st;
15772st.st_mtimespec.tv_nsec = 1;
15773
15774 ;
15775 return 0;
15776}
15777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015779 ac_cv_stat_tv_nsec2=yes
15780else
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784fi
15785
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15787$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015788if test "$ac_cv_stat_tv_nsec2" = yes
15789then
15790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015792
15793fi
15794
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015795# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015796ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015797if test "$cross_compiling" = no; then
15798 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15799fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015800
15801for ac_header in curses.h ncurses.h
15802do :
15803 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15804ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15805if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15806 cat >>confdefs.h <<_ACEOF
15807#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15808_ACEOF
15809
15810fi
15811
15812done
15813
15814
15815# On Solaris, term.h requires curses.h
15816for ac_header in term.h
15817do :
15818 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15819#ifdef HAVE_CURSES_H
15820#include <curses.h>
15821#endif
15822
15823"
15824if test "x$ac_cv_header_term_h" = xyes; then :
15825 cat >>confdefs.h <<_ACEOF
15826#define HAVE_TERM_H 1
15827_ACEOF
15828
15829fi
15830
15831done
15832
15833
Jack Jansen666b1e72001-10-31 12:11:48 +000015834# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15836$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015837if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015839else
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015841/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015842#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015843int
15844main ()
15845{
Jack Jansen666b1e72001-10-31 12:11:48 +000015846
15847 int rtn;
15848 rtn = mvwdelch(0,0,0);
15849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 ;
15851 return 0;
15852}
15853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015854if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015855 ac_cv_mvwdelch_is_expression=yes
15856else
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15860fi
15861
Matthias Kloseb9621712010-04-24 17:59:49 +000015862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15863$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015864
15865if test "$ac_cv_mvwdelch_is_expression" = yes
15866then
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015869
15870fi
15871
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015872# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15873# structs since version 5.7. If the macro is defined as zero before including
15874# [n]curses.h, ncurses will expose fields of the structs regardless of the
15875# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15877$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015878if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015880else
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015882/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015883
15884 #define NCURSES_OPAQUE 0
15885 #include <curses.h>
15886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887int
15888main ()
15889{
Jack Jansen666b1e72001-10-31 12:11:48 +000015890
15891 WINDOW *w;
15892 w->_flags = 0;
15893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 ;
15895 return 0;
15896}
15897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015898if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015899 ac_cv_window_has_flags=yes
15900else
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15904fi
15905
Matthias Kloseb9621712010-04-24 17:59:49 +000015906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15907$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Jack Jansen666b1e72001-10-31 12:11:48 +000015909
15910if test "$ac_cv_window_has_flags" = yes
15911then
Martin v. Löwis11437992002-04-12 09:54:03 +000015912
Matthias Kloseb9621712010-04-24 17:59:49 +000015913$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015914
15915fi
15916
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15918$as_echo_n "checking for is_pad... " >&6; }
15919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920/* end confdefs.h. */
15921#include <curses.h>
15922int
15923main ()
15924{
15925
15926#ifndef is_pad
15927void *x=is_pad
15928#endif
15929
15930 ;
15931 return 0;
15932}
15933_ACEOF
15934if ac_fn_c_try_compile "$LINENO"; then :
15935
15936$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15937
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15939$as_echo "yes" >&6; }
15940else
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942$as_echo "no" >&6; }
15943
15944fi
15945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15948$as_echo_n "checking for is_term_resized... " >&6; }
15949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015950/* end confdefs.h. */
15951#include <curses.h>
15952int
15953main ()
15954{
15955void *x=is_term_resized
15956 ;
15957 return 0;
15958}
15959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015960if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015961
Matthias Kloseb9621712010-04-24 17:59:49 +000015962$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015963
Matthias Kloseb159a552010-04-25 21:00:44 +000015964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015965$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966else
Matthias Kloseb9621712010-04-24 17:59:49 +000015967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15968$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015969
15970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15974$as_echo_n "checking for resize_term... " >&6; }
15975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015976/* end confdefs.h. */
15977#include <curses.h>
15978int
15979main ()
15980{
15981void *x=resize_term
15982 ;
15983 return 0;
15984}
15985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015986if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015987
Matthias Kloseb9621712010-04-24 17:59:49 +000015988$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989
Matthias Kloseb159a552010-04-25 21:00:44 +000015990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015991$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992else
Matthias Kloseb9621712010-04-24 17:59:49 +000015993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015995
15996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16000$as_echo_n "checking for resizeterm... " >&6; }
16001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016002/* end confdefs.h. */
16003#include <curses.h>
16004int
16005main ()
16006{
16007void *x=resizeterm
16008 ;
16009 return 0;
16010}
16011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016012if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015
Matthias Kloseb159a552010-04-25 21:00:44 +000016016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016017$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018else
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016021
16022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016024
16025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16026$as_echo_n "checking for immedok... " >&6; }
16027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028/* end confdefs.h. */
16029#include <curses.h>
16030int
16031main ()
16032{
16033
16034#ifndef immedok
16035void *x=immedok
16036#endif
16037
16038 ;
16039 return 0;
16040}
16041_ACEOF
16042if ac_fn_c_try_compile "$LINENO"; then :
16043
16044$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16045
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16047$as_echo "yes" >&6; }
16048else
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16050$as_echo "no" >&6; }
16051
16052fi
16053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16054
16055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16056$as_echo_n "checking for syncok... " >&6; }
16057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16058/* end confdefs.h. */
16059#include <curses.h>
16060int
16061main ()
16062{
16063
16064#ifndef syncok
16065void *x=syncok
16066#endif
16067
16068 ;
16069 return 0;
16070}
16071_ACEOF
16072if ac_fn_c_try_compile "$LINENO"; then :
16073
16074$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16075
16076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16077$as_echo "yes" >&6; }
16078else
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16080$as_echo "no" >&6; }
16081
16082fi
16083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16084
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16086$as_echo_n "checking for wchgat... " >&6; }
16087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16088/* end confdefs.h. */
16089#include <curses.h>
16090int
16091main ()
16092{
16093
16094#ifndef wchgat
16095void *x=wchgat
16096#endif
16097
16098 ;
16099 return 0;
16100}
16101_ACEOF
16102if ac_fn_c_try_compile "$LINENO"; then :
16103
16104$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16105
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16107$as_echo "yes" >&6; }
16108else
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110$as_echo "no" >&6; }
16111
16112fi
16113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16114
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16116$as_echo_n "checking for filter... " >&6; }
16117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16118/* end confdefs.h. */
16119#include <curses.h>
16120int
16121main ()
16122{
16123
16124#ifndef filter
16125void *x=filter
16126#endif
16127
16128 ;
16129 return 0;
16130}
16131_ACEOF
16132if ac_fn_c_try_compile "$LINENO"; then :
16133
16134$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16135
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16137$as_echo "yes" >&6; }
16138else
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16140$as_echo "no" >&6; }
16141
16142fi
16143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144
16145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16146$as_echo_n "checking for has_key... " >&6; }
16147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148/* end confdefs.h. */
16149#include <curses.h>
16150int
16151main ()
16152{
16153
16154#ifndef has_key
16155void *x=has_key
16156#endif
16157
16158 ;
16159 return 0;
16160}
16161_ACEOF
16162if ac_fn_c_try_compile "$LINENO"; then :
16163
16164$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16165
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16167$as_echo "yes" >&6; }
16168else
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170$as_echo "no" >&6; }
16171
16172fi
16173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16174
16175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16176$as_echo_n "checking for typeahead... " >&6; }
16177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178/* end confdefs.h. */
16179#include <curses.h>
16180int
16181main ()
16182{
16183
16184#ifndef typeahead
16185void *x=typeahead
16186#endif
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
16192if ac_fn_c_try_compile "$LINENO"; then :
16193
16194$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16195
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16197$as_echo "yes" >&6; }
16198else
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16200$as_echo "no" >&6; }
16201
16202fi
16203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16204
16205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16206$as_echo_n "checking for use_env... " >&6; }
16207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16208/* end confdefs.h. */
16209#include <curses.h>
16210int
16211main ()
16212{
16213
16214#ifndef use_env
16215void *x=use_env
16216#endif
16217
16218 ;
16219 return 0;
16220}
16221_ACEOF
16222if ac_fn_c_try_compile "$LINENO"; then :
16223
16224$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16225
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16227$as_echo "yes" >&6; }
16228else
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230$as_echo "no" >&6; }
16231
16232fi
16233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016234# last curses configure check
16235CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16238$as_echo "$as_me: checking for device files" >&6;}
16239
16240if test "x$cross_compiling" = xyes; then
16241 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16243$as_echo_n "checking for /dev/ptmx... " >&6; }
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16245$as_echo "not set" >&6; }
16246 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16247 fi
16248 if test "${ac_cv_file__dev_ptc+set}" != set; then
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16250$as_echo_n "checking for /dev/ptc... " >&6; }
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16252$as_echo "not set" >&6; }
16253 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16254 fi
16255fi
16256
Matthias Kloseb9621712010-04-24 17:59:49 +000016257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16258$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016259if ${ac_cv_file__dev_ptmx+:} false; then :
16260 $as_echo_n "(cached) " >&6
16261else
16262 test "$cross_compiling" = yes &&
16263 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16264if test -r "/dev/ptmx"; then
16265 ac_cv_file__dev_ptmx=yes
16266else
16267 ac_cv_file__dev_ptmx=no
16268fi
16269fi
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16271$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16272if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016273
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016274fi
16275
16276if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016277
Matthias Kloseb9621712010-04-24 17:59:49 +000016278$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016279
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16282$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016283if ${ac_cv_file__dev_ptc+:} false; then :
16284 $as_echo_n "(cached) " >&6
16285else
16286 test "$cross_compiling" = yes &&
16287 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16288if test -r "/dev/ptc"; then
16289 ac_cv_file__dev_ptc=yes
16290else
16291 ac_cv_file__dev_ptc=no
16292fi
16293fi
16294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16295$as_echo "$ac_cv_file__dev_ptc" >&6; }
16296if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016297
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016298fi
16299
16300if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016301
Matthias Kloseb9621712010-04-24 17:59:49 +000016302$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016303
Neal Norwitz865400f2003-03-21 01:42:58 +000016304fi
16305
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016306if test $ac_sys_system = Darwin
16307then
16308 LIBS="$LIBS -framework CoreFoundation"
16309fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016310
Matthias Kloseb9621712010-04-24 17:59:49 +000016311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16312$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016313if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016314 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016315else
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016317 ac_cv_have_size_t_format="cross -- assuming yes"
16318
Thomas Wouters477c8d52006-05-27 19:21:47 +000016319else
Matthias Kloseb9621712010-04-24 17:59:49 +000016320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016321/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016322
Thomas Wouters477c8d52006-05-27 19:21:47 +000016323#include <stdio.h>
16324#include <stddef.h>
16325#include <string.h>
16326
Christian Heimes2c181612007-12-17 20:04:13 +000016327#ifdef HAVE_SYS_TYPES_H
16328#include <sys/types.h>
16329#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016330
16331#ifdef HAVE_SSIZE_T
16332typedef ssize_t Py_ssize_t;
16333#elif SIZEOF_VOID_P == SIZEOF_LONG
16334typedef long Py_ssize_t;
16335#else
16336typedef int Py_ssize_t;
16337#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016338
Christian Heimes2c181612007-12-17 20:04:13 +000016339int main()
16340{
16341 char buffer[256];
16342
Thomas Wouters477c8d52006-05-27 19:21:47 +000016343 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16344 return 1;
16345
Thomas Wouters89f507f2006-12-13 04:49:30 +000016346 if (strcmp(buffer, "123"))
16347 return 1;
16348
16349 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16350 return 1;
16351
16352 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016353 return 1;
16354
16355 return 0;
16356}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016357
Thomas Wouters477c8d52006-05-27 19:21:47 +000016358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016359if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016360 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016361else
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016366fi
16367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16370$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016371if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016372
Matthias Kloseb9621712010-04-24 17:59:49 +000016373$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016374
16375fi
16376
Matthias Kloseb9621712010-04-24 17:59:49 +000016377ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016378#ifdef HAVE_SYS_TYPES_H
16379#include <sys/types.h>
16380#endif
16381#ifdef HAVE_SYS_SOCKET_H
16382#include <sys/socket.h>
16383#endif
16384
Matthias Kloseb9621712010-04-24 17:59:49 +000016385"
Victor Stinnere0be4232011-10-25 13:06:09 +020016386if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016387
Martin v. Löwis11437992002-04-12 09:54:03 +000016388else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016389
Matthias Kloseb9621712010-04-24 17:59:49 +000016390$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016391
16392fi
16393
Michael W. Hudson54241132001-12-07 15:38:26 +000016394
Matthias Kloseb9621712010-04-24 17:59:49 +000016395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16396$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016397if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016398 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016399else
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016401 ac_cv_broken_mbstowcs=no
16402else
Matthias Kloseb9621712010-04-24 17:59:49 +000016403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016404/* end confdefs.h. */
16405
Stefan Krah19c21392012-11-22 23:47:32 +010016406#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016407#include<stdlib.h>
16408int main() {
16409 size_t len = -1;
16410 const char *str = "text";
16411 len = mbstowcs(NULL, str, 0);
16412 return (len != 4);
16413}
16414
16415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016416if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016417 ac_cv_broken_mbstowcs=no
16418else
Matthias Kloseb9621712010-04-24 17:59:49 +000016419 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016423fi
16424
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016425fi
16426
Matthias Kloseb9621712010-04-24 17:59:49 +000016427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16428$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016429if test "$ac_cv_broken_mbstowcs" = yes
16430then
16431
Matthias Kloseb9621712010-04-24 17:59:49 +000016432$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016433
16434fi
16435
Antoine Pitroub52ec782009-01-25 16:34:23 +000016436# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16438$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016439
16440# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016441if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016442 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016443if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016444then
16445
Matthias Kloseb9621712010-04-24 17:59:49 +000016446$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016447
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16449$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016450fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016451if test "$withval" = no
16452then
16453
16454$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16455
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16457$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016458fi
16459
Antoine Pitrou042b1282010-08-13 21:15:58 +000016460else
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16462$as_echo "no value specified" >&6; }
16463fi
16464
Antoine Pitroub52ec782009-01-25 16:34:23 +000016465
Matthias Kloseb17289e2012-03-15 19:51:34 +010016466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16467$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16468if ${ac_cv_computed_gotos+:} false; then :
16469 $as_echo_n "(cached) " >&6
16470else
16471 if test "$cross_compiling" = yes; then :
16472 if test "${with_computed_gotos+set}" = set; then
16473 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16474 else
16475 ac_cv_computed_gotos=no
16476 fi
16477else
16478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16479/* end confdefs.h. */
16480
16481int main(int argc, char **argv)
16482{
16483 static void *targets[1] = { &&LABEL1 };
16484 goto LABEL2;
16485LABEL1:
16486 return 0;
16487LABEL2:
16488 goto *targets[0];
16489 return 1;
16490}
16491
16492_ACEOF
16493if ac_fn_c_try_run "$LINENO"; then :
16494 ac_cv_computed_gotos=yes
16495else
16496 ac_cv_computed_gotos=no
16497fi
16498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16499 conftest.$ac_objext conftest.beam conftest.$ac_ext
16500fi
16501
16502fi
16503
16504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16505$as_echo "$ac_cv_computed_gotos" >&6; }
16506case "$ac_cv_computed_gotos" in yes*)
16507
16508$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16509
16510esac
16511
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016512case $ac_sys_system in
16513AIX*)
16514
16515$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16516 ;;
16517esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016518
Michael W. Hudson54241132001-12-07 15:38:26 +000016519
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016520
16521
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016522for h in `(cd $srcdir;echo Python/thread_*.h)`
16523do
16524 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16525done
16526
Michael W. Hudson54241132001-12-07 15:38:26 +000016527
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016528SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16530$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016531for dir in $SRCDIRS; do
16532 if test ! -d $dir; then
16533 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016534 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016535done
Matthias Kloseb9621712010-04-24 17:59:49 +000016536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16537$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016538
Stefan Krah1919b7e2012-03-21 18:25:23 +010016539# Availability of -O2:
16540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16541$as_echo_n "checking for -O2... " >&6; }
16542saved_cflags="$CFLAGS"
16543CFLAGS="-O2"
16544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16545/* end confdefs.h. */
16546
16547int
16548main ()
16549{
16550
16551
16552 ;
16553 return 0;
16554}
16555_ACEOF
16556if ac_fn_c_try_compile "$LINENO"; then :
16557 have_O2=yes
16558else
16559 have_O2=no
16560fi
16561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16563$as_echo "$have_O2" >&6; }
16564CFLAGS="$saved_cflags"
16565
16566# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16567# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16569$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16570saved_cflags="$CFLAGS"
16571CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16572if test "$have_O2" = no; then
16573 CFLAGS=""
16574fi
16575if test "$cross_compiling" = yes; then :
16576 have_glibc_memmove_bug=undefined
16577else
16578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579/* end confdefs.h. */
16580
16581#include <stdio.h>
16582#include <stdlib.h>
16583#include <string.h>
16584void foo(void *p, void *q) { memmove(p, q, 19); }
16585int main() {
16586 char a[32] = "123456789000000000";
16587 foo(&a[9], a);
16588 if (strcmp(a, "123456789123456789000000000") != 0)
16589 return 1;
16590 foo(a, &a[9]);
16591 if (strcmp(a, "123456789000000000") != 0)
16592 return 1;
16593 return 0;
16594}
16595
16596_ACEOF
16597if ac_fn_c_try_run "$LINENO"; then :
16598 have_glibc_memmove_bug=no
16599else
16600 have_glibc_memmove_bug=yes
16601fi
16602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16603 conftest.$ac_objext conftest.beam conftest.$ac_ext
16604fi
16605
16606CFLAGS="$saved_cflags"
16607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16608$as_echo "$have_glibc_memmove_bug" >&6; }
16609if test "$have_glibc_memmove_bug" = yes; then
16610
16611$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16612
16613fi
16614
16615if test "$have_gcc_asm_for_x87" = yes; then
16616 # Some versions of gcc miscompile inline asm:
16617 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16618 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16619 case $CC in
16620 *gcc*)
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16622$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16623 saved_cflags="$CFLAGS"
16624 CFLAGS="-O2"
16625 if test "$cross_compiling" = yes; then :
16626 have_ipa_pure_const_bug=undefined
16627else
16628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629/* end confdefs.h. */
16630
16631 __attribute__((noinline)) int
16632 foo(int *p) {
16633 int r;
16634 asm ( "movl \$6, (%1)\n\t"
16635 "xorl %0, %0\n\t"
16636 : "=r" (r) : "r" (p) : "memory"
16637 );
16638 return r;
16639 }
16640 int main() {
16641 int p = 8;
16642 if ((foo(&p) ? : p) != 6)
16643 return 1;
16644 return 0;
16645 }
16646
16647_ACEOF
16648if ac_fn_c_try_run "$LINENO"; then :
16649 have_ipa_pure_const_bug=no
16650else
16651 have_ipa_pure_const_bug=yes
16652fi
16653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16654 conftest.$ac_objext conftest.beam conftest.$ac_ext
16655fi
16656
16657 CFLAGS="$saved_cflags"
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16659$as_echo "$have_ipa_pure_const_bug" >&6; }
16660 if test "$have_ipa_pure_const_bug" = yes; then
16661
16662$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16663
16664 fi
16665 ;;
16666 esac
16667fi
16668
Victor Stinner4f5366e2015-01-09 02:13:19 +010016669# Check for stdatomic.h
16670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16671$as_echo_n "checking for stdatomic.h... " >&6; }
16672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16673/* end confdefs.h. */
16674
16675
16676 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016677 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016678 int main() {
16679 int loaded_value = atomic_load(&value);
16680 return 0;
16681 }
16682
16683
16684_ACEOF
16685if ac_fn_c_try_link "$LINENO"; then :
16686 have_stdatomic_h=yes
16687else
16688 have_stdatomic_h=no
16689fi
16690rm -f core conftest.err conftest.$ac_objext \
16691 conftest$ac_exeext conftest.$ac_ext
16692
16693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16694$as_echo "$have_stdatomic_h" >&6; }
16695
16696if test "$have_stdatomic_h" = yes; then
16697
16698$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16699
16700fi
16701
16702# Check for GCC >= 4.7 __atomic builtins
16703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16704$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16706/* end confdefs.h. */
16707
16708
16709 volatile int val = 1;
16710 int main() {
16711 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16712 return 0;
16713 }
16714
16715
16716_ACEOF
16717if ac_fn_c_try_link "$LINENO"; then :
16718 have_builtin_atomic=yes
16719else
16720 have_builtin_atomic=no
16721fi
16722rm -f core conftest.err conftest.$ac_objext \
16723 conftest$ac_exeext conftest.$ac_ext
16724
16725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16726$as_echo "$have_builtin_atomic" >&6; }
16727
16728if test "$have_builtin_atomic" = yes; then
16729
16730$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16731
16732fi
16733
Ned Deily322f5ba2013-11-21 23:01:59 -080016734# ensurepip option
16735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16736$as_echo_n "checking for ensurepip... " >&6; }
16737
16738# Check whether --with-ensurepip was given.
16739if test "${with_ensurepip+set}" = set; then :
16740 withval=$with_ensurepip;
16741else
16742 with_ensurepip=upgrade
16743fi
16744
16745case $with_ensurepip in #(
16746 yes|upgrade) :
16747 ENSUREPIP=upgrade ;; #(
16748 install) :
16749 ENSUREPIP=install ;; #(
16750 no) :
16751 ENSUREPIP=no ;; #(
16752 *) :
16753 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16754esac
16755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16756$as_echo "$ENSUREPIP" >&6; }
16757
16758
Victor Stinner35a97c02015-03-08 02:59:09 +010016759# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16761$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763/* end confdefs.h. */
16764
16765
16766 #include <dirent.h>
16767
16768 int main() {
16769 struct dirent entry;
16770 return entry.d_type == DT_UNKNOWN;
16771 }
16772
16773
16774_ACEOF
16775if ac_fn_c_try_link "$LINENO"; then :
16776 have_dirent_d_type=yes
16777else
16778 have_dirent_d_type=no
16779fi
16780rm -f core conftest.err conftest.$ac_objext \
16781 conftest$ac_exeext conftest.$ac_ext
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16783$as_echo "$have_dirent_d_type" >&6; }
16784
16785if test "$have_dirent_d_type" = yes; then
16786
16787$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16788
16789fi
16790
Victor Stinner9eb57c52015-03-19 22:21:49 +010016791# check if the Linux getrandom() syscall is available
16792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16793$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16795/* end confdefs.h. */
16796
16797
Victor Stinner1b80b242016-04-12 22:34:58 +020016798 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016799 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016800 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016801
16802 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016803 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016804 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016805 const int flags = GRND_NONBLOCK;
16806 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016807 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016808 return 0;
16809 }
16810
16811
16812_ACEOF
16813if ac_fn_c_try_link "$LINENO"; then :
16814 have_getrandom_syscall=yes
16815else
16816 have_getrandom_syscall=no
16817fi
16818rm -f core conftest.err conftest.$ac_objext \
16819 conftest$ac_exeext conftest.$ac_ext
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16821$as_echo "$have_getrandom_syscall" >&6; }
16822
16823if test "$have_getrandom_syscall" = yes; then
16824
16825$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16826
16827fi
16828
Victor Stinner3abf44e2015-09-18 15:38:37 +020016829# check if the getrandom() function is available
16830# the test was written for the Solaris function of <sys/random.h>
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16832$as_echo_n "checking for the getrandom() function... " >&6; }
16833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16834/* end confdefs.h. */
16835
16836
16837 #include <sys/random.h>
16838
16839 int main() {
16840 char buffer[1];
16841 const size_t buflen = sizeof(buffer);
16842 const int flags = 0;
16843 /* ignore the result, Python checks for ENOSYS at runtime */
16844 (void)getrandom(buffer, buflen, flags);
16845 return 0;
16846 }
16847
16848
16849_ACEOF
16850if ac_fn_c_try_link "$LINENO"; then :
16851 have_getrandom=yes
16852else
16853 have_getrandom=no
16854fi
16855rm -f core conftest.err conftest.$ac_objext \
16856 conftest$ac_exeext conftest.$ac_ext
16857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16858$as_echo "$have_getrandom" >&6; }
16859
16860if test "$have_getrandom" = yes; then
16861
16862$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16863
16864fi
16865
Neil Schemenauer5741c452019-02-08 10:48:46 -080016866# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16867# shm_* may only be available if linking against librt
16868save_LIBS="$LIBS"
16869save_includes_default="$ac_includes_default"
16870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16871$as_echo_n "checking for library containing shm_open... " >&6; }
16872if ${ac_cv_search_shm_open+:} false; then :
16873 $as_echo_n "(cached) " >&6
16874else
16875 ac_func_search_save_LIBS=$LIBS
16876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16877/* end confdefs.h. */
16878
16879/* Override any GCC internal prototype to avoid an error.
16880 Use char because int might match the return type of a GCC
16881 builtin and then its argument prototype would still apply. */
16882#ifdef __cplusplus
16883extern "C"
16884#endif
16885char shm_open ();
16886int
16887main ()
16888{
16889return shm_open ();
16890 ;
16891 return 0;
16892}
16893_ACEOF
16894for ac_lib in '' rt; do
16895 if test -z "$ac_lib"; then
16896 ac_res="none required"
16897 else
16898 ac_res=-l$ac_lib
16899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16900 fi
16901 if ac_fn_c_try_link "$LINENO"; then :
16902 ac_cv_search_shm_open=$ac_res
16903fi
16904rm -f core conftest.err conftest.$ac_objext \
16905 conftest$ac_exeext
16906 if ${ac_cv_search_shm_open+:} false; then :
16907 break
16908fi
16909done
16910if ${ac_cv_search_shm_open+:} false; then :
16911
16912else
16913 ac_cv_search_shm_open=no
16914fi
16915rm conftest.$ac_ext
16916LIBS=$ac_func_search_save_LIBS
16917fi
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16919$as_echo "$ac_cv_search_shm_open" >&6; }
16920ac_res=$ac_cv_search_shm_open
16921if test "$ac_res" != no; then :
16922 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16923
16924fi
16925
16926if test "$ac_cv_search_shm_open" = "-lrt"; then
16927
16928$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16929
16930fi
16931for ac_header in sys/mman.h
16932do :
16933 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16934if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16935 cat >>confdefs.h <<_ACEOF
16936#define HAVE_SYS_MMAN_H 1
16937_ACEOF
16938
16939fi
16940
16941done
16942
16943# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16944ac_includes_default="\
16945${ac_includes_default}
16946#ifndef __cplusplus
16947# ifdef HAVE_SYS_MMAN_H
16948# include <sys/mman.h>
16949# endif
16950#endif
16951"
16952for ac_func in shm_open shm_unlink
16953do :
16954 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16955ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16956if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16957 cat >>confdefs.h <<_ACEOF
16958#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16959_ACEOF
16960
16961fi
16962done
16963
16964# we don't want to link with librt always, restore LIBS
16965LIBS="$save_LIBS"
16966ac_includes_default="$save_includes_default"
16967
Christian Heimesff5be6e2018-01-20 13:19:21 +010016968# Check for usable OpenSSL
16969
16970 found=false
16971
16972# Check whether --with-openssl was given.
16973if test "${with_openssl+set}" = set; then :
16974 withval=$with_openssl;
16975 case "$withval" in
16976 "" | y | ye | yes | n | no)
16977 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16978 ;;
16979 *) ssldirs="$withval"
16980 ;;
16981 esac
16982
16983else
16984
16985 # if pkg-config is installed and openssl has installed a .pc file,
16986 # then use that information and don't search ssldirs
16987 if test -n "$ac_tool_prefix"; then
16988 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16989set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16991$as_echo_n "checking for $ac_word... " >&6; }
16992if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16993 $as_echo_n "(cached) " >&6
16994else
16995 if test -n "$PKG_CONFIG"; then
16996 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16997else
16998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16999for as_dir in $PATH
17000do
17001 IFS=$as_save_IFS
17002 test -z "$as_dir" && as_dir=.
17003 for ac_exec_ext in '' $ac_executable_extensions; do
17004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17005 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17007 break 2
17008 fi
17009done
17010 done
17011IFS=$as_save_IFS
17012
17013fi
17014fi
17015PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17016if test -n "$PKG_CONFIG"; then
17017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17018$as_echo "$PKG_CONFIG" >&6; }
17019else
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17021$as_echo "no" >&6; }
17022fi
17023
17024
17025fi
17026if test -z "$ac_cv_prog_PKG_CONFIG"; then
17027 ac_ct_PKG_CONFIG=$PKG_CONFIG
17028 # Extract the first word of "pkg-config", so it can be a program name with args.
17029set dummy pkg-config; ac_word=$2
17030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17031$as_echo_n "checking for $ac_word... " >&6; }
17032if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17033 $as_echo_n "(cached) " >&6
17034else
17035 if test -n "$ac_ct_PKG_CONFIG"; then
17036 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17037else
17038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17039for as_dir in $PATH
17040do
17041 IFS=$as_save_IFS
17042 test -z "$as_dir" && as_dir=.
17043 for ac_exec_ext in '' $ac_executable_extensions; do
17044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17045 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17047 break 2
17048 fi
17049done
17050 done
17051IFS=$as_save_IFS
17052
17053fi
17054fi
17055ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17056if test -n "$ac_ct_PKG_CONFIG"; then
17057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17058$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17059else
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17061$as_echo "no" >&6; }
17062fi
17063
17064 if test "x$ac_ct_PKG_CONFIG" = x; then
17065 PKG_CONFIG=""
17066 else
17067 case $cross_compiling:$ac_tool_warned in
17068yes:)
17069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17071ac_tool_warned=yes ;;
17072esac
17073 PKG_CONFIG=$ac_ct_PKG_CONFIG
17074 fi
17075else
17076 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17077fi
17078
17079 if test x"$PKG_CONFIG" != x""; then
17080 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17081 if test $? = 0; then
17082 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17083 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17084 found=true
17085 fi
17086 fi
17087
17088 # no such luck; use some default ssldirs
17089 if ! $found; then
17090 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17091 fi
17092
17093
17094fi
17095
17096
17097
17098 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17099 # an 'openssl' subdirectory
17100
17101 if ! $found; then
17102 OPENSSL_INCLUDES=
17103 for ssldir in $ssldirs; do
17104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17105$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17106 if test -f "$ssldir/include/openssl/ssl.h"; then
17107 OPENSSL_INCLUDES="-I$ssldir/include"
17108 OPENSSL_LDFLAGS="-L$ssldir/lib"
17109 OPENSSL_LIBS="-lssl -lcrypto"
17110 found=true
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17112$as_echo "yes" >&6; }
17113 break
17114 else
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17116$as_echo "no" >&6; }
17117 fi
17118 done
17119
17120 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17121 # it will just work!
17122 fi
17123
17124 # try the preprocessor and linker with our new flags,
17125 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17126
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17128$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17129 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17130 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17131
17132 save_LIBS="$LIBS"
17133 save_LDFLAGS="$LDFLAGS"
17134 save_CPPFLAGS="$CPPFLAGS"
17135 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17136 LIBS="$OPENSSL_LIBS $LIBS"
17137 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17139/* end confdefs.h. */
17140#include <openssl/ssl.h>
17141int
17142main ()
17143{
17144SSL_new(NULL)
17145 ;
17146 return 0;
17147}
17148_ACEOF
17149if ac_fn_c_try_link "$LINENO"; then :
17150
17151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17152$as_echo "yes" >&6; }
17153 have_openssl=yes
17154
17155else
17156
17157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17158$as_echo "no" >&6; }
17159 have_openssl=no
17160
17161fi
17162rm -f core conftest.err conftest.$ac_objext \
17163 conftest$ac_exeext conftest.$ac_ext
17164 CPPFLAGS="$save_CPPFLAGS"
17165 LDFLAGS="$save_LDFLAGS"
17166 LIBS="$save_LIBS"
17167
17168
17169
17170
17171
17172
17173if test "$have_openssl" = yes; then
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17175$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17176
17177 save_LIBS="$LIBS"
17178 save_LDFLAGS="$LDFLAGS"
17179 save_CPPFLAGS="$CPPFLAGS"
17180 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17181 LIBS="$OPENSSL_LIBS $LIBS"
17182 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17183
17184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17185/* end confdefs.h. */
17186
17187 #include <openssl/x509_vfy.h>
17188
17189int
17190main ()
17191{
17192
17193 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17194 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17195 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17196 X509_VERIFY_PARAM_set_hostflags(p, 0);
17197
17198 ;
17199 return 0;
17200}
17201
17202_ACEOF
17203if ac_fn_c_try_link "$LINENO"; then :
17204
17205 ac_cv_has_x509_verify_param_set1_host=yes
17206
17207else
17208
17209 ac_cv_has_x509_verify_param_set1_host=no
17210
17211fi
17212rm -f core conftest.err conftest.$ac_objext \
17213 conftest$ac_exeext conftest.$ac_ext
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17215$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17216 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17217
17218$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17219
17220 fi
17221
17222 CPPFLAGS="$save_CPPFLAGS"
17223 LDFLAGS="$save_LDFLAGS"
17224 LIBS="$save_LIBS"
17225fi
17226
Christian Heimes892d66e2018-01-29 14:10:18 +010017227# ssl module default cipher suite string
17228
17229
17230
17231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17232$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17233
17234# Check whether --with-ssl-default-suites was given.
17235if test "${with_ssl_default_suites+set}" = set; then :
17236 withval=$with_ssl_default_suites;
17237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17238$as_echo "$withval" >&6; }
17239case "$withval" in
17240 python)
17241 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17242
17243 ;;
17244 openssl)
17245 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17246
17247 ;;
17248 *)
17249 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17250
17251 cat >>confdefs.h <<_ACEOF
17252#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17253_ACEOF
17254
17255 ;;
17256esac
17257
17258else
17259
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17261$as_echo "python" >&6; }
17262$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17263
17264
17265fi
17266
17267
17268
Guido van Rossum627b2d71993-12-24 10:39:16 +000017269# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017270ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017271
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017272ac_config_files="$ac_config_files Modules/ld_so_aix"
17273
Martin v. Löwis11437992002-04-12 09:54:03 +000017274cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017275# This file is a shell script that caches the results of configure
17276# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017277# scripts and configure runs, see configure's option --config-cache.
17278# It is not useful on other systems. If it contains results you don't
17279# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017280#
Martin v. Löwis11437992002-04-12 09:54:03 +000017281# config.status only pays attention to the cache file if you give it
17282# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017283#
Skip Montanaro6dead952003-09-25 14:50:04 +000017284# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017285# loading this file, other *unset* `ac_cv_foo' will be assigned the
17286# following values.
17287
17288_ACEOF
17289
Guido van Rossumf78abae1997-01-21 22:02:36 +000017290# The following way of writing the cache mishandles newlines in values,
17291# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017293# Ultrix sh set writes to stderr and can't be redirected directly,
17294# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295(
17296 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17297 eval ac_val=\$$ac_var
17298 case $ac_val in #(
17299 *${as_nl}*)
17300 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17302$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 esac
17304 case $ac_var in #(
17305 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017306 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17307 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308 esac ;;
17309 esac
17310 done
17311
Martin v. Löwis11437992002-04-12 09:54:03 +000017312 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17314 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017315 # `set' does not quote correctly, so add quotes: double-quote
17316 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017317 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017318 "s/'/'\\\\''/g;
17319 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 *)
17322 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 esac |
17326 sort
17327) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017328 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017332 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17333 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17335 :end' >>confcache
17336if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17337 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017338 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017339 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17340$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017341 if test ! -f "$cache_file" || test -h "$cache_file"; then
17342 cat confcache >"$cache_file"
17343 else
17344 case $cache_file in #(
17345 */* | ?:*)
17346 mv -f confcache "$cache_file"$$ &&
17347 mv -f "$cache_file"$$ "$cache_file" ;; #(
17348 *)
17349 mv -f confcache "$cache_file" ;;
17350 esac
17351 fi
17352 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017353 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17355$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017356 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017357fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017358rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017359
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017360test "x$prefix" = xNONE && prefix=$ac_default_prefix
17361# Let make expand exec_prefix.
17362test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017363
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017364DEFS=-DHAVE_CONFIG_H
17365
Skip Montanaro6dead952003-09-25 14:50:04 +000017366ac_libobjs=
17367ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017368U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017369for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17370 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17374 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17376 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017377done
17378LIBOBJS=$ac_libobjs
17379
17380LTLIBOBJS=$ac_ltlibobjs
17381
17382
Martin v. Löwis11437992002-04-12 09:54:03 +000017383
Matthias Kloseb9621712010-04-24 17:59:49 +000017384
Victor Stinnere0be4232011-10-25 13:06:09 +020017385: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017386ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017387ac_clean_files_save=$ac_clean_files
17388ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017389{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17390$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17391as_write_fail=0
17392cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017393#! $SHELL
17394# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017395# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017396# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017397# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017398
Martin v. Löwis11437992002-04-12 09:54:03 +000017399debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017400ac_cs_recheck=false
17401ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403SHELL=\${CONFIG_SHELL-$SHELL}
17404export SHELL
17405_ASEOF
17406cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17407## -------------------- ##
17408## M4sh Initialization. ##
17409## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411# Be more Bourne compatible
17412DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017413if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 emulate sh
17415 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017417 # is contrary to our usage. Disable this feature.
17418 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017420else
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 case `(set -o) 2>/dev/null` in #(
17422 *posix*) :
17423 set -o posix ;; #(
17424 *) :
17425 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017427fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017428
17429
Matthias Kloseb9621712010-04-24 17:59:49 +000017430as_nl='
17431'
17432export as_nl
17433# Printing a long string crashes Solaris 7 /usr/bin/printf.
17434as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17435as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17436as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17437# Prefer a ksh shell builtin over an external printf program on Solaris,
17438# but without wasting forks for bash or zsh.
17439if test -z "$BASH_VERSION$ZSH_VERSION" \
17440 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17441 as_echo='print -r --'
17442 as_echo_n='print -rn --'
17443elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17444 as_echo='printf %s\n'
17445 as_echo_n='printf %s'
17446else
17447 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17448 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17449 as_echo_n='/usr/ucb/echo -n'
17450 else
17451 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17452 as_echo_n_body='eval
17453 arg=$1;
17454 case $arg in #(
17455 *"$as_nl"*)
17456 expr "X$arg" : "X\\(.*\\)$as_nl";
17457 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17458 esac;
17459 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17460 '
17461 export as_echo_n_body
17462 as_echo_n='sh -c $as_echo_n_body as_echo'
17463 fi
17464 export as_echo_body
17465 as_echo='sh -c $as_echo_body as_echo'
17466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017467
17468# The user is always right.
17469if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 PATH_SEPARATOR=:
17471 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17472 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17473 PATH_SEPARATOR=';'
17474 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477
17478# IFS
17479# We need space, tab and new line, in precisely that order. Quoting is
17480# there to prevent editors from complaining about space-tab.
17481# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17482# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483IFS=" "" $as_nl"
17484
17485# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017486as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017487case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488 *[\\/]* ) as_myself=$0 ;;
17489 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017490for as_dir in $PATH
17491do
17492 IFS=$as_save_IFS
17493 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17495 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498 ;;
17499esac
17500# We did not find ourselves, most probably we were run as `sh COMMAND'
17501# in which case we are not to be found in the path.
17502if test "x$as_myself" = x; then
17503 as_myself=$0
17504fi
17505if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017506 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17507 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508fi
17509
Matthias Kloseb9621712010-04-24 17:59:49 +000017510# Unset variables that we do not need and which cause bugs (e.g. in
17511# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17512# suppresses any "Segmentation fault" message there. '((' could
17513# trigger a bug in pdksh 5.2.14.
17514for as_var in BASH_ENV ENV MAIL MAILPATH
17515do eval test x\${$as_var+set} = xset \
17516 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517done
17518PS1='$ '
17519PS2='> '
17520PS4='+ '
17521
17522# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017523LC_ALL=C
17524export LC_ALL
17525LANGUAGE=C
17526export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527
Matthias Kloseb9621712010-04-24 17:59:49 +000017528# CDPATH.
17529(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17530
17531
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017532# as_fn_error STATUS ERROR [LINENO LOG_FD]
17533# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017534# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17535# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017536# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017537as_fn_error ()
17538{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017539 as_status=$1; test $as_status -eq 0 && as_status=1
17540 if test "$4"; then
17541 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17542 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017544 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017545 as_fn_exit $as_status
17546} # as_fn_error
17547
17548
17549# as_fn_set_status STATUS
17550# -----------------------
17551# Set $? to STATUS, without forking.
17552as_fn_set_status ()
17553{
17554 return $1
17555} # as_fn_set_status
17556
17557# as_fn_exit STATUS
17558# -----------------
17559# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17560as_fn_exit ()
17561{
17562 set +e
17563 as_fn_set_status $1
17564 exit $1
17565} # as_fn_exit
17566
17567# as_fn_unset VAR
17568# ---------------
17569# Portably unset VAR.
17570as_fn_unset ()
17571{
17572 { eval $1=; unset $1;}
17573}
17574as_unset=as_fn_unset
17575# as_fn_append VAR VALUE
17576# ----------------------
17577# Append the text in VALUE to the end of the definition contained in VAR. Take
17578# advantage of any shell optimizations that allow amortized linear growth over
17579# repeated appends, instead of the typical quadratic growth present in naive
17580# implementations.
17581if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17582 eval 'as_fn_append ()
17583 {
17584 eval $1+=\$2
17585 }'
17586else
17587 as_fn_append ()
17588 {
17589 eval $1=\$$1\$2
17590 }
17591fi # as_fn_append
17592
17593# as_fn_arith ARG...
17594# ------------------
17595# Perform arithmetic evaluation on the ARGs, and store the result in the
17596# global $as_val. Take advantage of shells that can avoid forks. The arguments
17597# must be portable across $(()) and expr.
17598if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17599 eval 'as_fn_arith ()
17600 {
17601 as_val=$(( $* ))
17602 }'
17603else
17604 as_fn_arith ()
17605 {
17606 as_val=`expr "$@" || test $? -eq 1`
17607 }
17608fi # as_fn_arith
17609
17610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611if expr a : '\(a\)' >/dev/null 2>&1 &&
17612 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17613 as_expr=expr
17614else
17615 as_expr=false
17616fi
17617
17618if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17619 as_basename=basename
17620else
17621 as_basename=false
17622fi
17623
Matthias Kloseb9621712010-04-24 17:59:49 +000017624if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17625 as_dirname=dirname
17626else
17627 as_dirname=false
17628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630as_me=`$as_basename -- "$0" ||
17631$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17632 X"$0" : 'X\(//\)$' \| \
17633 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017634$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635 sed '/^.*\/\([^/][^/]*\)\/*$/{
17636 s//\1/
17637 q
17638 }
17639 /^X\/\(\/\/\)$/{
17640 s//\1/
17641 q
17642 }
17643 /^X\/\(\/\).*/{
17644 s//\1/
17645 q
17646 }
17647 s/.*/./; q'`
17648
Matthias Kloseb9621712010-04-24 17:59:49 +000017649# Avoid depending upon Character Ranges.
17650as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17651as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17652as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17653as_cr_digits='0123456789'
17654as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655
17656ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017657case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017659 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017661 xy) ECHO_C='\c';;
17662 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17663 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 esac;;
17665*)
17666 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017668
Martin v. Löwis11437992002-04-12 09:54:03 +000017669rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670if test -d conf$$.dir; then
17671 rm -f conf$$.dir/conf$$.file
17672else
17673 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017674 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017676if (echo >conf$$.file) 2>/dev/null; then
17677 if ln -s conf$$.file conf$$ 2>/dev/null; then
17678 as_ln_s='ln -s'
17679 # ... but there are two gotchas:
17680 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17681 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017682 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017683 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017684 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017685 elif ln conf$$.file conf$$ 2>/dev/null; then
17686 as_ln_s=ln
17687 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017688 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017690else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017691 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17694rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017695
Matthias Kloseb9621712010-04-24 17:59:49 +000017696
17697# as_fn_mkdir_p
17698# -------------
17699# Create "$as_dir" as a directory, including parents if necessary.
17700as_fn_mkdir_p ()
17701{
17702
17703 case $as_dir in #(
17704 -*) as_dir=./$as_dir;;
17705 esac
17706 test -d "$as_dir" || eval $as_mkdir_p || {
17707 as_dirs=
17708 while :; do
17709 case $as_dir in #(
17710 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17711 *) as_qdir=$as_dir;;
17712 esac
17713 as_dirs="'$as_qdir' $as_dirs"
17714 as_dir=`$as_dirname -- "$as_dir" ||
17715$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17716 X"$as_dir" : 'X\(//\)[^/]' \| \
17717 X"$as_dir" : 'X\(//\)$' \| \
17718 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17719$as_echo X"$as_dir" |
17720 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17721 s//\1/
17722 q
17723 }
17724 /^X\(\/\/\)[^/].*/{
17725 s//\1/
17726 q
17727 }
17728 /^X\(\/\/\)$/{
17729 s//\1/
17730 q
17731 }
17732 /^X\(\/\).*/{
17733 s//\1/
17734 q
17735 }
17736 s/.*/./; q'`
17737 test -d "$as_dir" && break
17738 done
17739 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017740 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017741
17742
17743} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017744if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017746else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017747 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017748 as_mkdir_p=false
17749fi
17750
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017751
17752# as_fn_executable_p FILE
17753# -----------------------
17754# Test if FILE is an executable regular file.
17755as_fn_executable_p ()
17756{
17757 test -f "$1" && test -x "$1"
17758} # as_fn_executable_p
17759as_test_x='test -x'
17760as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017761
17762# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017763as_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 +000017764
17765# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017766as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017767
17768
Martin v. Löwis11437992002-04-12 09:54:03 +000017769exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017770## ----------------------------------- ##
17771## Main body of $CONFIG_STATUS script. ##
17772## ----------------------------------- ##
17773_ASEOF
17774test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
Matthias Kloseb9621712010-04-24 17:59:49 +000017776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17777# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017778# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779# values after options handling.
17780ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017781This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017782generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
17784 CONFIG_FILES = $CONFIG_FILES
17785 CONFIG_HEADERS = $CONFIG_HEADERS
17786 CONFIG_LINKS = $CONFIG_LINKS
17787 CONFIG_COMMANDS = $CONFIG_COMMANDS
17788 $ $0 $@
17789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790on `(hostname || uname -n) 2>/dev/null | sed 1q`
17791"
17792
Martin v. Löwis11437992002-04-12 09:54:03 +000017793_ACEOF
17794
Matthias Kloseb9621712010-04-24 17:59:49 +000017795case $ac_config_files in *"
17796"*) set x $ac_config_files; shift; ac_config_files=$*;;
17797esac
17798
17799case $ac_config_headers in *"
17800"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17801esac
17802
17803
17804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017805# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017806config_files="$ac_config_files"
17807config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017810
Matthias Kloseb9621712010-04-24 17:59:49 +000017811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017812ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017813\`$as_me' instantiates files and other configuration actions
17814from templates according to the current configuration. Unless the files
17815and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
Matthias Kloseb9621712010-04-24 17:59:49 +000017817Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017818
17819 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017821 --config print configuration, then exit
17822 -q, --quiet, --silent
17823 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 -d, --debug don't remove temporary files
17825 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017826 --file=FILE[:TEMPLATE]
17827 instantiate the configuration file FILE
17828 --header=FILE[:TEMPLATE]
17829 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017830
17831Configuration files:
17832$config_files
17833
17834Configuration headers:
17835$config_headers
17836
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017837Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17841ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017842ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017843python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017844configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017845 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017846
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017847Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017848This config.status script is free software; the Free Software Foundation
17849gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850
17851ac_pwd='$ac_pwd'
17852srcdir='$srcdir'
17853INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017854MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017855test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017856_ACEOF
17857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17859# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017860ac_need_defaults=:
17861while test $# != 0
17862do
17863 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017864 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17866 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017867 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017869 --*=)
17870 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17871 ac_optarg=
17872 ac_shift=:
17873 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017875 ac_option=$1
17876 ac_optarg=$2
17877 ac_shift=shift
17878 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 esac
17880
Skip Montanaro6dead952003-09-25 14:50:04 +000017881 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017883 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17884 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 $as_echo "$ac_cs_version"; exit ;;
17887 --config | --confi | --conf | --con | --co | --c )
17888 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017890 debug=: ;;
17891 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017892 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 case $ac_optarg in
17894 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017895 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017896 esac
17897 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 ac_need_defaults=false;;
17899 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017900 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017901 case $ac_optarg in
17902 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17903 esac
17904 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906 --he | --h)
17907 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017909Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017911 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017912 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17913 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17914 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017915
17916 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017917 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017918Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017919
Matthias Kloseb9621712010-04-24 17:59:49 +000017920 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923 esac
17924 shift
17925done
17926
Skip Montanaro6dead952003-09-25 14:50:04 +000017927ac_configure_extra_args=
17928
17929if $ac_cs_silent; then
17930 exec 6>/dev/null
17931 ac_configure_extra_args="$ac_configure_extra_args --silent"
17932fi
17933
17934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017936if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017937 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017938 shift
17939 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17940 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017942 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017943fi
17944
Martin v. Löwis11437992002-04-12 09:54:03 +000017945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947exec 5>>config.log
17948{
17949 echo
17950 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17951## Running $as_me. ##
17952_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017959
Matthias Kloseb9621712010-04-24 17:59:49 +000017960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961
17962# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017963for ac_config_target in $ac_config_targets
17964do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 case $ac_config_target in
17966 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17967 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17968 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017969 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17970 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017972 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017973 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017974 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975
Victor Stinnere0be4232011-10-25 13:06:09 +020017976 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 esac
17978done
17979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980
Martin v. Löwis11437992002-04-12 09:54:03 +000017981# If the user did not use the arguments to specify the items to instantiate,
17982# then the envvar interface is used. Set only those that are not.
17983# We use the long form for the default assignment because of an extremely
17984# bizarre bug on SunOS 4.1.3.
17985if $ac_need_defaults; then
17986 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17987 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17988fi
17989
Skip Montanaro6dead952003-09-25 14:50:04 +000017990# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017992# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993# Hook for its removal unless debugging.
17994# Note that there is a small window in which the directory will not be cleaned:
17995# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017996$debug ||
17997{
Victor Stinnere0be4232011-10-25 13:06:09 +020017998 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018000 : "${ac_tmp:=$tmp}"
18001 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018003 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018004}
Martin v. Löwis11437992002-04-12 09:54:03 +000018005# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018006
Martin v. Löwis11437992002-04-12 09:54:03 +000018007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018009 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018010} ||
18011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 tmp=./conf$$-$RANDOM
18013 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018014} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018015ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018016
Matthias Kloseb9621712010-04-24 17:59:49 +000018017# Set up the scripts for CONFIG_FILES section.
18018# No need to generate them if there are no CONFIG_FILES.
18019# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018021
Matthias Kloseb9621712010-04-24 17:59:49 +000018022
18023ac_cr=`echo X | tr X '\015'`
18024# On cygwin, bash can eat \r inside `` if the user requested igncr.
18025# But we know of no other shell where ac_cr would be empty at this
18026# point, so we can use a bashism as a fallback.
18027if test "x$ac_cr" = x; then
18028 eval ac_cr=\$\'\\r\'
18029fi
18030ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18031if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018032 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018033else
18034 ac_cs_awk_cr=$ac_cr
18035fi
18036
Victor Stinnere0be4232011-10-25 13:06:09 +020018037echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018038_ACEOF
18039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040
Matthias Kloseb9621712010-04-24 17:59:49 +000018041{
18042 echo "cat >conf$$subs.awk <<_ACEOF" &&
18043 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18044 echo "_ACEOF"
18045} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018046 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18047ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048ac_delim='%!_!# '
18049for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018050 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018051 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052
Matthias Kloseb9621712010-04-24 17:59:49 +000018053 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18054 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 break
18056 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018057 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058 else
18059 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018060 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061done
Matthias Kloseb9621712010-04-24 17:59:49 +000018062rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063
Matthias Kloseb9621712010-04-24 17:59:49 +000018064cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018065cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018067sed -n '
18068h
18069s/^/S["/; s/!.*/"]=/
18070p
18071g
18072s/^[^!]*!//
18073:repl
18074t repl
18075s/'"$ac_delim"'$//
18076t delim
18077:nl
18078h
18079s/\(.\{148\}\)..*/\1/
18080t more1
18081s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18082p
18083n
18084b repl
18085:more1
18086s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18087p
18088g
18089s/.\{148\}//
18090t nl
18091:delim
18092h
18093s/\(.\{148\}\)..*/\1/
18094t more2
18095s/["\\]/\\&/g; s/^/"/; s/$/"/
18096p
18097b
18098:more2
18099s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18100p
18101g
18102s/.\{148\}//
18103t delim
18104' <conf$$subs.awk | sed '
18105/^[^""]/{
18106 N
18107 s/\n//
18108}
18109' >>$CONFIG_STATUS || ac_write_fail=1
18110rm -f conf$$subs.awk
18111cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18112_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018113cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018114 for (key in S) S_is_set[key] = 1
18115 FS = ""
18116
18117}
18118{
18119 line = $ 0
18120 nfields = split(line, field, "@")
18121 substed = 0
18122 len = length(field[1])
18123 for (i = 2; i < nfields; i++) {
18124 key = field[i]
18125 keylen = length(key)
18126 if (S_is_set[key]) {
18127 value = S[key]
18128 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18129 len += length(value) + length(field[++i])
18130 substed = 1
18131 } else
18132 len += 1 + keylen
18133 }
18134
18135 print line
18136}
18137
18138_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18141if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18142 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18143else
18144 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018145fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018146 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147_ACEOF
18148
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018149# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18150# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151# trailing colons and then remove the whole line if VPATH becomes empty
18152# (actually we leave an empty line to preserve line numbers).
18153if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018154 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18155h
18156s///
18157s/^/:/
18158s/[ ]*$/:/
18159s/:\$(srcdir):/:/g
18160s/:\${srcdir}:/:/g
18161s/:@srcdir@:/:/g
18162s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018164x
18165s/\(=[ ]*\).*/\1/
18166G
18167s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168s/^[^=]*=[ ]*$//
18169}'
18170fi
18171
Matthias Kloseb9621712010-04-24 17:59:49 +000018172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018173fi # test -n "$CONFIG_FILES"
18174
Matthias Kloseb9621712010-04-24 17:59:49 +000018175# Set up the scripts for CONFIG_HEADERS section.
18176# No need to generate them if there are no CONFIG_HEADERS.
18177# This happens for instance with `./config.status Makefile'.
18178if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018179cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018180BEGIN {
18181_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182
Matthias Kloseb9621712010-04-24 17:59:49 +000018183# Transform confdefs.h into an awk script `defines.awk', embedded as
18184# here-document in config.status, that substitutes the proper values into
18185# config.h.in to produce config.h.
18186
18187# Create a delimiter string that does not exist in confdefs.h, to ease
18188# handling of long lines.
18189ac_delim='%!_!# '
18190for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018191 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18192 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018193 break
18194 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018195 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018196 else
18197 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18198 fi
18199done
18200
18201# For the awk script, D is an array of macro values keyed by name,
18202# likewise P contains macro parameters if any. Preserve backslash
18203# newline sequences.
18204
18205ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18206sed -n '
18207s/.\{148\}/&'"$ac_delim"'/g
18208t rset
18209:rset
18210s/^[ ]*#[ ]*define[ ][ ]*/ /
18211t def
18212d
18213:def
18214s/\\$//
18215t bsnl
18216s/["\\]/\\&/g
18217s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18218D["\1"]=" \3"/p
18219s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18220d
18221:bsnl
18222s/["\\]/\\&/g
18223s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18224D["\1"]=" \3\\\\\\n"\\/p
18225t cont
18226s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18227t cont
18228d
18229:cont
18230n
18231s/.\{148\}/&'"$ac_delim"'/g
18232t clear
18233:clear
18234s/\\$//
18235t bsnlc
18236s/["\\]/\\&/g; s/^/"/; s/$/"/p
18237d
18238:bsnlc
18239s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18240b cont
18241' <confdefs.h | sed '
18242s/'"$ac_delim"'/"\\\
18243"/g' >>$CONFIG_STATUS || ac_write_fail=1
18244
18245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18246 for (key in D) D_is_set[key] = 1
18247 FS = ""
18248}
18249/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18250 line = \$ 0
18251 split(line, arg, " ")
18252 if (arg[1] == "#") {
18253 defundef = arg[2]
18254 mac1 = arg[3]
18255 } else {
18256 defundef = substr(arg[1], 2)
18257 mac1 = arg[2]
18258 }
18259 split(mac1, mac2, "(") #)
18260 macro = mac2[1]
18261 prefix = substr(line, 1, index(line, defundef) - 1)
18262 if (D_is_set[macro]) {
18263 # Preserve the white space surrounding the "#".
18264 print prefix "define", macro P[macro] D[macro]
18265 next
18266 } else {
18267 # Replace #undef with comments. This is necessary, for example,
18268 # in the case of _POSIX_SOURCE, which is predefined and required
18269 # on some systems where configure will not decide to define it.
18270 if (defundef == "undef") {
18271 print "/*", prefix defundef, macro, "*/"
18272 next
18273 }
18274 }
18275}
18276{ print }
18277_ACAWK
18278_ACEOF
18279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018280 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018281fi # test -n "$CONFIG_HEADERS"
18282
18283
18284eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18285shift
18286for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287do
18288 case $ac_tag in
18289 :[FHLC]) ac_mode=$ac_tag; continue;;
18290 esac
18291 case $ac_mode$ac_tag in
18292 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018293 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294 :[FH]-) ac_tag=-:-;;
18295 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18296 esac
18297 ac_save_IFS=$IFS
18298 IFS=:
18299 set x $ac_tag
18300 IFS=$ac_save_IFS
18301 shift
18302 ac_file=$1
18303 shift
18304
18305 case $ac_mode in
18306 :L) ac_source=$1;;
18307 :[FH])
18308 ac_file_inputs=
18309 for ac_f
18310 do
18311 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018312 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313 *) # Look for the file first in the build tree, then in the source tree
18314 # (if the path is not absolute). The absolute path cannot be DOS-style,
18315 # because $ac_f cannot contain `:'.
18316 test -f "$ac_f" ||
18317 case $ac_f in
18318 [\\/$]*) false;;
18319 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18320 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018321 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018323 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18324 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325 done
18326
18327 # Let's still pretend it is `configure' which instantiates (i.e., don't
18328 # use $as_me), people would be surprised to read:
18329 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018330 configure_input='Generated from '`
18331 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18332 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333 if test x"$ac_file" != x-; then
18334 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018335 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18336$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018338 # Neutralize special characters interpreted by sed in replacement strings.
18339 case $configure_input in #(
18340 *\&* | *\|* | *\\* )
18341 ac_sed_conf_input=`$as_echo "$configure_input" |
18342 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18343 *) ac_sed_conf_input=$configure_input;;
18344 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345
18346 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018347 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18348 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 esac
18350 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 esac
18352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018354$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018355 X"$ac_file" : 'X\(//\)[^/]' \| \
18356 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018358$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18360 s//\1/
18361 q
18362 }
18363 /^X\(\/\/\)[^/].*/{
18364 s//\1/
18365 q
18366 }
18367 /^X\(\/\/\)$/{
18368 s//\1/
18369 q
18370 }
18371 /^X\(\/\).*/{
18372 s//\1/
18373 q
18374 }
18375 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018376 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 ac_builddir=.
18378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379case "$ac_dir" in
18380.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18381*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018382 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 case $ac_top_builddir_sub in
18386 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18387 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18388 esac ;;
18389esac
18390ac_abs_top_builddir=$ac_pwd
18391ac_abs_builddir=$ac_pwd$ac_dir_suffix
18392# for backward compatibility:
18393ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018394
18395case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018397 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398 ac_top_srcdir=$ac_top_builddir_sub
18399 ac_abs_top_srcdir=$ac_pwd ;;
18400 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 ac_top_srcdir=$srcdir
18403 ac_abs_top_srcdir=$srcdir ;;
18404 *) # Relative name.
18405 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18406 ac_top_srcdir=$ac_top_build_prefix$srcdir
18407 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018408esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018410
Martin v. Löwis11437992002-04-12 09:54:03 +000018411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 case $ac_mode in
18413 :F)
18414 #
18415 # CONFIG_FILE
18416 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018417
18418 case $INSTALL in
18419 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018421 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018422 ac_MKDIR_P=$MKDIR_P
18423 case $MKDIR_P in
18424 [\\/$]* | ?:[\\/]* ) ;;
18425 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18426 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018427_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428
Matthias Kloseb9621712010-04-24 17:59:49 +000018429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430# If the template does not know about datarootdir, expand it.
18431# FIXME: This hack should be removed a few years after 2.60.
18432ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018433ac_sed_dataroot='
18434/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 p
18436 q
18437}
18438/@datadir@/p
18439/@docdir@/p
18440/@infodir@/p
18441/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018442/@mandir@/p'
18443case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444*datarootdir*) ac_datarootdir_seen=yes;;
18445*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18447$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 ac_datarootdir_hack='
18451 s&@datadir@&$datadir&g
18452 s&@docdir@&$docdir&g
18453 s&@infodir@&$infodir&g
18454 s&@localedir@&$localedir&g
18455 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018456 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457esac
18458_ACEOF
18459
18460# Neutralize VPATH when `$srcdir' = `.'.
18461# Shell code in configure.ac might set extrasub.
18462# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18464ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018465$extrasub
18466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018467cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018468:t
18469/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018470s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018472s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473s&@srcdir@&$ac_srcdir&;t t
18474s&@abs_srcdir@&$ac_abs_srcdir&;t t
18475s&@top_srcdir@&$ac_top_srcdir&;t t
18476s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18477s&@builddir@&$ac_builddir&;t t
18478s&@abs_builddir@&$ac_abs_builddir&;t t
18479s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18480s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018481s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018483"
Victor Stinnere0be4232011-10-25 13:06:09 +020018484eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18485 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018488 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18489 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18490 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018492which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018493$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018494which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018495
Victor Stinnere0be4232011-10-25 13:06:09 +020018496 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018498 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18499 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018500 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018501 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502 ;;
18503 :H)
18504 #
18505 # CONFIG_HEADER
18506 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018507 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018508 {
18509 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018510 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18511 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018512 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018513 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18515$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018516 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018517 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018518 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018519 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 fi
18521 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018522 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018523 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018524 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018526 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528
18529 esac
18530
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018531
18532 case $ac_file$ac_mode in
18533 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18534
18535 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536done # for ac_tag
18537
Guido van Rossum627b2d71993-12-24 10:39:16 +000018538
Matthias Kloseb9621712010-04-24 17:59:49 +000018539as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018540_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018541ac_clean_files=$ac_clean_files_save
18542
Matthias Kloseb9621712010-04-24 17:59:49 +000018543test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018544 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018545
Martin v. Löwis11437992002-04-12 09:54:03 +000018546
18547# configure is writing to config.log, and then calls config.status.
18548# config.status does its own redirection, appending to config.log.
18549# Unfortunately, on DOS this fails, as config.log is still kept open
18550# by configure, so config.status won't be able to write to it; its
18551# output is simply discarded. So we exec the FD to /dev/null,
18552# effectively closing config.log, so it can be properly (re)opened and
18553# appended to by config.status. When coming back to configure, we
18554# need to make the FD available again.
18555if test "$no_create" != yes; then
18556 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018557 ac_config_status_args=
18558 test "$silent" = yes &&
18559 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018560 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018561 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 exec 5>>config.log
18563 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18564 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018565 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018566fi
18567if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18569$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018571
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018572
Christian Heimes75ed8902013-11-20 01:11:18 +010018573echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018574if test ! -f Modules/Setup.local
18575then
18576 echo "# Edit this file for local setup changes" >Modules/Setup.local
18577fi
18578
Christian Heimes75ed8902013-11-20 01:11:18 +010018579echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018580$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018581 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018582 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018583mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018584
18585if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18586 echo "" >&6
18587 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018588 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 +000018589 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018590 echo "" >&6
18591 echo "" >&6
18592fi
18593