blob: 9c7eded8535985a0de74ce37aed905dfea0bebcd [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
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001399\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001465 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001503 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001504 --with-lto Enable Link Time Optimization in any build. Disabled
1505 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001509 enable AddressSanitizer (asan)
1510 --with-memory-sanitizer enable MemorySanitizer (msan)
1511 --with-undefined-behavior-sanitizer
1512 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001514 --with-system-expat build pyexpat module using an installed expat
1515 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001516 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001517 --with-system-libmpdec build _decimal module using an installed libmpdec
1518 library
Ned Deilyd819b932013-09-06 01:07:05 -07001519 --with-tcltk-includes='-I...'
1520 override search for Tcl and Tk include files
1521 --with-tcltk-libs='-L...'
1522 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001523 --with-dbmliborder=db1:db2:...
1524 order to check db backends for dbm. Valid value is a
1525 colon separated string with the backend names
1526 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-doc-strings disable/enable documentation strings
1528 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001529 --with(out)-c-locale-coercion
1530 disable/enable C locale coercion to a UTF-8 based
1531 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001533 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001541 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001542 --with-ssl-default-suites=[python|openssl|STRING]
1543 Override default cipher suites string, python: use
1544 Python's preferred selection (default), openssl:
1545 leave OpenSSL's defaults untouched, STRING: use a
1546 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001547
1548Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001549 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CC C compiler command
1551 CFLAGS C compiler flags
1552 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1553 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001558 PKG_CONFIG path to pkg-config utility
1559 PKG_CONFIG_PATH
1560 directories to add to pkg-config's search path
1561 PKG_CONFIG_LIBDIR
1562 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001567Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 test -d "$ac_dir" ||
1576 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 ac_builddir=.
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 case $ac_top_builddir_sub in
1587 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589 esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001595
1596case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$ac_top_builddir_sub
1600 ac_abs_top_srcdir=$ac_pwd ;;
1601 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$srcdir
1604 ac_abs_top_srcdir=$srcdir ;;
1605 *) # Relative name.
1606 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607 ac_top_srcdir=$ac_top_build_prefix$srcdir
1608 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001609esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 cd "$ac_dir" || { ac_status=$?; continue; }
1613 # Check for guested configure.
1614 if test -f "$ac_srcdir/configure.gnu"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617 elif test -f "$ac_srcdir/configure"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 fi || ac_status=$?
1623 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 done
1625fi
1626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if $ac_init_version; then
1629 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001630python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001631generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 rm -f conftest.$ac_objext
1651 if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_compile") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666 test $ac_status = 0; } && {
1667 test -z "$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 } && test -s conftest.$ac_objext; then :
1670 ac_retval=0
1671else
1672 $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675 ac_retval=1
1676fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } > conftest.i && {
1704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
1714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
Matthias Kloseb9621712010-04-24 17:59:49 +00001719# ac_fn_c_try_link LINENO
1720# -----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_link ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 rm -f conftest.$ac_objext conftest$ac_exeext
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_link") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
1740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
1744 } && test -s conftest$ac_exeext && {
1745 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001746 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1756 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1757 # interfere with the next link command; also delete a directory that is
1758 # left behind by Apple's compiler. We do this before executing the actions.
1759 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_link
1764
Matthias Kloseb9621712010-04-24 17:59:49 +00001765# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1766# -------------------------------------------------------
1767# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1768# the include files in INCLUDES and setting the cache variable VAR
1769# accordingly.
1770ac_fn_c_check_header_mongrel ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001776if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 $as_echo_n "(cached) " >&6
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782else
1783 # Is the header compilable?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1785$as_echo_n "checking $2 usability... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788$4
1789#include <$2>
1790_ACEOF
1791if ac_fn_c_try_compile "$LINENO"; then :
1792 ac_header_compiler=yes
1793else
1794 ac_header_compiler=no
1795fi
1796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1798$as_echo "$ac_header_compiler" >&6; }
1799
1800# Is the header present?
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1802$as_echo_n "checking $2 presence... " >&6; }
1803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1804/* end confdefs.h. */
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_cpp "$LINENO"; then :
1808 ac_header_preproc=yes
1809else
1810 ac_header_preproc=no
1811fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001812rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1814$as_echo "$ac_header_preproc" >&6; }
1815
1816# So? What about this header?
1817case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1818 yes:no: )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1820$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1822$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1823 ;;
1824 no:yes:* )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1826$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1828$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1830$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1832$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001835( $as_echo "## --------------------------------------- ##
1836## Report this to https://bugs.python.org/ ##
1837## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 ) | sed "s/^/$as_me: WARNING: /" >&2
1839 ;;
1840esac
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001843if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 eval "$3=\$ac_header_compiler"
1847fi
1848eval ac_res=\$$3
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850$as_echo "$ac_res" >&6; }
1851fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001853
1854} # ac_fn_c_check_header_mongrel
1855
1856# ac_fn_c_try_run LINENO
1857# ----------------------
1858# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1859# that executables *can* be run.
1860ac_fn_c_try_run ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if { { ac_try="$ac_link"
1864case "(($ac_try" in
1865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866 *) ac_try_echo=$ac_try;;
1867esac
1868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869$as_echo "$ac_try_echo"; } >&5
1870 (eval "$ac_link") 2>&5
1871 ac_status=$?
1872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1873 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1874 { { case "(($ac_try" in
1875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876 *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880 (eval "$ac_try") 2>&5
1881 ac_status=$?
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; }; }; then :
1884 ac_retval=0
1885else
1886 $as_echo "$as_me: program exited with status $ac_status" >&5
1887 $as_echo "$as_me: failed program was:" >&5
1888sed 's/^/| /' conftest.$ac_ext >&5
1889
1890 ac_retval=$ac_status
1891fi
1892 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894 as_fn_set_status $ac_retval
1895
1896} # ac_fn_c_try_run
1897
1898# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1899# -------------------------------------------------------
1900# Tests whether HEADER exists and can be compiled using the include files in
1901# INCLUDES, setting the cache variable VAR accordingly.
1902ac_fn_c_check_header_compile ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913#include <$2>
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 eval "$3=yes"
1917else
1918 eval "$3=no"
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_check_header_compile
1928
Matthias Kloseb9621712010-04-24 17:59:49 +00001929# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1930# -------------------------------------------
1931# Tests whether TYPE exists after having included INCLUDES, setting cache
1932# variable VAR accordingly.
1933ac_fn_c_check_type ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof ($2))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof (($2)))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 eval "$3=yes"
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976eval ac_res=\$$3
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1978$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981} # ac_fn_c_check_type
1982
Matthias Kloseb9621712010-04-24 17:59:49 +00001983# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1984# --------------------------------------------
1985# Tries to find the compile-time value of EXPR in a program that includes
1986# INCLUDES, setting VAR accordingly. Returns whether the value could be
1987# computed
1988ac_fn_c_compute_int ()
1989{
1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991 if test "$cross_compiling" = yes; then
1992 # Depending upon the size, compute the lo and hi bounds.
1993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$4
1996int
1997main ()
1998{
1999static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002000test_array [0] = 0;
2001return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_lo=0 ac_mid=0
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002017test_array [0] = 0;
2018return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_hi=$ac_mid; break
2026else
2027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2028 if test $ac_lo -le $ac_mid; then
2029 ac_lo= ac_hi=
2030 break
2031 fi
2032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 done
2036else
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002174if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002229 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002230
2231} # ac_fn_c_check_func
2232
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2234# ---------------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2236# accordingly.
2237ac_fn_c_check_decl ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 as_decl_name=`echo $2|sed 's/ *(.*//'`
2241 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval \${$3+:} false; then :
2245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253#ifndef $as_decl_name
2254#ifdef __cplusplus
2255 (void) $as_decl_use;
2256#else
2257 (void) $as_decl_name;
2258#endif
2259#endif
2260
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
2275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276
2277} # ac_fn_c_check_decl
2278
Matthias Kloseb9621712010-04-24 17:59:49 +00002279# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2280# ----------------------------------------------------
2281# Tries to find if the field MEMBER exists in type AGGR, after including
2282# INCLUDES, setting cache variable VAR accordingly.
2283ac_fn_c_check_member ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2287$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002288if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002289 $as_echo_n "(cached) " >&6
2290else
2291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h. */
2293$5
2294int
2295main ()
2296{
2297static $2 ac_aggr;
2298if (ac_aggr.$3)
2299return 0;
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_compile "$LINENO"; then :
2305 eval "$4=yes"
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (sizeof ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 eval "$4=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$4
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002333
2334} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
Ned Deily5489bda2018-01-31 17:44:09 -05002339It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002340generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
2342 $ $0 $@
2343
2344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2360
2361/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2362/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002365/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2366/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2367/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo "PATH: $as_dir"
2377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_configure_args0=
2399ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_must_keep_next=false
2401for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002402do
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 for ac_arg
2404 do
2405 case $ac_arg in
2406 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408 | -silent | --silent | --silen | --sile | --sil)
2409 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 esac
2413 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 case $ac_arg in
2421 *=* | --config-cache | -C | -disable-* | --disable-* \
2422 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424 | -with-* | --with-* | -without-* | --without-* | --x)
2425 case "$ac_configure_args0 " in
2426 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427 esac
2428 ;;
2429 -* ) ac_must_keep_next=true ;;
2430 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 ;;
2434 esac
2435 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002436done
Matthias Kloseb9621712010-04-24 17:59:49 +00002437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log. We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# 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 +00002445trap 'exit_status=$?
2446 # Save into config.log some information that might help in debugging.
2447 {
2448 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002449
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002450 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002487## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 echo
2490 for ac_var in $ac_subst_vars
2491 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 eval ac_val=\$$ac_var
2493 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 done | sort
2498 echo
2499
2500 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_files
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514 fi
2515
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 # We do not want a PATH search for config.site.
2575 case $CONFIG_SITE in #((
2576 -*) ac_site_file1=./$CONFIG_SITE;;
2577 */*) ac_site_file1=$CONFIG_SITE;;
2578 *) ac_site_file1=./$CONFIG_SITE;;
2579 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$prefix/share/config.site
2582 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583else
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$ac_default_prefix/share/config.site
2585 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588do
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 test "x$ac_site_file" = xNONE && continue
2590 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 . "$ac_site_file" \
2595 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2597as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002598See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600done
2601
2602if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 # Some versions of bash will fail to source /dev/null (special files
2604 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2605 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 esac
2612 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_old_set,$ac_new_set in
2628 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$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 +00002631 ac_cache_corrupted=: ;;
2632 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679
Guido van Rossum7f43da71994-08-01 12:15:30 +00002680ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
Trent Nelson4d4ec652012-10-16 08:51:24 -04002688
Christian Heimesff5be6e2018-01-20 13:19:21 +01002689
2690
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002691if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692 # If we're building out-of-tree, we need to make sure the following
2693 # resources get picked up before their $srcdir counterparts.
2694 # Objects/ -> typeslots.inc
2695 # Include/ -> Python-ast.h, graminit.h
2696 # Python/ -> importlib.h
2697 # (A side effect of this is that these resources will automatically be
2698 # regenerated when building out-of-tree, regardless of whether or not
2699 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2700 # off.)
2701 BASECPPFLAGS="-IObjects -IInclude -IPython"
2702else
2703 BASECPPFLAGS=""
2704fi
2705
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706
2707
2708
2709
Victor Stinner9ed34a82017-05-02 22:35:58 +02002710if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712# Extract the first word of "git", so it can be a program name with args.
2713set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo_n "(cached) " >&6
2718else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719 if test -n "$HAS_GIT"; then
2720 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
2727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2731 break 2
2732 fi
2733done
2734 done
2735IFS=$as_save_IFS
2736
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738fi
2739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=$ac_cv_prog_HAS_GIT
2741if test -n "$HAS_GIT"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2743$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746$as_echo "no" >&6; }
2747fi
2748
2749
2750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Xiang Zhang4c855572018-08-20 22:36:19 +08002755 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2756 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2757 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITVERSION=""
2760 GITTAG=""
2761 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762fi
2763
2764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002766
2767
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002768ac_aux_dir=
2769for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2770 if test -f "$ac_dir/install-sh"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/install-sh -c"
2773 break
2774 elif test -f "$ac_dir/install.sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install.sh -c"
2777 break
2778 elif test -f "$ac_dir/shtool"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/shtool install -c"
2781 break
2782 fi
2783done
2784if test -z "$ac_aux_dir"; then
2785 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2786fi
2787
2788# These three variables are undocumented and unsupported,
2789# and are intended to be withdrawn in a future Autoconf release.
2790# They can cause serious problems if a builder's source tree is in a directory
2791# whose full name contains unusual characters.
2792ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2793ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2794ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2795
2796
2797# Make sure we can run config.sub.
2798$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2799 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2800
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2802$as_echo_n "checking build system type... " >&6; }
2803if ${ac_cv_build+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805else
2806 ac_build_alias=$build_alias
2807test "x$ac_build_alias" = x &&
2808 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2809test "x$ac_build_alias" = x &&
2810 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2811ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2812 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2816$as_echo "$ac_cv_build" >&6; }
2817case $ac_cv_build in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2820esac
2821build=$ac_cv_build
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_build
2824shift
2825build_cpu=$1
2826build_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830build_os=$*
2831IFS=$ac_save_IFS
2832case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2836$as_echo_n "checking host system type... " >&6; }
2837if ${ac_cv_host+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 if test "x$host_alias" = x; then
2841 ac_cv_host=$ac_cv_build
2842else
2843 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2845fi
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2849$as_echo "$ac_cv_host" >&6; }
2850case $ac_cv_host in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2853esac
2854host=$ac_cv_host
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_host
2857shift
2858host_cpu=$1
2859host_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863host_os=$*
2864IFS=$ac_save_IFS
2865case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2866
2867
2868
doko@python.orga10e4a92013-01-25 18:45:12 +01002869
2870
Ned Deilyfcbc2462014-08-22 13:32:49 -07002871# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2872rm -f pybuilddir.txt
2873
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874for ac_prog in python$PACKAGE_VERSION python3 python
2875do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877set dummy $ac_prog; ac_word=$2
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo_n "(cached) " >&6
2882else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883 if test -n "$PYTHON_FOR_REGEN"; then
2884 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885else
2886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887for as_dir in $PATH
2888do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
2898 done
2899IFS=$as_save_IFS
2900
2901fi
2902fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2904if test -n "$PYTHON_FOR_REGEN"; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2906$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909$as_echo "no" >&6; }
2910fi
2911
2912
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
2918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python3 python; do
2924 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002925 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 +02002926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002935 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 +02002936 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002937elif test "$cross_compiling" = maybe; then
2938 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939else
2940 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily5489bda2018-01-31 17:44:09 -05002959VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002986# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
2991
2992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002993define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002995# Arguments passed to configure.
2996
2997CONFIG_ARGS="$ac_configure_args"
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3000$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003002if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 case $enableval in
3005 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003006 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # information
3008 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003009 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3012 if test ! -d "${enableval}"
3013 then
3014 enableval=/
3015 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
3019 case $enableval in
3020 no)
3021 UNIVERSALSDK=
3022 enable_universalsdk=
3023 ;;
3024 *)
3025 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 if test ! -d "${UNIVERSALSDK}"
3027 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003028 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034else
3035
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041if test -n "${UNIVERSALSDK}"
3042then
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3044$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045else
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deily87adb6e2013-10-18 21:09:56 -07003052ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054# For backward compatibility reasons we prefer to select '32-bit' if available,
3055# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057if test "`uname -s`" = "Darwin"
3058then
3059 if test -n "${UNIVERSALSDK}"
3060 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062 then
3063 UNIVERSAL_ARCHS="intel"
3064 fi
3065 fi
3066fi
3067
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3070$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071
3072# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 UNIVERSAL_ARCHS="$withval"
3076
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077fi
3078
Ned Deily87adb6e2013-10-18 21:09:56 -07003079if test -n "${UNIVERSALSDK}"
3080then
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3082$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3083else
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
3086fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088
3089# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091 withval=$with_framework_name;
3092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003121 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE" ; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
3146 case "${enableval}" in
3147 /System*)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 if test "${prefix}" = "NONE" ; then
3150 # See below
3151 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3152 fi
3153 ;;
3154
3155 /Library*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 ;;
3158
3159 */Library/Frameworks)
3160 MDIR="`dirname "${enableval}"`"
3161 MDIR="`dirname "${MDIR}"`"
3162 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3163
3164 if test "${prefix}" = "NONE"; then
3165 # User hasn't specified the
3166 # --prefix option, but wants to install
3167 # the framework in a non-default location,
3168 # ensure that the compatibility links get
3169 # installed relative to that prefix as well
3170 # instead of in /usr/local.
3171 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3172 fi
3173 ;;
3174
3175 *)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178 esac
3179
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003204 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213fi
3214
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222
3223
3224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Ned Deilyb8f944f2013-11-21 22:42:25 -08003227
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228
3229cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003230#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231_ACEOF
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003259 *-*-vxworks*)
3260 ac_sys_system=VxWorks
3261 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003284 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003285 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003286 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003287 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003307 *-*-vxworks*)
3308 _host_cpu=$host_cpu
3309 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003310 *)
3311 # for now, limit cross builds to known configurations
3312 MACHDEP="unknown"
3313 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3314 esac
3315 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3316fi
3317
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003318# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3319# disable features if it is defined, without any means to access these
3320# features as extensions. For these systems, we skip the definition of
3321# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3322# some feature, make sure there is no alternative way to access this
3323# feature. Also, when using wildcards, make sure you have verified the
3324# need for not defining _XOPEN_SOURCE on all systems matching the
3325# wildcard, and that the wildcard does not include future systems
3326# (which may remove their limitations).
3327case $ac_sys_system/$ac_sys_release in
3328 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3329 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003330 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003331 # In addition, Stefan Krah confirms that issue #1244610 exists through
3332 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003333 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334 define_xopen_source=no
3335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340
3341 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003342 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003343 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3344 # also defined. This can be overridden by defining _BSD_SOURCE
3345 # As this has a different meaning on Linux, only define it on OpenBSD
3346
Matthias Kloseb9621712010-04-24 17:59:49 +00003347$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348
3349 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003350 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3351 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3352 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003353 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 +00003354 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003355 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3356 # request to enable features supported by the standard as a request
3357 # to disable features not supported by the standard. The best way
3358 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3359 # entirely and define __EXTENSIONS__ instead.
3360 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003361 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3363 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003364 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003365 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 define_xopen_source=no;;
3367 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003371 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3372 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3373 # identifies itself as Darwin/7.*
3374 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # disables platform specific features beyond repair.
3376 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # has no effect, don't bother defining them
3378 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003379 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003380 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3383 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3384 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003385 AIX/4)
3386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 AIX/5)
3388 if test `uname -r` -eq 1; then
3389 define_xopen_source=no
3390 fi
3391 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003392 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3393 # defining NI_NUMERICHOST.
3394 QNX/6.3.2)
3395 define_xopen_source=no
3396 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003397 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3398 # in network headers still using system V types.
3399 VxWorks/*)
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
pxinwr32f5fdd2019-02-27 19:09:28 +08005286#elif defined(__VXWORKS__)
5287 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288#else
5289# error unknown platform triplet
5290#endif
5291
5292EOF
5293
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005294if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5297$as_echo "$PLATFORM_TRIPLET" >&6; }
5298else
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5300$as_echo "none" >&6; }
5301fi
5302rm -f conftest.c conftest.out
5303
5304if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5305 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5306 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5307 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005308elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5309 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005311
doko@ubuntu.com55532312016-06-14 08:55:19 +02005312if test x$MULTIARCH != x; then
5313 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5314fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315
5316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5318$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5319save_LDFLAGS="$LDFLAGS"
5320LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005321
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323/* end confdefs.h. */
5324
5325int
5326main ()
5327{
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333if ac_fn_c_try_link "$LINENO"; then :
5334 NO_AS_NEEDED="-Wl,--no-as-needed"
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5336$as_echo "yes" >&6; }
5337else
5338 NO_AS_NEEDED=""
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342rm -f core conftest.err conftest.$ac_objext \
5343 conftest$ac_exeext conftest.$ac_ext
5344LDFLAGS="$save_LDFLAGS"
5345
5346
5347
5348# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5351$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005352if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354else
5355 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5356 then ac_cv_path_EGREP="$GREP -E"
5357 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 # Loop through the user's path and test for each of PROGNAME-LIST
5361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5363do
5364 IFS=$as_save_IFS
5365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 for ac_prog in egrep; do
5367 for ac_exec_ext in '' $ac_executable_extensions; do
5368 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005369 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005370# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371 # Check for GNU $ac_path_EGREP
5372case `"$ac_path_EGREP" --version 2>&1` in
5373*GNU*)
5374 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5375*)
5376 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 while :
5379 do
5380 cat "conftest.in" "conftest.in" >"conftest.tmp"
5381 mv "conftest.tmp" "conftest.in"
5382 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5385 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5388 # Best one so far, save it but keep looking for a better one
5389 ac_cv_path_EGREP="$ac_path_EGREP"
5390 ac_path_EGREP_max=$ac_count
5391 fi
5392 # 10*(2^10) chars as input seems more than enough
5393 test $ac_count -gt 10 && break
5394 done
5395 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5396esac
5397
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $ac_path_EGREP_found && break 3
5399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005404 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 +00005405 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406else
5407 ac_cv_path_EGREP=$EGREP
5408fi
5409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 fi
5411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5413$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005415
5416
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5418$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005419if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo_n "(cached) " >&6
5421else
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005423/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005424#include <stdlib.h>
5425#include <stdarg.h>
5426#include <string.h>
5427#include <float.h>
5428
5429int
5430main ()
5431{
5432
5433 ;
5434 return 0;
5435}
5436_ACEOF
5437if ac_fn_c_try_compile "$LINENO"; then :
5438 ac_cv_header_stdc=yes
5439else
5440 ac_cv_header_stdc=no
5441fi
5442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443
5444if test $ac_cv_header_stdc = yes; then
5445 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447/* end confdefs.h. */
5448#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005449
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005450_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454else
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005457rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
Matthias Kloseb9621712010-04-24 17:59:49 +00005459fi
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <stdlib.h>
5466
5467_ACEOF
5468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 $EGREP "free" >/dev/null 2>&1; then :
5470
5471else
5472 ac_cv_header_stdc=no
5473fi
5474rm -f conftest*
5475
5476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5480 if test "$cross_compiling" = yes; then :
5481 :
5482else
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485#include <ctype.h>
5486#include <stdlib.h>
5487#if ((' ' & 0x0FF) == 0x020)
5488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5490#else
5491# define ISLOWER(c) \
5492 (('a' <= (c) && (c) <= 'i') \
5493 || ('j' <= (c) && (c) <= 'r') \
5494 || ('s' <= (c) && (c) <= 'z'))
5495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5496#endif
5497
5498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5499int
5500main ()
5501{
5502 int i;
5503 for (i = 0; i < 256; i++)
5504 if (XOR (islower (i), ISLOWER (i))
5505 || toupper (i) != TOUPPER (i))
5506 return 2;
5507 return 0;
5508}
5509_ACEOF
5510if ac_fn_c_try_run "$LINENO"; then :
5511
5512else
5513 ac_cv_header_stdc=no
5514fi
5515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5516 conftest.$ac_objext conftest.beam conftest.$ac_ext
5517fi
5518
5519fi
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5522$as_echo "$ac_cv_header_stdc" >&6; }
5523if test $ac_cv_header_stdc = yes; then
5524
5525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5526
5527fi
5528
5529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5531 inttypes.h stdint.h unistd.h
5532do :
5533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5534ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5535"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005537 cat >>confdefs.h <<_ACEOF
5538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5539_ACEOF
5540
5541fi
5542
5543done
5544
5545
5546
5547 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 +02005548if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 MINIX=yes
5550else
5551 MINIX=
5552fi
5553
5554
5555 if test "$MINIX" = yes; then
5556
5557$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5558
5559
5560$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5561
5562
5563$as_echo "#define _MINIX 1" >>confdefs.h
5564
5565 fi
5566
5567
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5569$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005570if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 $as_echo_n "(cached) " >&6
5572else
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574/* end confdefs.h. */
5575
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005576# define __EXTENSIONS__ 1
5577 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005578int
5579main ()
5580{
5581
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586if ac_fn_c_try_compile "$LINENO"; then :
5587 ac_cv_safe_to_define___extensions__=yes
5588else
5589 ac_cv_safe_to_define___extensions__=no
5590fi
5591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5592fi
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5594$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5595 test $ac_cv_safe_to_define___extensions__ = yes &&
5596 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5597
5598 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5599
5600 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5601
5602 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5603
5604 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5605
5606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
Xavier de Gaye95750b12016-07-09 11:05:42 +02005608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5609$as_echo_n "checking for the Android API level... " >&6; }
5610cat >> conftest.c <<EOF
5611#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005612android_api = __ANDROID_API__
5613arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005614#else
5615#error not Android
5616#endif
5617EOF
5618
5619if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005620 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5621 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5623$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005624 if test -z "$ANDROID_API_LEVEL"; then
5625 echo 'Fatal: you must define __ANDROID_API__'
5626 exit 1
5627 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005628
5629cat >>confdefs.h <<_ACEOF
5630#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5631_ACEOF
5632
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005633
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5635$as_echo_n "checking for the Android arm ABI... " >&6; }
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5637$as_echo "$_arm_arch" >&6; }
5638 if test "$_arm_arch" = 7; then
5639 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5640 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5641 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005642else
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5644$as_echo "not Android" >&6; }
5645fi
5646rm -f conftest.c conftest.out
5647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648# Check for unsupported systems
5649case $ac_sys_system/$ac_sys_release in
5650atheos*|Linux*/1*)
5651 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5652 echo See README for details.
5653 exit 1;;
5654esac
5655
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5658$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659
5660# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005661if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 withval=$with_suffix;
5663 case $withval in
5664 no) EXEEXT=;;
5665 yes) EXEEXT=.exe;;
5666 *) EXEEXT=$withval;;
5667 esac
5668fi
5669
Matthias Kloseb9621712010-04-24 17:59:49 +00005670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5671$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673# Test whether we're running on a non-case-sensitive system, in which
5674# case we give a warning if no ext is given
5675
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5677$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678if test ! -d CaseSensitiveTestDir; then
5679mkdir CaseSensitiveTestDir
5680fi
5681
5682if test -d casesensitivetestdir
5683then
Matthias Kloseb9621712010-04-24 17:59:49 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5685$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 BUILDEXEEXT=.exe
5687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=$EXEEXT
5691fi
5692rmdir CaseSensitiveTestDir
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694case $ac_sys_system in
5695hp*|HP*)
5696 case $CC in
5697 cc|*/cc) CC="$CC -Ae";;
5698 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699esac
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5703$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704if test -z "$LIBRARY"
5705then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005706 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5709$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
5711# LDLIBRARY is the name of the library to link against (as opposed to the
5712# name of the library into which to insert object files). BLDLIBRARY is also
5713# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5714# is blank as the main program is not linked directly against LDLIBRARY.
5715# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5716# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5717# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5718# DLLLIBRARY is the shared (i.e., DLL) library.
5719#
5720# RUNSHARED is used to run shared python without installed libraries
5721#
5722# INSTSONAME is the name of the shared library that will be use to install
5723# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005724#
5725# LDVERSION is the shared library version number, normally the Python version
5726# with the ABI build flags appended.
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
5729
5730
5731
5732
5733
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735LDLIBRARY="$LIBRARY"
5736BLDLIBRARY='$(LDLIBRARY)'
5737INSTSONAME='$(LDLIBRARY)'
5738DLLLIBRARY=''
5739LDLIBRARYDIR=''
5740RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005741LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743# LINKCC is the command that links the python executable -- default is $(CC).
5744# If CXX is set, and if it is needed to link a main function that was
5745# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5746# python might then depend on the C++ runtime
5747# This is altered for AIX in order to build the export list before
5748# linking.
5749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5751$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test -z "$LINKCC"
5753then
5754 LINKCC='$(PURIFY) $(MAINCC)'
5755 case $ac_sys_system in
5756 AIX*)
5757 exp_extra="\"\""
5758 if test $ac_sys_release -ge 5 -o \
5759 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5760 exp_extra="."
5761 fi
5762 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763 QNX*)
5764 # qcc must be used because the other compilers do not
5765 # support -N.
5766 LINKCC=qcc;;
5767 esac
5768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5770$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
5772# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5773# make sure we default having it set to "no": this is used by
5774# distutils.unixccompiler to know if it should add --enable-new-dtags
5775# to linker command lines, and failing to detect GNU ld simply results
5776# in the same bahaviour as before.
5777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5779$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780ac_prog=ld
5781if test "$GCC" = yes; then
5782 ac_prog=`$CC -print-prog-name=ld`
5783fi
5784case `"$ac_prog" -V 2>&1 < /dev/null` in
5785 *GNU*)
5786 GNULD=yes;;
5787 *)
5788 GNULD=no;;
5789esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5791$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5794$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005796if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 enableval=$enable_shared;
5798fi
5799
5800
5801if test -z "$enable_shared"
5802then
5803 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005804 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 enable_shared="yes";;
5806 *)
5807 enable_shared="no";;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5811$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5814$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005816if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005817 enableval=$enable_profiling;
5818fi
5819
5820if test "x$enable_profiling" = xyes; then
5821 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005822 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824/* end confdefs.h. */
5825int main() { return 0; }
5826_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827if ac_fn_c_try_link "$LINENO"; then :
5828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832rm -f core conftest.err conftest.$ac_objext \
5833 conftest$ac_exeext conftest.$ac_ext
5834 CC="$ac_save_cc"
5835else
5836 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5839$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841if test "x$enable_profiling" = xyes; then
5842 BASECFLAGS="-pg $BASECFLAGS"
5843 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
5845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5847$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848
5849# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5850# library that we build, but we do not want to link against it (we
5851# will find it with a -framework option). For this reason there is an
5852# extra variable BLDLIBRARY against which Python and the extension
5853# modules are linked, BLDLIBRARY. This is normally the same as
5854# LDLIBRARY, but empty for MacOSX framework builds.
5855if test "$enable_framework"
5856then
5857 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005858 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 BLDLIBRARY=''
5860else
5861 BLDLIBRARY='$(LDLIBRARY)'
5862fi
5863
5864# Other platforms follow
5865if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005866 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
5870 case $ac_sys_system in
5871 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005872 LDLIBRARY='libpython$(LDVERSION).dll.a'
5873 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ;;
5875 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).so'
5877 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005878 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005880 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005881 then
5882 PY3LIBRARY=libpython3.so
5883 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005885 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
5887 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005890 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005891 then
5892 PY3LIBRARY=libpython3.so
5893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
5895 hp*|HP*)
5896 case `uname -m` in
5897 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ;;
5900 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
5903 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).dylib'
5909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005912 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005915 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
5917 esac
5918else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005919 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 case $ac_sys_system in
5921 CYGWIN*)
5922 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
5925 esac
5926fi
5927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005928if test "$cross_compiling" = yes; then
5929 RUNSHARED=
5930fi
5931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5933$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005936if test -n "$ac_tool_prefix"; then
5937 for ac_prog in ar aal
5938 do
5939 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005943if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945else
5946 if test -n "$AR"; then
5947 ac_cv_prog_AR="$AR" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005956 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 break 2
5959 fi
5960done
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962IFS=$as_save_IFS
5963
5964fi
5965fi
5966AR=$ac_cv_prog_AR
5967if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5969$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970else
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973fi
5974
5975
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005976 test -n "$AR" && break
5977 done
5978fi
5979if test -z "$AR"; then
5980 ac_ct_AR=$AR
5981 for ac_prog in ar aal
5982do
5983 # Extract the first word of "$ac_prog", so it can be a program name with args.
5984set dummy $ac_prog; ac_word=$2
5985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5986$as_echo_n "checking for $ac_word... " >&6; }
5987if ${ac_cv_prog_ac_ct_AR+:} false; then :
5988 $as_echo_n "(cached) " >&6
5989else
5990 if test -n "$ac_ct_AR"; then
5991 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5992else
5993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996 IFS=$as_save_IFS
5997 test -z "$as_dir" && as_dir=.
5998 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006000 ac_cv_prog_ac_ct_AR="$ac_prog"
6001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002 break 2
6003 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006005 done
6006IFS=$as_save_IFS
6007
6008fi
6009fi
6010ac_ct_AR=$ac_cv_prog_ac_ct_AR
6011if test -n "$ac_ct_AR"; then
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6013$as_echo "$ac_ct_AR" >&6; }
6014else
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020 test -n "$ac_ct_AR" && break
6021done
6022
6023 if test "x$ac_ct_AR" = x; then
6024 AR="ar"
6025 else
6026 case $cross_compiling:$ac_tool_warned in
6027yes:)
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6030ac_tool_warned=yes ;;
6031esac
6032 AR=$ac_ct_AR
6033 fi
6034fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035
6036
6037# tweak ARFLAGS only if the user didn't set it on the command line
6038
6039if test -z "$ARFLAGS"
6040then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006041 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042fi
6043
doko@ubuntu.com58844492012-06-30 18:25:32 +02006044if test -n "$ac_tool_prefix"; then
6045 for ac_prog in readelf
6046 do
6047 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if ${ac_cv_prog_READELF+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053else
6054 if test -n "$READELF"; then
6055 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
6062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006064 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6066 break 2
6067 fi
6068done
6069 done
6070IFS=$as_save_IFS
6071
6072fi
6073fi
6074READELF=$ac_cv_prog_READELF
6075if test -n "$READELF"; then
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6077$as_echo "$READELF" >&6; }
6078else
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084 test -n "$READELF" && break
6085 done
6086fi
6087if test -z "$READELF"; then
6088 ac_ct_READELF=$READELF
6089 for ac_prog in readelf
6090do
6091 # Extract the first word of "$ac_prog", so it can be a program name with args.
6092set dummy $ac_prog; ac_word=$2
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
6095if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6096 $as_echo_n "(cached) " >&6
6097else
6098 if test -n "$ac_ct_READELF"; then
6099 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
6106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006108 ac_cv_prog_ac_ct_READELF="$ac_prog"
6109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110 break 2
6111 fi
6112done
6113 done
6114IFS=$as_save_IFS
6115
6116fi
6117fi
6118ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6119if test -n "$ac_ct_READELF"; then
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6121$as_echo "$ac_ct_READELF" >&6; }
6122else
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128 test -n "$ac_ct_READELF" && break
6129done
6130
6131 if test "x$ac_ct_READELF" = x; then
6132 READELF=":"
6133 else
6134 case $cross_compiling:$ac_tool_warned in
6135yes:)
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6138ac_tool_warned=yes ;;
6139esac
6140 READELF=$ac_ct_READELF
6141 fi
6142fi
6143
6144if test "$cross_compiling" = yes; then
6145 case "$READELF" in
6146 readelf|:)
6147 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6148 ;;
6149 esac
6150fi
6151
6152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006155hp*|HP*)
6156 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 if test -z "$INSTALL"
6158 then
6159 INSTALL="${srcdir}/install-sh -c"
6160 fi
6161esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162# Find a good install program. We prefer a C program (faster),
6163# so one script is as good as another. But avoid the broken or
6164# incompatible versions:
6165# SysV /etc/install, /usr/sbin/install
6166# SunOS /usr/etc/install
6167# IRIX /sbin/install
6168# AIX /bin/install
6169# AmigaOS /C/install, which installs bootblocks on floppy discs
6170# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6171# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6172# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6173# OS/2's system install, which has a completely different semantic
6174# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006175# Reject install programs that cannot install multiple files.
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6177$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006179if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181else
6182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 # Account for people who put trailing slashes in PATH elements.
6188case $as_dir/ in #((
6189 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 /usr/ucb/* ) ;;
6193 *)
6194 # OSF1 and SCO ODT 3.0 have their own names for install.
6195 # Don't use installbsd from OSF since it installs stuff as root
6196 # by default.
6197 for ac_prog in ginstall scoinst install; do
6198 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006199 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 if test $ac_prog = install &&
6201 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6202 # AIX install. It has an incompatible calling convention.
6203 :
6204 elif test $ac_prog = install &&
6205 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6206 # program-specific install script used by HP pwplus--don't use.
6207 :
6208 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 rm -rf conftest.one conftest.two conftest.dir
6210 echo one > conftest.one
6211 echo two > conftest.two
6212 mkdir conftest.dir
6213 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6214 test -s conftest.one && test -s conftest.two &&
6215 test -s conftest.dir/conftest.one &&
6216 test -s conftest.dir/conftest.two
6217 then
6218 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6219 break 3
6220 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221 fi
6222 fi
6223 done
6224 done
6225 ;;
6226esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006227
6228 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229IFS=$as_save_IFS
6230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232
6233fi
6234 if test "${ac_cv_path_install+set}" = set; then
6235 INSTALL=$ac_cv_path_install
6236 else
6237 # As a last resort, use the slow shell script. Don't cache a
6238 # value for INSTALL within a source directory, because that will
6239 # break other packages using the cache if that directory is
6240 # removed, or if the value is a relative name.
6241 INSTALL=$ac_install_sh
6242 fi
6243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6245$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246
6247# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6248# It thinks the first close brace ends the variable substitution.
6249test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6250
6251test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6252
6253test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6254
Matthias Klose93a0ef12012-03-15 18:08:34 +01006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6256$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6257if test -z "$MKDIR_P"; then
6258 if ${ac_cv_path_mkdir+:} false; then :
6259 $as_echo_n "(cached) " >&6
6260else
6261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6263do
6264 IFS=$as_save_IFS
6265 test -z "$as_dir" && as_dir=.
6266 for ac_prog in mkdir gmkdir; do
6267 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006268 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006269 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6270 'mkdir (GNU coreutils) '* | \
6271 'mkdir (coreutils) '* | \
6272 'mkdir (fileutils) '4.1*)
6273 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6274 break 3;;
6275 esac
6276 done
6277 done
6278 done
6279IFS=$as_save_IFS
6280
6281fi
6282
6283 test -d ./--version && rmdir ./--version
6284 if test "${ac_cv_path_mkdir+set}" = set; then
6285 MKDIR_P="$ac_cv_path_mkdir -p"
6286 else
6287 # As a last resort, use the slow shell script. Don't cache a
6288 # value for MKDIR_P within a source directory, because that will
6289 # break other packages using the cache if that directory is
6290 # removed, or if the value is a relative name.
6291 MKDIR_P="$ac_install_sh -d"
6292 fi
6293fi
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6295$as_echo "$MKDIR_P" >&6; }
6296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297
6298# Not every filesystem supports hard links
6299
6300if test -z "$LN" ; then
6301 case $ac_sys_system in
6302 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 *) LN=ln;;
6304 esac
6305fi
6306
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006307# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006308
6309ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6313$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006316if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 withval=$with_pydebug;
6318if test "$withval" != no
6319then
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6324$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006326 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006327else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329fi
6330else
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333fi
6334
6335
T. Woutersddbfa2c2017-05-23 01:30:49 +02006336# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6337# the ABI. This allows enabling assertions without changing the ABI.
6338assertions='false'
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6340$as_echo_n "checking for --with-assertions... " >&6; }
6341
6342# Check whether --with-assertions was given.
6343if test "${with_assertions+set}" = set; then :
6344 withval=$with_assertions;
6345if test "$withval" != no
6346then
6347 assertions='true'
6348fi
6349fi
6350
6351if test "$assertions" = 'true'; then
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6353$as_echo "yes" >&6; }
6354elif test "$Py_DEBUG" = 'true'; then
6355 assertions='true'
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6357$as_echo "implied by --with-pydebug" >&6; }
6358else
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
Brett Cannon63d98bc2016-09-06 17:12:40 -07006363# Enable optimization flags
6364
6365
6366Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6368$as_echo_n "checking for --enable-optimizations... " >&6; }
6369# Check whether --enable-optimizations was given.
6370if test "${enable_optimizations+set}" = set; then :
6371 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006372if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006373then
6374 Py_OPT='true'
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6376$as_echo "yes" >&6; };
6377else
6378 Py_OPT='false'
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6380$as_echo "no" >&6; };
6381fi
6382else
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006388 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6389 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006390 # 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 +00006391 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006392 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006393 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006394 DEF_MAKE_RULE="build_all"
6395else
6396 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006397 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006398 DEF_MAKE_RULE="all"
6399fi
6400
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006401# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6402# normal names in the default $PATH (ie: Ubuntu). They exist under the
6403# non-suffixed name in their versioned llvm directory.
6404
6405llvm_bin_dir=''
6406llvm_path="${PATH}"
6407if test "${CC}" = "clang"
6408then
6409 clang_bin=`which clang`
6410 # Some systems install clang elsewhere as a symlink to the real path
6411 # which is where the related llvm tools are located.
6412 if test -L "${clang_bin}"
6413 then
6414 clang_dir=`dirname "${clang_bin}"`
6415 clang_bin=`readlink "${clang_bin}"`
6416 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6417 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6418 fi
6419fi
6420
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006421# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6423$as_echo_n "checking for --with-lto... " >&6; }
6424
6425# Check whether --with-lto was given.
6426if test "${with_lto+set}" = set; then :
6427 withval=$with_lto;
6428if test "$withval" != no
6429then
6430 Py_LTO='true'
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6432$as_echo "yes" >&6; };
6433else
6434 Py_LTO='false'
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; };
6437fi
6438else
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
6441fi
6442
6443if test "$Py_LTO" = 'true' ; then
6444 case $CC in
6445 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006446
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006448$as_echo_n "checking target system type... " >&6; }
6449if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450 $as_echo_n "(cached) " >&6
6451else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006452 if test "x$target_alias" = x; then
6453 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006454else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006455 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6456 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6457fi
6458
6459fi
6460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6461$as_echo "$ac_cv_target" >&6; }
6462case $ac_cv_target in
6463*-*-*) ;;
6464*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6465esac
6466target=$ac_cv_target
6467ac_save_IFS=$IFS; IFS='-'
6468set x $ac_cv_target
6469shift
6470target_cpu=$1
6471target_vendor=$2
6472shift; shift
6473# Remember, the first character of IFS is used to create $*,
6474# except with old shells:
6475target_os=$*
6476IFS=$ac_save_IFS
6477case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6478
6479
6480# The aliases save the names the user supplied, while $host etc.
6481# will get canonicalized.
6482test -n "$target_alias" &&
6483 test "$program_prefix$program_suffix$program_transform_name" = \
6484 NONENONEs,x,x, &&
6485 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006486# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6487set dummy $target_alias-llvm-ar; ac_word=$2
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6489$as_echo_n "checking for $ac_word... " >&6; }
6490if ${ac_cv_path_LLVM_AR+:} false; then :
6491 $as_echo_n "(cached) " >&6
6492else
6493 case $LLVM_AR in
6494 [\\/]* | ?:[\\/]*)
6495 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6496 ;;
6497 *)
6498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499for as_dir in ${llvm_path}
6500do
6501 IFS=$as_save_IFS
6502 test -z "$as_dir" && as_dir=.
6503 for ac_exec_ext in '' $ac_executable_extensions; do
6504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6505 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6507 break 2
6508 fi
6509done
6510 done
6511IFS=$as_save_IFS
6512
6513 ;;
6514esac
6515fi
6516LLVM_AR=$ac_cv_path_LLVM_AR
6517if test -n "$LLVM_AR"; then
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6519$as_echo "$LLVM_AR" >&6; }
6520else
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }
6523fi
6524
6525
6526if test -z "$ac_cv_path_LLVM_AR"; then
6527 if test "$build" = "$target"; then
6528 ac_pt_LLVM_AR=$LLVM_AR
6529 # Extract the first word of "llvm-ar", so it can be a program name with args.
6530set dummy llvm-ar; ac_word=$2
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 case $ac_pt_LLVM_AR in
6537 [\\/]* | ?:[\\/]*)
6538 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6539 ;;
6540 *)
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in ${llvm_path}
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550 break 2
6551 fi
6552done
6553 done
6554IFS=$as_save_IFS
6555
6556 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6557 ;;
6558esac
6559fi
6560ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6561if test -n "$ac_pt_LLVM_AR"; then
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6563$as_echo "$ac_pt_LLVM_AR" >&6; }
6564else
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569 LLVM_AR=$ac_pt_LLVM_AR
6570 else
6571 LLVM_AR="''"
6572 fi
6573else
6574 LLVM_AR="$ac_cv_path_LLVM_AR"
6575fi
6576
6577
6578 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6579 then
6580 LLVM_AR_FOUND="found"
6581 else
6582 LLVM_AR_FOUND="not-found"
6583 fi
6584 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6585 then
6586 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6587 if test -n "${found_llvm_ar}"
6588 then
6589 LLVM_AR='/usr/bin/xcrun llvm-ar'
6590 LLVM_AR_FOUND=found
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6592$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6593 fi
6594 fi
6595 if test $LLVM_AR_FOUND = not-found
6596 then
6597 LLVM_PROFR_ERR=yes
6598 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6599 else
6600 LLVM_AR_ERR=no
6601 fi
6602 AR="${LLVM_AR}"
6603 case $ac_sys_system in
6604 Darwin*)
6605 # Any changes made here should be reflected in the GCC+Darwin case below
6606 LTOFLAGS="-flto -Wl,-export_dynamic"
6607 ;;
6608 *)
6609 LTOFLAGS="-flto"
6610 ;;
6611 esac
6612 ;;
6613 *gcc*)
6614 case $ac_sys_system in
6615 Darwin*)
6616 LTOFLAGS="-flto -Wl,-export_dynamic"
6617 ;;
6618 *)
6619 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6620 ;;
6621 esac
6622 ;;
6623 esac
6624
6625 if test "$ac_cv_prog_cc_g" = "yes"
6626 then
6627 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6628 # to get debug symbols.
6629 LTOFLAGS="$LTOFLAGS -g"
6630 fi
6631
stratakisf92c7aa2018-12-04 15:54:01 +01006632 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006633 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006634fi
6635
6636# Enable PGO flags.
6637
6638
6639
6640
6641
6642
Gregory P. Smith799520c2016-09-07 16:10:00 -07006643# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6644set dummy $target_alias-llvm-profdata; ac_word=$2
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646$as_echo_n "checking for $ac_word... " >&6; }
6647if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6648 $as_echo_n "(cached) " >&6
6649else
6650 case $LLVM_PROFDATA in
6651 [\\/]* | ?:[\\/]*)
6652 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6653 ;;
6654 *)
6655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657do
6658 IFS=$as_save_IFS
6659 test -z "$as_dir" && as_dir=.
6660 for ac_exec_ext in '' $ac_executable_extensions; do
6661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6664 break 2
6665 fi
6666done
6667 done
6668IFS=$as_save_IFS
6669
Gregory P. Smith799520c2016-09-07 16:10:00 -07006670 ;;
6671esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6674if test -n "$LLVM_PROFDATA"; then
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6676$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006677else
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679$as_echo "no" >&6; }
6680fi
6681
6682
Gregory P. Smith799520c2016-09-07 16:10:00 -07006683if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6684 if test "$build" = "$target"; then
6685 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6686 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6687set dummy llvm-profdata; ac_word=$2
6688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689$as_echo_n "checking for $ac_word... " >&6; }
6690if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6691 $as_echo_n "(cached) " >&6
6692else
6693 case $ac_pt_LLVM_PROFDATA in
6694 [\\/]* | ?:[\\/]*)
6695 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6696 ;;
6697 *)
6698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699for as_dir in ${llvm_path}
6700do
6701 IFS=$as_save_IFS
6702 test -z "$as_dir" && as_dir=.
6703 for ac_exec_ext in '' $ac_executable_extensions; do
6704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6705 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707 break 2
6708 fi
6709done
6710 done
6711IFS=$as_save_IFS
6712
6713 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6714 ;;
6715esac
6716fi
6717ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6718if test -n "$ac_pt_LLVM_PROFDATA"; then
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6720$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6721else
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6727 else
6728 LLVM_PROFDATA="''"
6729 fi
6730else
6731 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6732fi
6733
6734
6735if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6736then
6737 LLVM_PROF_FOUND="found"
6738else
6739 LLVM_PROF_FOUND="not-found"
6740fi
6741if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6742then
6743 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6744 if test -n "${found_llvm_profdata}"
6745 then
6746 # llvm-profdata isn't directly in $PATH in some cases.
6747 # https://apple.stackexchange.com/questions/197053/
6748 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6749 LLVM_PROF_FOUND=found
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6751$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6752 fi
6753fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754LLVM_PROF_ERR=no
6755case $CC in
6756 *clang*)
6757 # Any changes made here should be reflected in the GCC+Darwin case below
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6762 if test $LLVM_PROF_FOUND = not-found
6763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 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 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *gcc*)
6772 case $ac_sys_system in
6773 Darwin*)
6774 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6775 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779 then
6780 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 if test "${REQUIRE_PGO}" = "yes"
6782 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006783 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 -07006784 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 fi
6786 ;;
6787 *)
6788 PGO_PROF_GEN_FLAG="-fprofile-generate"
6789 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6790 LLVM_PROF_MERGER="true"
6791 LLVM_PROF_FILE=""
6792 ;;
6793 esac
6794 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006795 *icc*)
6796 PGO_PROF_GEN_FLAG="-prof-gen"
6797 PGO_PROF_USE_FLAG="-prof-use"
6798 LLVM_PROF_MERGER="true"
6799 LLVM_PROF_FILE=""
6800 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801esac
6802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6804# merged with this chunk of code?
6805
6806# Optimizer/debugger flags
6807# ------------------------
6808# (The following bit of code is complicated enough - please keep things
6809# indented properly. Just pretend you're editing Python code. ;-)
6810
6811# There are two parallel sets of case statements below, one that checks to
6812# see if OPT was set and one that does BASECFLAGS setting based upon
6813# compiler and platform. BASECFLAGS tweaks need to be made even if the
6814# user set OPT.
6815
Victor Stinner23a683a2019-04-12 21:27:37 +02006816case $CC in
6817 *clang*)
6818 cc_is_clang=1
6819 ;;
6820 *)
6821 if $CC --version 2>&1 | grep -q clang
6822 then
6823 cc_is_clang=1
6824 else
6825 cc_is_clang=
6826 fi
6827esac
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# tweak OPT based on compiler and platform, only if the user didn't set
6830# it on the command line
6831
Victor Stinner9ed34a82017-05-02 22:35:58 +02006832
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006833if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834then
6835 case $GCC in
6836 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6838 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6839 WRAP="-fwrapv"
6840 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006841
Victor Stinner35f3d242017-04-21 12:35:24 +02006842 if test -n "${cc_is_clang}"
6843 then
6844 # Clang also needs -fwrapv
6845 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006846 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6847 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006848 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006849 fi
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 case $ac_cv_prog_cc_g in
6852 yes)
6853 if test "$Py_DEBUG" = 'true' ; then
6854 # Optimization messes up debuggers, so turn it off for
6855 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006856 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006857 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006858 else
Victor Stinner28205b22017-04-21 11:24:34 +02006859 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006860 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 else
Victor Stinner28205b22017-04-21 11:24:34 +02006862 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 fi
6864 ;;
6865 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006866 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 ;;
6868 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 case $ac_sys_system in
6871 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6872 ;;
6873 esac
6874 ;;
6875
6876 *)
6877 OPT="-O"
6878 ;;
6879 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880fi
6881
Victor Stinner23a683a2019-04-12 21:27:37 +02006882if test -n "${cc_is_clang}"
6883then
6884 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6885 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6886 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6887 # instruction which can lead to segmentation fault. Instruct clang that
6888 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6889 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6890 # on 16 bytes.
6891 #
Victor Stinnera304b132019-04-13 00:51:07 +02006892 # Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
Victor Stinner23a683a2019-04-12 21:27:37 +02006893 # since third party C extensions can have the same issue.
Victor Stinnera304b132019-04-13 00:51:07 +02006894 #
6895 # Check if -fmax-type-align flag is supported (it's not supported by old
6896 # clang versions):
6897 if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
6898 CFLAGS="$CFLAGS -fmax-type-align=8"
6899 fi
Victor Stinner23a683a2019-04-12 21:27:37 +02006900fi
6901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902
6903
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006904
stratakiscf10a752018-12-19 18:19:01 +01006905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906# The -arch flags for universal builds on OSX
6907UNIVERSAL_ARCH_FLAGS=
6908
6909
6910# tweak BASECFLAGS based on compiler and platform
6911case $GCC in
6912yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006913 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006914
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6916$as_echo_n "checking for -Wextra... " >&6; }
6917 ac_save_cc="$CC"
6918 CC="$CC -Wextra -Werror"
6919 if ${ac_cv_extra_warnings+:} false; then :
6920 $as_echo_n "(cached) " >&6
6921else
6922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6923/* end confdefs.h. */
6924
6925
6926int
6927main ()
6928{
6929
6930 ;
6931 return 0;
6932}
6933
6934_ACEOF
6935if ac_fn_c_try_compile "$LINENO"; then :
6936
6937 ac_cv_extra_warnings=yes
6938
6939else
6940
6941 ac_cv_extra_warnings=no
6942
6943fi
6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6945fi
6946
6947 CC="$ac_save_cc"
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6949$as_echo "$ac_cv_extra_warnings" >&6; }
6950
6951 if test $ac_cv_extra_warnings = yes
6952 then
6953 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6954 fi
6955
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956 # Python doesn't violate C99 aliasing rules, but older versions of
6957 # GCC produce warnings for legal Python code. Enable
6958 # -fno-strict-aliasing on versions of GCC that support but produce
6959 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6961$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962 ac_save_cc="$CC"
6963 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006965 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006970
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006972int
6973main ()
6974{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006975
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976 ;
6977 return 0;
6978}
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006981if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006982
6983 CC="$ac_save_cc -fstrict-aliasing"
6984 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986/* end confdefs.h. */
6987
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006988 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989int
6990main ()
6991{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006992double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993 ;
6994 return 0;
6995}
Matthias Kloseb159a552010-04-25 21:00:44 +00006996
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006998if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
7000 ac_cv_no_strict_aliasing=no
7001
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002else
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
7004 ac_cv_no_strict_aliasing=yes
7005
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007006fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007008
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009else
Matthias Kloseb159a552010-04-25 21:00:44 +00007010
7011 ac_cv_no_strict_aliasing=no
7012
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007015fi
7016
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7020$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 then
7023 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7024 fi
7025
Zachary Ware5af85642015-12-21 12:09:17 -06007026 # ICC doesn't recognize the option, but only emits a warning
7027 ## XXX does it emit an unused result warning and can it be disabled?
7028 case "$CC" in
7029 *icc*)
7030 ac_cv_disable_unused_result_warning=no
7031 ;;
7032 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7034$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7035 ac_save_cc="$CC"
7036 CC="$CC -Wunused-result -Werror"
7037 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007038 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007039 $as_echo_n "(cached) " >&6
7040else
7041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7042/* end confdefs.h. */
7043
7044
7045int
7046main ()
7047{
7048
7049 ;
7050 return 0;
7051}
7052
7053_ACEOF
7054if ac_fn_c_try_compile "$LINENO"; then :
7055
7056 ac_cv_disable_unused_result_warning=yes
7057
7058else
7059
7060 ac_cv_disable_unused_result_warning=no
7061
7062fi
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064fi
7065
7066 CFLAGS="$save_CFLAGS"
7067 CC="$ac_save_cc"
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7069$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007070 ;;
7071 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007072
7073 if test $ac_cv_disable_unused_result_warning = yes
7074 then
7075 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007076 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7077 fi
7078
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7080$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7081 ac_save_cc="$CC"
7082 CC="$CC -Wunused-parameter -Werror"
7083 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7084 $as_echo_n "(cached) " >&6
7085else
7086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7087/* end confdefs.h. */
7088
7089
7090int
7091main ()
7092{
7093
7094 ;
7095 return 0;
7096}
7097
7098_ACEOF
7099if ac_fn_c_try_compile "$LINENO"; then :
7100
7101 ac_cv_disable_unused_parameter_warning=yes
7102
7103else
7104
7105 ac_cv_disable_unused_parameter_warning=no
7106
7107fi
7108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7109fi
7110
7111 CC="$ac_save_cc"
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7113$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7114
7115 if test $ac_cv_disable_unused_parameter_warning = yes
7116 then
7117 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7118 fi
7119
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7121$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7122 ac_save_cc="$CC"
7123 CC="$CC -Wmissing-field-initializers -Werror"
7124 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7125 $as_echo_n "(cached) " >&6
7126else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128/* end confdefs.h. */
7129
7130
7131int
7132main ()
7133{
7134
7135 ;
7136 return 0;
7137}
7138
7139_ACEOF
7140if ac_fn_c_try_compile "$LINENO"; then :
7141
7142 ac_cv_disable_missing_field_initializers=yes
7143
7144else
7145
7146 ac_cv_disable_missing_field_initializers=no
7147
7148fi
7149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7150fi
7151
7152 CC="$ac_save_cc"
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7154$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7155
7156 if test $ac_cv_disable_missing_field_initializers = yes
7157 then
7158 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007159 fi
7160
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7162$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7163 ac_save_cc="$CC"
7164 CC="$CC -Wsign-compare"
7165 save_CFLAGS="$CFLAGS"
7166 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7167 $as_echo_n "(cached) " >&6
7168else
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170/* end confdefs.h. */
7171
7172
7173int
7174main ()
7175{
7176
7177 ;
7178 return 0;
7179}
7180
7181_ACEOF
7182if ac_fn_c_try_compile "$LINENO"; then :
7183
7184 ac_cv_enable_sign_compare_warning=yes
7185
7186else
7187
7188 ac_cv_enable_sign_compare_warning=no
7189
7190fi
7191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7192fi
7193
7194 CFLAGS="$save_CFLAGS"
7195 CC="$ac_save_cc"
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7197$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7198
7199 if test $ac_cv_enable_sign_compare_warning = yes
7200 then
7201 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7202 fi
7203
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7205$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7206 ac_save_cc="$CC"
7207 CC="$CC -Wunreachable-code"
7208 save_CFLAGS="$CFLAGS"
7209 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7210 $as_echo_n "(cached) " >&6
7211else
7212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7213/* end confdefs.h. */
7214
7215
7216int
7217main ()
7218{
7219
7220 ;
7221 return 0;
7222}
7223
7224_ACEOF
7225if ac_fn_c_try_compile "$LINENO"; then :
7226
7227 ac_cv_enable_unreachable_code_warning=yes
7228
7229else
7230
7231 ac_cv_enable_unreachable_code_warning=no
7232
7233fi
7234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7235fi
7236
7237 CFLAGS="$save_CFLAGS"
7238 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007239
7240 # Don't enable unreachable code warning in debug mode, since it usually
7241 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007242 # Issue #24324: Unfortunately, the unreachable code warning does not work
7243 # correctly on gcc and has been silently removed from the compiler.
7244 # It is supported on clang but on OS X systems gcc may be an alias
7245 # for clang. Try to determine if the compiler is not really gcc and,
7246 # if so, only then enable the warning.
7247 if test $ac_cv_enable_unreachable_code_warning = yes && \
7248 test "$Py_DEBUG" != "true" && \
7249 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007250 then
7251 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007252 else
7253 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007254 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7256$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007257
INADA Naokie3364842018-06-05 20:40:53 +09007258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7259$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7260 ac_save_cc="$CC"
7261 CC="$CC -Werror -Wstrict-prototypes"
7262 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7263 $as_echo_n "(cached) " >&6
7264else
7265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7266/* end confdefs.h. */
7267
7268
7269int
7270main ()
7271{
7272
7273 ;
7274 return 0;
7275}
7276
7277_ACEOF
7278if ac_fn_c_try_compile "$LINENO"; then :
7279
7280 ac_cv_enable_strict_prototypes_warning=yes
7281
7282else
7283
7284 ac_cv_enable_strict_prototypes_warning=no
7285
7286fi
7287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7288fi
7289
7290 CC="$ac_save_cc"
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7292$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7293
7294 if test $ac_cv_enable_strict_prototypes_warning = yes
7295 then
7296 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7297 fi
7298
Victor Stinner193ee0a2017-02-06 14:24:00 +01007299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7300$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7301 ac_save_cc="$CC"
7302 CC="$CC -Werror=implicit-function-declaration"
7303 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7304 $as_echo_n "(cached) " >&6
7305else
7306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7307/* end confdefs.h. */
7308
7309
7310int
7311main ()
7312{
7313
7314 ;
7315 return 0;
7316}
7317
7318_ACEOF
7319if ac_fn_c_try_compile "$LINENO"; then :
7320
7321 ac_cv_enable_implicit_function_declaration_error=yes
7322
7323else
7324
7325 ac_cv_enable_implicit_function_declaration_error=no
7326
7327fi
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329fi
7330
7331 CC="$ac_save_cc"
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7333$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7334
7335 if test $ac_cv_enable_implicit_function_declaration_error = yes
7336 then
7337 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7338 fi
7339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7341 # support. Without this, treatment of subnormals doesn't follow
7342 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007343 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344 alpha*)
7345 BASECFLAGS="$BASECFLAGS -mieee"
7346 ;;
7347 esac
7348
7349 case $ac_sys_system in
7350 SCO_SV*)
7351 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7352 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007353
Ned Deily87adb6e2013-10-18 21:09:56 -07007354 Darwin*)
7355 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7356 # used to be here, but non-Apple gcc doesn't accept them.
7357 if test "${CC}" = gcc
7358 then
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007360$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007361 case "${UNIVERSALSDK}" in
7362 */MacOSX10.4u.sdk)
7363 # Build using 10.4 SDK, force usage of gcc when the
7364 # compiler is gcc, otherwise the user will get very
7365 # confusing error messages when building on OSX 10.6
7366 CC=gcc-4.0
7367 CPP=cpp-4.0
7368 ;;
7369 esac
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007371$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 if test "${enable_universalsdk}"
7375 then
7376 case "$UNIVERSAL_ARCHS" in
7377 32-bit)
7378 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7379 LIPO_32BIT_FLAGS=""
7380 ARCH_RUN_32BIT=""
7381 ;;
7382 64-bit)
7383 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7384 LIPO_32BIT_FLAGS=""
7385 ARCH_RUN_32BIT="true"
7386 ;;
7387 all)
7388 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7389 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7390 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7391 ;;
7392 intel)
7393 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7394 LIPO_32BIT_FLAGS="-extract i386"
7395 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7396 ;;
7397 intel-32)
7398 UNIVERSAL_ARCH_FLAGS="-arch i386"
7399 LIPO_32BIT_FLAGS=""
7400 ARCH_RUN_32BIT=""
7401 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007402 intel-64)
7403 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7404 LIPO_32BIT_FLAGS=""
7405 ARCH_RUN_32BIT="true"
7406 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 3-way)
7408 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7409 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7410 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7411 ;;
7412 *)
7413 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7414 ;;
7415 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 if test "${UNIVERSALSDK}" != "/"
7418 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007419 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7420 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007422 else
7423 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7424 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007425 fi
7426 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427
Ned Deily87adb6e2013-10-18 21:09:56 -07007428 # Calculate an appropriate deployment target for this build:
7429 # The deployment target value is used explicitly to enable certain
7430 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007431 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 # component of the string returned by distutils.get_platform().
7433 #
7434 # Use the value from:
7435 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7436 # 2. the operating system version of the build machine if >= 10.6
7437 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7438 # below to pick either 10.3, 10.4, or 10.5 as the target.
7439 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7442$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007443 cur_target_major=`sw_vers -productVersion | \
7444 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7445 cur_target_minor=`sw_vers -productVersion | \
7446 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7447 cur_target="${cur_target_major}.${cur_target_minor}"
7448 if test ${cur_target_major} -eq 10 && \
7449 test ${cur_target_minor} -ge 3 && \
7450 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 then
Ned Deily36820b62014-06-25 13:44:22 -07007452 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 cur_target=10.3
7454 if test ${enable_universalsdk}
7455 then
7456 case "$UNIVERSAL_ARCHS" in
7457 all|3-way|intel|64-bit)
7458 # These configurations were first supported in 10.5
7459 cur_target='10.5'
7460 ;;
7461 esac
7462 else
7463 if test `/usr/bin/arch` = "i386"
7464 then
7465 # 10.4 was the first release to support Intel archs
7466 cur_target="10.4"
7467 fi
7468 fi
7469 fi
7470 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007471
Ned Deily87adb6e2013-10-18 21:09:56 -07007472 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7473 # environment with a value that is the same as what we'll use
7474 # in the Makefile to ensure that we'll get the same compiler
7475 # environment during configure and build time.
7476 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7477 export MACOSX_DEPLOYMENT_TARGET
7478 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7480$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007481
Ned Deily87adb6e2013-10-18 21:09:56 -07007482 # end of Darwin* tests
7483 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 esac
7485 ;;
7486
7487*)
7488 case $ac_sys_system in
7489 OpenUNIX*|UnixWare*)
7490 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7491 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492 SCO_SV*)
7493 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7494 ;;
7495 esac
7496 ;;
7497esac
7498
Zachary Ware5af85642015-12-21 12:09:17 -06007499# ICC needs -fp-model strict or floats behave badly
7500case "$CC" in
7501*icc*)
7502 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7503 ;;
7504esac
7505
T. Woutersddbfa2c2017-05-23 01:30:49 +02007506if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507 :
7508else
7509 OPT="-DNDEBUG $OPT"
7510fi
7511
7512if test "$ac_arch_flags"
7513then
7514 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7515fi
7516
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517# On some compilers, pthreads are available without further options
7518# (e.g. MacOS X). On some of these systems, the compiler will not
7519# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7520# So we have to see first whether pthreads are available without
7521# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7523$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007524if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526else
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528 ac_cv_pthread_is_default=no
7529else
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531/* end confdefs.h. */
7532
Stefan Krah7dba5942012-11-22 22:49:11 +01007533#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534#include <pthread.h>
7535
7536void* routine(void* p){return NULL;}
7537
7538int main(){
7539 pthread_t p;
7540 if(pthread_create(&p,NULL,routine,NULL)!=0)
7541 return 1;
7542 (void)pthread_detach(p);
7543 return 0;
7544}
7545
7546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007547if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548
7549 ac_cv_pthread_is_default=yes
7550 ac_cv_kthread=no
7551 ac_cv_pthread=no
7552
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558fi
7559
7560
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561fi
7562
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7564$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565
7566
7567if test $ac_cv_pthread_is_default = yes
7568then
7569 ac_cv_kpthread=no
7570else
7571# -Kpthread, if available, provides the right #defines
7572# and linker options to make pthread_create available
7573# Some compilers won't report that they do not support -Kpthread,
7574# so we need to run a program to see whether it really made the
7575# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7577$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007578if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580else
7581 ac_save_cc="$CC"
7582CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007583if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584 ac_cv_kpthread=no
7585else
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587/* end confdefs.h. */
7588
Stefan Krah7dba5942012-11-22 22:49:11 +01007589#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590#include <pthread.h>
7591
7592void* routine(void* p){return NULL;}
7593
7594int main(){
7595 pthread_t p;
7596 if(pthread_create(&p,NULL,routine,NULL)!=0)
7597 return 1;
7598 (void)pthread_detach(p);
7599 return 0;
7600}
7601
7602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007603if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604 ac_cv_kpthread=yes
7605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610fi
7611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612CC="$ac_save_cc"
7613fi
7614
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7616$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617fi
7618
7619if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7620then
7621# -Kthread, if available, provides the right #defines
7622# and linker options to make pthread_create available
7623# Some compilers won't report that they do not support -Kthread,
7624# so we need to run a program to see whether it really made the
7625# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7627$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007628if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630else
7631 ac_save_cc="$CC"
7632CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007633if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634 ac_cv_kthread=no
7635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637/* end confdefs.h. */
7638
Stefan Krah7dba5942012-11-22 22:49:11 +01007639#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640#include <pthread.h>
7641
7642void* routine(void* p){return NULL;}
7643
7644int main(){
7645 pthread_t p;
7646 if(pthread_create(&p,NULL,routine,NULL)!=0)
7647 return 1;
7648 (void)pthread_detach(p);
7649 return 0;
7650}
7651
7652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007653if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654 ac_cv_kthread=yes
7655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660fi
7661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662CC="$ac_save_cc"
7663fi
7664
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7666$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667fi
7668
7669if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7670then
7671# -pthread, if available, provides the right #defines
7672# and linker options to make pthread_create available
7673# Some compilers won't report that they do not support -pthread,
7674# so we need to run a program to see whether it really made the
7675# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7677$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007678if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680else
7681 ac_save_cc="$CC"
7682CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007683if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684 ac_cv_pthread=no
7685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687/* end confdefs.h. */
7688
Stefan Krah7dba5942012-11-22 22:49:11 +01007689#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690#include <pthread.h>
7691
7692void* routine(void* p){return NULL;}
7693
7694int main(){
7695 pthread_t p;
7696 if(pthread_create(&p,NULL,routine,NULL)!=0)
7697 return 1;
7698 (void)pthread_detach(p);
7699 return 0;
7700}
7701
7702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007703if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704 ac_cv_pthread=yes
7705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7709 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710fi
7711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712CC="$ac_save_cc"
7713fi
7714
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7716$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717fi
7718
7719# If we have set a CC compiler flag for thread support then
7720# check if it works for CXX, too.
7721ac_cv_cxx_thread=no
7722if test ! -z "$CXX"
7723then
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7725$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726ac_save_cxx="$CXX"
7727
7728if test "$ac_cv_kpthread" = "yes"
7729then
7730 CXX="$CXX -Kpthread"
7731 ac_cv_cxx_thread=yes
7732elif test "$ac_cv_kthread" = "yes"
7733then
7734 CXX="$CXX -Kthread"
7735 ac_cv_cxx_thread=yes
7736elif test "$ac_cv_pthread" = "yes"
7737then
7738 CXX="$CXX -pthread"
7739 ac_cv_cxx_thread=yes
7740fi
7741
7742if test $ac_cv_cxx_thread = yes
7743then
7744 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7745 $CXX -c conftest.$ac_ext 2>&5
7746 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7747 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7748 then
7749 ac_cv_cxx_thread=yes
7750 else
7751 ac_cv_cxx_thread=no
7752 fi
7753 rm -fr conftest*
7754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7756$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757fi
7758CXX="$ac_save_cxx"
7759
7760
7761# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7763$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007764if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768/* end confdefs.h. */
7769#include <stdlib.h>
7770#include <stdarg.h>
7771#include <string.h>
7772#include <float.h>
7773
7774int
7775main ()
7776{
7777
7778 ;
7779 return 0;
7780}
7781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783 ac_cv_header_stdc=yes
7784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7788
7789if test $ac_cv_header_stdc = yes; then
7790 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792/* end confdefs.h. */
7793#include <string.h>
7794
7795_ACEOF
7796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 $EGREP "memchr" >/dev/null 2>&1; then :
7798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799else
7800 ac_cv_header_stdc=no
7801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007802rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803
7804fi
7805
7806if test $ac_cv_header_stdc = yes; then
7807 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809/* end confdefs.h. */
7810#include <stdlib.h>
7811
7812_ACEOF
7813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 $EGREP "free" >/dev/null 2>&1; then :
7815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816else
7817 ac_cv_header_stdc=no
7818fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007819rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820
7821fi
7822
7823if test $ac_cv_header_stdc = yes; then
7824 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826 :
7827else
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829/* end confdefs.h. */
7830#include <ctype.h>
7831#include <stdlib.h>
7832#if ((' ' & 0x0FF) == 0x020)
7833# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7834# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7835#else
7836# define ISLOWER(c) \
7837 (('a' <= (c) && (c) <= 'i') \
7838 || ('j' <= (c) && (c) <= 'r') \
7839 || ('s' <= (c) && (c) <= 'z'))
7840# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7841#endif
7842
7843#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7844int
7845main ()
7846{
7847 int i;
7848 for (i = 0; i < 256; i++)
7849 if (XOR (islower (i), ISLOWER (i))
7850 || toupper (i) != TOUPPER (i))
7851 return 2;
7852 return 0;
7853}
7854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_run "$LINENO"; then :
7856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007862fi
7863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007864fi
7865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7867$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868if test $ac_cv_header_stdc = yes; then
7869
Matthias Kloseb9621712010-04-24 17:59:49 +00007870$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007871
7872fi
7873
stratakise768c862018-01-23 16:11:24 +01007874for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007875fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007876ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007877sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007878utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007879poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007880sys/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 +01007881sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007882sys/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 +01007883sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007884sys/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 -07007885libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007886linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007887sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007888do :
7889 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7890ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007891if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007893#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007894_ACEOF
7895
7896fi
7897
Guido van Rossum627b2d71993-12-24 10:39:16 +00007898done
7899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007900ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007901for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7904$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007905if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007910#include <sys/types.h>
7911#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007912
Martin v. Löwis11437992002-04-12 09:54:03 +00007913int
7914main ()
7915{
7916if ((DIR *) 0)
7917return 0;
7918 ;
7919 return 0;
7920}
7921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007922if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007924else
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929eval ac_res=\$$as_ac_Header
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7931$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007932if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007935_ACEOF
7936
7937ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007939
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007940done
7941# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7942if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7944$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007945if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007947else
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952/* Override any GCC internal prototype to avoid an error.
7953 Use char because int might match the return type of a GCC
7954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955#ifdef __cplusplus
7956extern "C"
7957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007958char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007959int
7960main ()
7961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 ;
7964 return 0;
7965}
7966_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967for ac_lib in '' dir; do
7968 if test -z "$ac_lib"; then
7969 ac_res="none required"
7970 else
7971 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007979 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982done
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985else
7986 ac_cv_search_opendir=no
7987fi
7988rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007989LIBS=$ac_func_search_save_LIBS
7990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7992$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007994if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007998
Michael W. Hudson54241132001-12-07 15:38:26 +00007999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8001$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008002if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008004else
8005 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009/* Override any GCC internal prototype to avoid an error.
8010 Use char because int might match the return type of a GCC
8011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012#ifdef __cplusplus
8013extern "C"
8014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008015char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008016int
8017main ()
8018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ;
8021 return 0;
8022}
8023_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024for ac_lib in '' x; do
8025 if test -z "$ac_lib"; then
8026 ac_res="none required"
8027 else
8028 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034rm -f core conftest.err conftest.$ac_objext \
8035 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008036 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039done
Victor Stinnere0be4232011-10-25 13:06:09 +02008040if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042else
8043 ac_cv_search_opendir=no
8044fi
8045rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008046LIBS=$ac_func_search_save_LIBS
8047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8049$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054fi
8055
8056fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8059$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008062else
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008064/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008065#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008066int
8067main ()
8068{
8069return makedev(0, 0);
8070 ;
8071 return 0;
8072}
8073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008075 ac_cv_header_sys_types_h_makedev=yes
8076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079rm -f core conftest.err conftest.$ac_objext \
8080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008081
8082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8084$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008085
8086if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008087ac_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 +02008088if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008091
8092fi
8093
8094
8095
8096 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 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 +02008098if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008101
8102fi
8103
8104
8105 fi
8106fi
8107
Michael W. Hudson54241132001-12-07 15:38:26 +00008108
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008109# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8110# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8111SAVE_CFLAGS=$CFLAGS
8112CFLAGS="-std=c99 $CFLAGS"
8113for ac_header in bluetooth/bluetooth.h
8114do :
8115 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8116if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8117 cat >>confdefs.h <<_ACEOF
8118#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8119_ACEOF
8120
8121fi
8122
8123done
8124
8125CFLAGS=$SAVE_CFLAGS
8126
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008127# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8128for ac_header in net/if.h
8129do :
8130 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8131#ifdef STDC_HEADERS
8132# include <stdlib.h>
8133# include <stddef.h>
8134#else
8135# ifdef HAVE_STDLIB_H
8136# include <stdlib.h>
8137# endif
8138#endif
8139#ifdef HAVE_SYS_SOCKET_H
8140# include <sys/socket.h>
8141#endif
8142
8143"
Victor Stinnere0be4232011-10-25 13:06:09 +02008144if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008145 cat >>confdefs.h <<_ACEOF
8146#define HAVE_NET_IF_H 1
8147_ACEOF
8148
8149fi
8150
8151done
8152
8153
Martin v. Löwis11017b12006-01-14 18:12:57 +00008154# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008155for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008156do :
8157 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 +00008158#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
Matthias Kloseb9621712010-04-24 17:59:49 +00008165"
Victor Stinnere0be4232011-10-25 13:06:09 +02008166if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008168#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008169_ACEOF
8170
8171fi
8172
8173done
8174
8175
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008176# On Linux, qrtr.h requires asm/types.h
8177for ac_header in linux/qrtr.h
8178do :
8179 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8180#ifdef HAVE_ASM_TYPES_H
8181#include <asm/types.h>
8182#endif
8183#ifdef HAVE_SYS_SOCKET_H
8184#include <sys/socket.h>
8185#endif
8186
8187"
8188if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8189 cat >>confdefs.h <<_ACEOF
8190#define HAVE_LINUX_QRTR_H 1
8191_ACEOF
8192
8193fi
8194
8195done
8196
8197
caaveryeffc12f2017-09-06 18:18:10 -04008198for ac_header in linux/vm_sockets.h
8199do :
8200 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8201#ifdef HAVE_SYS_SOCKET_H
8202#include <sys/socket.h>
8203#endif
8204
8205"
8206if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8207 cat >>confdefs.h <<_ACEOF
8208#define HAVE_LINUX_VM_SOCKETS_H 1
8209_ACEOF
8210
8211fi
8212
8213done
8214
8215
Charles-François Natali47413c12011-10-06 19:47:44 +02008216# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008217for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008218do :
8219 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8220ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8221#ifdef HAVE_SYS_SOCKET_H
8222#include <sys/socket.h>
8223#endif
8224
8225"
8226if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8227 cat >>confdefs.h <<_ACEOF
8228#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8229_ACEOF
8230
8231fi
8232
8233done
8234
8235
Guido van Rossum627b2d71993-12-24 10:39:16 +00008236# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008237was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8239$as_echo_n "checking for clock_t in time.h... " >&6; }
8240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
8244_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008247 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008248else
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008252
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008253
Guido van Rossum627b2d71993-12-24 10:39:16 +00008254fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008255rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8258$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8261$as_echo_n "checking for makedev... " >&6; }
8262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008263/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008264
Jesus Cea740f53a2010-04-28 11:35:30 +00008265#if defined(MAJOR_IN_MKDEV)
8266#include <sys/mkdev.h>
8267#elif defined(MAJOR_IN_SYSMACROS)
8268#include <sys/sysmacros.h>
8269#else
8270#include <sys/types.h>
8271#endif
8272
Neal Norwitz11690112002-07-30 01:08:28 +00008273int
8274main ()
8275{
Jesus Cea740f53a2010-04-28 11:35:30 +00008276
8277 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008278 ;
8279 return 0;
8280}
Matthias Kloseb159a552010-04-25 21:00:44 +00008281
Neal Norwitz11690112002-07-30 01:08:28 +00008282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008283if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008284 ac_cv_has_makedev=yes
8285else
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008288rm -f core conftest.err conftest.$ac_objext \
8289 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8291$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008292if test "$ac_cv_has_makedev" = "yes"; then
8293
Matthias Kloseb9621712010-04-24 17:59:49 +00008294$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008295
8296fi
8297
Christian Heimes985ecdc2013-11-20 11:46:18 +01008298# byte swapping
8299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8300$as_echo_n "checking for le64toh... " >&6; }
8301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8302/* end confdefs.h. */
8303
8304#ifdef HAVE_ENDIAN_H
8305#include <endian.h>
8306#elif defined(HAVE_SYS_ENDIAN_H)
8307#include <sys/endian.h>
8308#endif
8309
8310int
8311main ()
8312{
8313
8314 le64toh(1)
8315 ;
8316 return 0;
8317}
8318
8319_ACEOF
8320if ac_fn_c_try_link "$LINENO"; then :
8321 ac_cv_has_le64toh=yes
8322else
8323 ac_cv_has_le64toh=no
8324fi
8325rm -f core conftest.err conftest.$ac_objext \
8326 conftest$ac_exeext conftest.$ac_ext
8327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8328$as_echo "$ac_cv_has_le64toh" >&6; }
8329if test "$ac_cv_has_le64toh" = "yes"; then
8330
8331$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8332
8333fi
8334
Martin v. Löwis399a6892002-10-04 10:22:02 +00008335use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008336# Don't use largefile support for GNU/Hurd
8337case $ac_sys_system in GNU*)
8338 use_lfs=no
8339esac
8340
Martin v. Löwis399a6892002-10-04 10:22:02 +00008341if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008342# Two defines needed to enable largefile support on various platforms
8343# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008344case $ac_sys_system/$ac_sys_release in
8345AIX*)
8346
8347$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8348
8349 ;;
8350esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008356
Martin v. Löwis399a6892002-10-04 10:22:02 +00008357fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008358
Guido van Rossum84e7b241996-08-19 21:59:00 +00008359# Add some code to confdefs.h so that the test for off_t works on SCO
8360cat >> confdefs.h <<\EOF
8361#if defined(SCO_DS)
8362#undef _OFF_T
8363#endif
8364EOF
8365
Guido van Rossumef2255b2000-03-10 22:30:29 +00008366# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008367ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if test "x$ac_cv_type_mode_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 mode_t int
8374_ACEOF
8375
8376fi
8377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008379if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008381else
Martin v. Löwis11437992002-04-12 09:54:03 +00008382
8383cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008385_ACEOF
8386
8387fi
8388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008391
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008392else
Martin v. Löwis11437992002-04-12 09:54:03 +00008393
8394cat >>confdefs.h <<_ACEOF
8395#define pid_t int
8396_ACEOF
8397
8398fi
8399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008402#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008403_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008408else
Martin v. Löwis11437992002-04-12 09:54:03 +00008409
8410cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008412_ACEOF
8413
8414fi
8415
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8417$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008418if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
8425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008428 ac_cv_type_uid_t=yes
8429else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430 ac_cv_type_uid_t=no
8431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008432rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8436$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008437if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
8441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008443
8444fi
8445
Mark Dickinson983bc162012-12-02 12:11:38 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008451
8452fi
8453
Stefan Krah1919b7e2012-03-21 18:25:23 +01008454ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8455if test "x$ac_cv_type___uint128_t" = xyes; then :
8456
8457$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8458
8459fi
8460
Jack Jansendd19cf82001-12-06 22:36:17 +00008461
Michael W. Hudson54241132001-12-07 15:38:26 +00008462# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008463# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464# The cast to long int works around a bug in the HP C Compiler
8465# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8466# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8467# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8469$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008470if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 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 +00008474
Martin v. Löwis11437992002-04-12 09:54:03 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 if test "$ac_cv_type_int" = yes; then
8477 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008479as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008480See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481 else
8482 ac_cv_sizeof_int=0
8483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485
Martin v. Löwis11437992002-04-12 09:54:03 +00008486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8488$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489
8490
8491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008493#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008495
8496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8502$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 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 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$ac_cv_type_long" = yes; then
8510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008512as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008513See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514 else
8515 ac_cv_sizeof_long=0
8516 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8521$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
8523
8524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008526#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008527_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008528
8529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530# The cast to long int works around a bug in the HP C Compiler
8531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8533# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8535$as_echo_n "checking size of long long... " >&6; }
8536if ${ac_cv_sizeof_long_long+:} false; then :
8537 $as_echo_n "(cached) " >&6
8538else
8539 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8540
8541else
8542 if test "$ac_cv_type_long_long" = yes; then
8543 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8545as_fn_error 77 "cannot compute sizeof (long long)
8546See \`config.log' for more details" "$LINENO" 5; }
8547 else
8548 ac_cv_sizeof_long_long=0
8549 fi
8550fi
8551
8552fi
8553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8554$as_echo "$ac_cv_sizeof_long_long" >&6; }
8555
8556
8557
8558cat >>confdefs.h <<_ACEOF
8559#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8560_ACEOF
8561
8562
8563# The cast to long int works around a bug in the HP C Compiler
8564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8568$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008569if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 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 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if test "$ac_cv_type_void_p" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008578as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 else
8581 ac_cv_sizeof_void_p=0
8582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8587$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588
8589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008592#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008594
8595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8601$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_short" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 else
8614 ac_cv_sizeof_short=0
8615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8620$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621
8622
8623
Martin v. Löwis11437992002-04-12 09:54:03 +00008624cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008625#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008626_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008627
8628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629# The cast to long int works around a bug in the HP C Compiler
8630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8634$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008635if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008637else
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 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 +00008639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 if test "$ac_cv_type_float" = yes; then
8642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008644as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008645See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646 else
8647 ac_cv_sizeof_float=0
8648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8653$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654
8655
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008658#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008659_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008660
8661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662# The cast to long int works around a bug in the HP C Compiler
8663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8667$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008668if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 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 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 if test "$ac_cv_type_double" = yes; then
8675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008677as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 else
8680 ac_cv_sizeof_double=0
8681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8686$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687
8688
8689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008691#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008692_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008693
8694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695# The cast to long int works around a bug in the HP C Compiler
8696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8700$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 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 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if test "$ac_cv_type_fpos_t" = yes; then
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008710as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008711See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 else
8713 ac_cv_sizeof_fpos_t=0
8714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8719$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720
8721
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008724#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008725_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008726
Michael W. Hudson54241132001-12-07 15:38:26 +00008727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728# The cast to long int works around a bug in the HP C Compiler
8729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8733$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 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 +00008738
Martin v. Löwis18e16552006-02-15 17:27:45 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$ac_cv_type_size_t" = yes; then
8741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008743as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745 else
8746 ac_cv_sizeof_size_t=0
8747 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749
Martin v. Löwis18e16552006-02-15 17:27:45 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8752$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753
8754
8755
Martin v. Löwis18e16552006-02-15 17:27:45 +00008756cat >>confdefs.h <<_ACEOF
8757#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8758_ACEOF
8759
8760
Christian Heimes400adb02008-02-01 08:12:03 +00008761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8766$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 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 +00008771
Christian Heimes400adb02008-02-01 08:12:03 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$ac_cv_type_pid_t" = yes; then
8774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008777See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008778 else
8779 ac_cv_sizeof_pid_t=0
8780 fi
8781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782
Christian Heimes400adb02008-02-01 08:12:03 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8785$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008786
8787
8788
8789cat >>confdefs.h <<_ACEOF
8790#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8791_ACEOF
8792
8793
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008794# The cast to long int works around a bug in the HP C Compiler
8795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8797# This bug is HP SR number 8606223364.
8798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8799$as_echo_n "checking size of uintptr_t... " >&6; }
8800if ${ac_cv_sizeof_uintptr_t+:} false; then :
8801 $as_echo_n "(cached) " >&6
8802else
8803 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8804
8805else
8806 if test "$ac_cv_type_uintptr_t" = yes; then
8807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8809as_fn_error 77 "cannot compute sizeof (uintptr_t)
8810See \`config.log' for more details" "$LINENO" 5; }
8811 else
8812 ac_cv_sizeof_uintptr_t=0
8813 fi
8814fi
8815
8816fi
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8818$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8819
8820
8821
8822cat >>confdefs.h <<_ACEOF
8823#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8824_ACEOF
8825
8826
Michael W. Hudson54241132001-12-07 15:38:26 +00008827
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008828
Eitan Adler3055c942018-05-15 22:58:09 -07008829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8830$as_echo_n "checking for long double... " >&6; }
8831if ${ac_cv_type_long_double+:} false; then :
8832 $as_echo_n "(cached) " >&6
8833else
8834 if test "$GCC" = yes; then
8835 ac_cv_type_long_double=yes
8836 else
8837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8838/* end confdefs.h. */
8839/* The Stardent Vistra knows sizeof (long double), but does
8840 not support it. */
8841 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008842int
8843main ()
8844{
Eitan Adler3055c942018-05-15 22:58:09 -07008845static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8846 sizeof (double) <= sizeof (long double))];
8847test_array [0] = 0;
8848return test_array [0];
8849
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008850 ;
8851 return 0;
8852}
8853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008854if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008855 ac_cv_type_long_double=yes
8856else
8857 ac_cv_type_long_double=no
8858fi
8859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8860 fi
8861fi
8862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8863$as_echo "$ac_cv_type_long_double" >&6; }
8864 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008867
Eitan Adler3055c942018-05-15 22:58:09 -07008868 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008869
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008870# The cast to long int works around a bug in the HP C Compiler
8871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8875$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 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 +00008880
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if test "$ac_cv_type_long_double" = yes; then
8883 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008885as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008886See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887 else
8888 ac_cv_sizeof_long_double=0
8889 fi
8890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8894$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895
8896
8897
8898cat >>confdefs.h <<_ACEOF
8899#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8900_ACEOF
8901
8902
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904# The cast to long int works around a bug in the HP C Compiler
8905# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8906# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8907# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8909$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008910if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 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 +00008914
Thomas Woutersb2137042007-02-01 18:02:27 +00008915else
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 if test "$ac_cv_type__Bool" = yes; then
8917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008919as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008920See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921 else
8922 ac_cv_sizeof__Bool=0
8923 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008925
Thomas Woutersb2137042007-02-01 18:02:27 +00008926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8928$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929
8930
8931
Thomas Woutersb2137042007-02-01 18:02:27 +00008932cat >>confdefs.h <<_ACEOF
8933#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8934_ACEOF
8935
8936
Thomas Woutersb2137042007-02-01 18:02:27 +00008937
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938# The cast to long int works around a bug in the HP C Compiler
8939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8943$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008944if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948#ifdef HAVE_SYS_TYPES_H
8949#include <sys/types.h>
8950#endif
8951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if test "$ac_cv_type_off_t" = yes; then
8956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008959See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960 else
8961 ac_cv_sizeof_off_t=0
8962 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8967$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969
8970
Martin v. Löwis11437992002-04-12 09:54:03 +00008971cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008972#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008973_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008974
Michael W. Hudson54241132001-12-07 15:38:26 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8978$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008979if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008980 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008981
Matthias Kloseb9621712010-04-24 17:59:49 +00008982$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008983
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8985$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008989fi
8990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991# The cast to long int works around a bug in the HP C Compiler
8992# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8993# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8994# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8996$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008997if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001#ifdef HAVE_SYS_TYPES_H
9002#include <sys/types.h>
9003#endif
9004#ifdef HAVE_TIME_H
9005#include <time.h>
9006#endif
9007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009010else
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 if test "$ac_cv_type_time_t" = yes; then
9012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009014as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009015See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016 else
9017 ac_cv_sizeof_time_t=0
9018 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009020
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9023$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025
9026
Martin v. Löwis11437992002-04-12 09:54:03 +00009027cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009028#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009029_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009030
Michael W. Hudson54241132001-12-07 15:38:26 +00009031
9032
Trent Mick635f6fb2000-08-23 21:33:05 +00009033# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009034ac_save_cc="$CC"
9035if test "$ac_cv_kpthread" = "yes"
9036then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009037elif test "$ac_cv_kthread" = "yes"
9038then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009039elif test "$ac_cv_pthread" = "yes"
9040then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009041fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042
Matthias Kloseb9621712010-04-24 17:59:49 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9044$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009045have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009047/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009048
9049 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009050int
9051main ()
9052{
Guido van Rossum12580492000-09-24 16:47:19 +00009053pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 ;
9055 return 0;
9056}
Matthias Kloseb159a552010-04-25 21:00:44 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009059if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009060 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9064$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009065if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9069# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9071$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009072if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074else
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076#ifdef HAVE_PTHREAD_H
9077#include <pthread.h>
9078#endif
9079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082else
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 if test "$ac_cv_type_pthread_t" = yes; then
9084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009086as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009087See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009088 else
9089 ac_cv_sizeof_pthread_t=0
9090 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009092
Trent Mick635f6fb2000-08-23 21:33:05 +00009093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9095$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009096
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009097
9098
Martin v. Löwis11437992002-04-12 09:54:03 +00009099cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009100#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009103
Trent Mick635f6fb2000-08-23 21:33:05 +00009104fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009105
9106# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9107# This checking will be unnecessary after removing deprecated TLS API.
9108# The cast to long int works around a bug in the HP C Compiler
9109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9111# This bug is HP SR number 8606223364.
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9113$as_echo_n "checking size of pthread_key_t... " >&6; }
9114if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9115 $as_echo_n "(cached) " >&6
9116else
9117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9118"; then :
9119
9120else
9121 if test "$ac_cv_type_pthread_key_t" = yes; then
9122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9124as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9125See \`config.log' for more details" "$LINENO" 5; }
9126 else
9127 ac_cv_sizeof_pthread_key_t=0
9128 fi
9129fi
9130
9131fi
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9133$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9134
9135
9136
9137cat >>confdefs.h <<_ACEOF
9138#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9139_ACEOF
9140
9141
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9143$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9144if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9146/* end confdefs.h. */
9147#include <pthread.h>
9148int
9149main ()
9150{
9151pthread_key_t k; k * 1;
9152 ;
9153 return 0;
9154}
9155_ACEOF
9156if ac_fn_c_try_compile "$LINENO"; then :
9157 ac_pthread_key_t_is_arithmetic_type=yes
9158else
9159 ac_pthread_key_t_is_arithmetic_type=no
9160
9161fi
9162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9164$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9165 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9166
9167$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9168
9169 fi
9170else
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9172$as_echo "no" >&6; }
9173fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009174CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009175
Michael W. Hudson54241132001-12-07 15:38:26 +00009176
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009177case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009178 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009179 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9180 ;;
9181 Darwin/*)
9182 OTHER_LIBTOOL_OPT=""
9183 ;;
9184esac
9185
9186
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009187
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009188case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009189 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009190 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9191 if test "${enable_universalsdk}"; then
9192 :
9193 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009194 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009195 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009196 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009197 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009198 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009199 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009200 if test ${gcc_version} '<' 4.0
9201 then
9202 LIBTOOL_CRUFT="-lcc_dynamic"
9203 else
9204 LIBTOOL_CRUFT=""
9205 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009207 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009208else
Matthias Kloseb9621712010-04-24 17:59:49 +00009209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009210/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009211
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009212 #include <unistd.h>
9213 int main(int argc, char*argv[])
9214 {
9215 if (sizeof(long) == 4) {
9216 return 0;
9217 } else {
9218 return 1;
9219 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009220 }
9221
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009223if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009224 ac_osx_32bit=yes
9225else
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230fi
9231
9232
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009233 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009234 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009235 i386)
9236 MACOSX_DEFAULT_ARCH="i386"
9237 ;;
9238 ppc)
9239 MACOSX_DEFAULT_ARCH="ppc"
9240 ;;
9241 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009242 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009243 ;;
9244 esac
9245 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009246 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247 i386)
9248 MACOSX_DEFAULT_ARCH="x86_64"
9249 ;;
9250 ppc)
9251 MACOSX_DEFAULT_ARCH="ppc64"
9252 ;;
9253 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009254 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 ;;
9256 esac
9257
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009258 fi
9259
9260 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009261 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009262 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009263esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9265$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009266if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009268 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009269 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009270 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271
Matthias Kloseb9621712010-04-24 17:59:49 +00009272$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9275$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009276 if test $enable_shared = "yes"
9277 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009278 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 +00009279 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009280else
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283fi
9284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9286$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009287case $ac_sys_system/$ac_sys_release in
9288 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289
Matthias Kloseb9621712010-04-24 17:59:49 +00009290$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9293$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009294 ;;
9295 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009298 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009299esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300
Guido van Rossum0a516c91994-09-12 10:58:40 +00009301# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009302
Michael W. Hudson54241132001-12-07 15:38:26 +00009303
9304
9305
9306
Benjamin Peterson99f03762010-04-11 22:15:28 +00009307
Thomas Wouters477c8d52006-05-27 19:21:47 +00009308
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009309# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9310# -- usually .so, .sl on HP-UX, .dll on Cygwin
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9312$as_echo_n "checking the extension of shared libraries... " >&6; }
9313if test -z "$SHLIB_SUFFIX"; then
9314 case $ac_sys_system in
9315 hp*|HP*)
9316 case `uname -m` in
9317 ia64) SHLIB_SUFFIX=.so;;
9318 *) SHLIB_SUFFIX=.sl;;
9319 esac
9320 ;;
9321 CYGWIN*) SHLIB_SUFFIX=.dll;;
9322 *) SHLIB_SUFFIX=.so;;
9323 esac
9324fi
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9326$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009327
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009329# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009330# (Shared libraries in this instance are shared modules to be loaded into
9331# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9333$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334if test -z "$LDSHARED"
9335then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009336 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009337 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009338 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009339 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009340 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009341 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 if test "$GCC" = "yes" ; then
9343 LDSHARED='$(CC) -shared'
9344 LDCXXSHARED='$(CXX) -shared'
9345 else
9346 LDSHARED='$(CC) -G'
9347 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009348 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009349 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009350 if test "$GCC" = "yes" ; then
9351 LDSHARED='$(CC) -shared'
9352 LDCXXSHARED='$(CXX) -shared'
9353 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009354 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009355 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009356 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009357 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009358 LDSHARED='$(CC) -bundle'
9359 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009360 if test "$enable_framework" ; then
9361 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009362 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9363 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009365 else
9366 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009367 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009369 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009370 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009371 LDSHARED='$(CC) -bundle'
9372 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009373 if test "$enable_framework" ; then
9374 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009375 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9376 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009377 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009378 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009379 # No framework, use the Python app as bundle-loader
9380 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009381 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009382 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009383 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009384 Darwin/*)
9385 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9386 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009387
Ned Deily36820b62014-06-25 13:44:22 -07009388 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9389 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9390 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9391 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9392 if test ${dep_target_major} -eq 10 && \
9393 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009394 then
Ned Deily36820b62014-06-25 13:44:22 -07009395 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009396 LDSHARED='$(CC) -bundle'
9397 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009398 if test "$enable_framework" ; then
9399 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009400 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9401 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009403 else
9404 # No framework, use the Python app as bundle-loader
9405 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9406 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009407 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009408 fi
Ned Deily36820b62014-06-25 13:44:22 -07009409 else
9410 # building for OS X 10.3 and later
9411 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9412 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9413 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009414 fi
9415 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009416 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009417 LDSHARED='$(CC) -shared'
9418 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009419 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009420 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009421 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009422 LDSHARED='$(CC) -shared'
9423 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009424 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009425 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009426 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009427 OpenBSD*)
9428 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9429 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009430 LDSHARED='$(CC) -shared $(CCSHARED)'
9431 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009432 else
9433 case `uname -r` in
9434 [01].* | 2.[0-7] | 2.[0-7].*)
9435 LDSHARED="ld -Bshareable ${LDFLAGS}"
9436 ;;
9437 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009438 LDSHARED='$(CC) -shared $(CCSHARED)'
9439 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009440 ;;
9441 esac
9442 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009444 LDSHARED='$(CC) -shared'
9445 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009446 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 if test "$GCC" = "yes" ; then
9448 LDSHARED='$(CC) -shared'
9449 LDCXXSHARED='$(CXX) -shared'
9450 else
9451 LDSHARED='$(CC) -G'
9452 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009453 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009454 SCO_SV*)
9455 LDSHARED='$(CC) -Wl,-G,-Bexport'
9456 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9457 CYGWIN*)
9458 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9459 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009460 *) LDSHARED="ld";;
9461 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9464$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009465LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009466BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009467# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009468# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9470$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471if test -z "$CCSHARED"
9472then
Guido van Rossum07397971997-04-29 21:49:50 +00009473 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009474 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009475 then CCSHARED="-fPIC";
9476 elif test `uname -p` = sparc;
9477 then CCSHARED="-xcode=pic32";
9478 else CCSHARED="-Kpic";
9479 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009480 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009481 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009482 else CCSHARED="+z";
9483 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009484 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009485 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009486 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009487 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009488 if test "$GCC" = "yes"
9489 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009490 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009491 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009492 SCO_SV*)
9493 if test "$GCC" = "yes"
9494 then CCSHARED="-fPIC"
9495 else CCSHARED="-Kpic -belf"
9496 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009497 VxWorks*)
9498 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009499 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9502$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009503# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9506$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507if test -z "$LINKFORSHARED"
9508then
Guido van Rossum07397971997-04-29 21:49:50 +00009509 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009510 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009511 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009512 LINKFORSHARED="-Wl,-E -Wl,+s";;
9513# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009514 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009515 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009516 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009518 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009519
9520 # Issue #18075: the default maximum stack size (8MBytes) is too
9521 # small for the default recursion limit. Increase the stack size
9522 # to ensure that tests don't crash
9523 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9524
Jack Jansene578a632001-08-15 01:27:14 +00009525 if test "$enable_framework"
9526 then
Jack Jansenda49e192005-01-07 13:08:22 +00009527 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009528 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009529 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009530 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009531 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009532 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009533 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009534 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9535 then
9536 LINKFORSHARED="-Wl,--export-dynamic"
9537 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009538 SunOS/5*) case $CC in
9539 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009540 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009541 then
9542 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009543 fi;;
9544 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009545 CYGWIN*)
9546 if test $enable_shared = "no"
9547 then
9548 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9549 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009550 QNX*)
9551 # -Wl,-E causes the symbols to be added to the dynamic
9552 # symbol table so that they can be found when a module
9553 # is loaded. -N 2048K causes the stack size to be set
9554 # to 2048 kilobytes so that the stack doesn't overflow
9555 # when running test_compile.py.
9556 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009557 VxWorks*)
9558 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9562$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563
Michael W. Hudson54241132001-12-07 15:38:26 +00009564
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9567$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009568if test ! "$LIBRARY" = "$LDLIBRARY"
9569then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009570 case $ac_sys_system in
9571 CYGWIN*)
9572 # Cygwin needs CCSHARED when building extension DLLs
9573 # but not when building the interpreter DLL.
9574 CFLAGSFORSHARED='';;
9575 *)
9576 CFLAGSFORSHARED='$(CCSHARED)'
9577 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9580$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009581
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009582# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9583# library (with --enable-shared).
9584# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009585# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9586# if it is not required, since it creates a dependency of the shared library
9587# to LIBS. This, in turn, means that applications linking the shared libpython
9588# don't need to link LIBS explicitly. The default should be only changed
9589# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9592$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009594 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009595 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9598$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599
9600
Guido van Rossum627b2d71993-12-24 10:39:16 +00009601# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9603$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009604if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009605 $as_echo_n "(cached) " >&6
9606else
9607 ac_check_lib_save_LIBS=$LIBS
9608LIBS="-lsendfile $LIBS"
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9610/* end confdefs.h. */
9611
9612/* Override any GCC internal prototype to avoid an error.
9613 Use char because int might match the return type of a GCC
9614 builtin and then its argument prototype would still apply. */
9615#ifdef __cplusplus
9616extern "C"
9617#endif
9618char sendfile ();
9619int
9620main ()
9621{
9622return sendfile ();
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627if ac_fn_c_try_link "$LINENO"; then :
9628 ac_cv_lib_sendfile_sendfile=yes
9629else
9630 ac_cv_lib_sendfile_sendfile=no
9631fi
9632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext conftest.$ac_ext
9634LIBS=$ac_check_lib_save_LIBS
9635fi
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9637$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009639 cat >>confdefs.h <<_ACEOF
9640#define HAVE_LIBSENDFILE 1
9641_ACEOF
9642
9643 LIBS="-lsendfile $LIBS"
9644
9645fi
9646
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9648$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009653LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657/* Override any GCC internal prototype to avoid an error.
9658 Use char because int might match the return type of a GCC
9659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009663char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009664int
9665main ()
9666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009679LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9682$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 cat >>confdefs.h <<_ACEOF
9685#define HAVE_LIBDL 1
9686_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009688 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690fi
9691 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9693$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009694if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696else
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009698LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702/* Override any GCC internal prototype to avoid an error.
9703 Use char because int might match the return type of a GCC
9704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705#ifdef __cplusplus
9706extern "C"
9707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009708char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009709int
9710main ()
9711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ;
9714 return 0;
9715}
9716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009719else
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722rm -f core conftest.err conftest.$ac_objext \
9723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009724LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9727$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009728if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 cat >>confdefs.h <<_ACEOF
9730#define HAVE_LIBDLD 1
9731_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009733 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009735fi
9736 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009737
Michael Felt0d3ccb42017-12-30 22:39:20 +01009738# checks for uuid.h location
9739for ac_header in uuid/uuid.h uuid.h
9740do :
9741 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9742ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9743if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9744 cat >>confdefs.h <<_ACEOF
9745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9746_ACEOF
9747
9748fi
9749
9750done
9751
9752
Berker Peksag9a10ff42017-11-08 23:09:16 +03009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9754$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9756/* end confdefs.h. */
9757#include <uuid/uuid.h>
9758int
9759main ()
9760{
9761
9762#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009763void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009764#endif
9765
9766 ;
9767 return 0;
9768}
9769_ACEOF
9770if ac_fn_c_try_compile "$LINENO"; then :
9771
9772$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9773
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9775$as_echo "yes" >&6; }
9776else
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779
9780fi
9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9782
Michael Felt0d3ccb42017-12-30 22:39:20 +01009783# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009784# FreeBSD and OpenBSD provides support as well
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9786$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788/* end confdefs.h. */
9789#include <uuid.h>
9790int
9791main ()
9792{
9793
9794#ifndef uuid_create
9795void *x = uuid_create
9796#endif
9797
9798 ;
9799 return 0;
9800}
9801_ACEOF
9802if ac_fn_c_try_compile "$LINENO"; then :
9803
9804$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9805
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9807$as_echo "yes" >&6; }
9808else
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
9811
9812fi
9813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9814
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009815# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9816# stream in big-endian byte-order
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9818$as_echo_n "checking for uuid_enc_be... " >&6; }
9819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9820/* end confdefs.h. */
9821#include <uuid.h>
9822int
9823main ()
9824{
9825
9826#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009827void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009828#endif
9829
9830 ;
9831 return 0;
9832}
9833_ACEOF
9834if ac_fn_c_try_compile "$LINENO"; then :
9835
9836$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9837
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9839$as_echo "yes" >&6; }
9840else
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
9843
9844fi
9845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9846
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009847# 'Real Time' functions on Solaris
9848# posix4 on Solaris 2.6
9849# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009851$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009854else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862#ifdef __cplusplus
9863extern "C"
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874for ac_lib in '' pthread rt posix4; do
9875 if test -z "$ac_lib"; then
9876 ac_res="none required"
9877 else
9878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009886 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889done
Victor Stinnere0be4232011-10-25 13:06:09 +02009890if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892else
9893 ac_cv_search_sem_init=no
9894fi
9895rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009896LIBS=$ac_func_search_save_LIBS
9897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9899$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009903
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009904fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009905
Martin v. Löwis519adae2003-09-20 10:47:47 +00009906
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9909$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009910if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912else
9913 ac_check_lib_save_LIBS=$LIBS
9914LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918/* Override any GCC internal prototype to avoid an error.
9919 Use char because int might match the return type of a GCC
9920 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921#ifdef __cplusplus
9922extern "C"
9923#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009924char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009925int
9926main ()
9927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009929 ;
9930 return 0;
9931}
9932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009934 ac_cv_lib_intl_textdomain=yes
9935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009938rm -f core conftest.err conftest.$ac_objext \
9939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940LIBS=$ac_check_lib_save_LIBS
9941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9943$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009944if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947
Brett Cannonc6d936e2009-06-07 20:09:53 +00009948 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949fi
9950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009951
9952# checks for system dependent C++ extensions support
9953case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9955$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009958
Georg Brandl59e87bd2011-02-15 19:48:59 +00009959 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009960int
9961main ()
9962{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009963loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ;
9965 return 0;
9966}
Matthias Kloseb159a552010-04-25 21:00:44 +00009967
Martin v. Löwis11437992002-04-12 09:54:03 +00009968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009969if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009970
Matthias Kloseb159a552010-04-25 21:00:44 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009973
Matthias Kloseb159a552010-04-25 21:00:44 +00009974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009976
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009977else
Matthias Kloseb159a552010-04-25 21:00:44 +00009978
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009980$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009981
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009985 *) ;;
9986esac
9987
Christian Heimes985ecdc2013-11-20 11:46:18 +01009988# check for systems that require aligned memory access
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9990$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009991if ${ac_cv_aligned_required+:} false; then :
9992 $as_echo_n "(cached) " >&6
9993else
9994 if test "$cross_compiling" = yes; then :
9995 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009996else
9997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998/* end confdefs.h. */
9999
10000int main()
10001{
10002 char s[16];
10003 int i, *p1, *p2;
10004 for (i=0; i < 16; i++)
10005 s[i] = i;
10006 p1 = (int*)(s+1);
10007 p2 = (int*)(s+2);
10008 if (*p1 == *p2)
10009 return 1;
10010 return 0;
10011}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012_ACEOF
10013if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010014 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010015else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010016 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010017fi
10018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10019 conftest.$ac_objext conftest.beam conftest.$ac_ext
10020fi
10021
10022
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010023fi
10024
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10026$as_echo "$ac_cv_aligned_required" >&6; }
10027if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010028
10029$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10030
10031fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010032
10033# str, bytes and memoryview hash algorithm
10034
10035
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10037$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10038
10039# Check whether --with-hash_algorithm was given.
10040if test "${with_hash_algorithm+set}" = set; then :
10041 withval=$with_hash_algorithm;
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10043$as_echo "$withval" >&6; }
10044case "$withval" in
10045 siphash24)
10046 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10047
10048 ;;
10049 fnv)
10050 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10051
10052 ;;
10053 *)
10054 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10055 ;;
10056esac
10057
10058else
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10060$as_echo "default" >&6; }
10061fi
10062
10063
Charles-François Natalid30b0222014-05-08 23:08:51 +010010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10065$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10066
10067# Check whether --with-address_sanitizer was given.
10068if test "${with_address_sanitizer+set}" = set; then :
10069 withval=$with_address_sanitizer;
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10071$as_echo "$withval" >&6; }
10072BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10073LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010074# ASan works by controlling memory allocation, our own malloc interferes.
10075with_pymalloc="no"
10076
10077else
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10084$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10085
10086# Check whether --with-memory_sanitizer was given.
10087if test "${with_memory_sanitizer+set}" = set; then :
10088 withval=$with_memory_sanitizer;
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10090$as_echo "$withval" >&6; }
10091BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10092LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10093# MSan works by controlling memory allocation, our own malloc interferes.
10094with_pymalloc="no"
10095
10096else
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10103$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10104
10105# Check whether --with-undefined_behavior_sanitizer was given.
10106if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10107 withval=$with_undefined_behavior_sanitizer;
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10109$as_echo "$withval" >&6; }
10110BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10111LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010112
10113else
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118
Guido van Rossum70c7f481998-03-26 18:44:10 +000010119# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10121$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010122if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010124else
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010126LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130/* Override any GCC internal prototype to avoid an error.
10131 Use char because int might match the return type of a GCC
10132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133#ifdef __cplusplus
10134extern "C"
10135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010136char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010137int
10138main ()
10139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
10144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010147else
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150rm -f core conftest.err conftest.$ac_objext \
10151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10155$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010156if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010157 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010158fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010159 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10161$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010166LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170/* Override any GCC internal prototype to avoid an error.
10171 Use char because int might match the return type of a GCC
10172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010173#ifdef __cplusplus
10174extern "C"
10175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010176char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010177int
10178main ()
10179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010187else
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190rm -f core conftest.err conftest.$ac_objext \
10191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10195$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010196if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010197 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010198fi
10199 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10202$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10208$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010209LIBS="$withval $LIBS"
10210
10211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10213$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214fi
10215
Guido van Rossum7f43da71994-08-01 12:15:30 +000010216
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010217
10218
10219
10220
10221
10222
Victor Stinner23a683a2019-04-12 21:27:37 +020010223
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010224if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10225 if test -n "$ac_tool_prefix"; then
10226 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10227set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if ${ac_cv_path_PKG_CONFIG+:} false; then :
10231 $as_echo_n "(cached) " >&6
10232else
10233 case $PKG_CONFIG in
10234 [\\/]* | ?:[\\/]*)
10235 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10236 ;;
10237 *)
10238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241 IFS=$as_save_IFS
10242 test -z "$as_dir" && as_dir=.
10243 for ac_exec_ext in '' $ac_executable_extensions; do
10244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10245 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247 break 2
10248 fi
10249done
10250 done
10251IFS=$as_save_IFS
10252
10253 ;;
10254esac
10255fi
10256PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10257if test -n "$PKG_CONFIG"; then
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10259$as_echo "$PKG_CONFIG" >&6; }
10260else
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266fi
10267if test -z "$ac_cv_path_PKG_CONFIG"; then
10268 ac_pt_PKG_CONFIG=$PKG_CONFIG
10269 # Extract the first word of "pkg-config", so it can be a program name with args.
10270set dummy pkg-config; ac_word=$2
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10272$as_echo_n "checking for $ac_word... " >&6; }
10273if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10274 $as_echo_n "(cached) " >&6
10275else
10276 case $ac_pt_PKG_CONFIG in
10277 [\\/]* | ?:[\\/]*)
10278 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10279 ;;
10280 *)
10281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282for as_dir in $PATH
10283do
10284 IFS=$as_save_IFS
10285 test -z "$as_dir" && as_dir=.
10286 for ac_exec_ext in '' $ac_executable_extensions; do
10287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10288 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10290 break 2
10291 fi
10292done
10293 done
10294IFS=$as_save_IFS
10295
10296 ;;
10297esac
10298fi
10299ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10300if test -n "$ac_pt_PKG_CONFIG"; then
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10302$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10303else
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
10306fi
10307
10308 if test "x$ac_pt_PKG_CONFIG" = x; then
10309 PKG_CONFIG=""
10310 else
10311 case $cross_compiling:$ac_tool_warned in
10312yes:)
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10315ac_tool_warned=yes ;;
10316esac
10317 PKG_CONFIG=$ac_pt_PKG_CONFIG
10318 fi
10319else
10320 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10321fi
10322
10323fi
10324if test -n "$PKG_CONFIG"; then
10325 _pkg_min_version=0.9.0
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10327$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10328 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10330$as_echo "yes" >&6; }
10331 else
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334 PKG_CONFIG=""
10335 fi
10336fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010337
10338# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10340$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010341
10342# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010344 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010345else
10346 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347fi
10348
10349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10351$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010352
10353# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10355$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010356
10357# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010359 withval=$with_system_ffi;
10360fi
10361
10362
Zachary Waref40d4dd2016-09-17 01:25:24 -050010363if test "$ac_sys_system" = "Darwin"
10364then
10365 case "$with_system_ffi" in
10366 "")
10367 with_system_ffi="no"
10368 ;;
10369 yes|no)
10370 ;;
10371 *)
10372 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10373 ;;
10374 esac
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10376$as_echo "$with_system_ffi" >&6; }
10377else
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10379$as_echo "yes" >&6; }
10380 if test "$with_system_ffi" != ""
10381 then
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10383$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10384 fi
10385 with_system_ffi="yes"
10386fi
Zachary Ware935043d2016-09-09 17:01:21 -070010387
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010388if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010389 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10390else
10391 LIBFFI_INCLUDEDIR=""
10392fi
10393
10394
Stefan Krah60187b52012-03-23 19:06:27 +010010395# Check for use of the system libmpdec library
10396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10397$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10398
10399# Check whether --with-system_libmpdec was given.
10400if test "${with_system_libmpdec+set}" = set; then :
10401 withval=$with_system_libmpdec;
10402else
10403 with_system_libmpdec="no"
10404fi
10405
10406
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10408$as_echo "$with_system_libmpdec" >&6; }
10409
Benjamin Peterson076ed002010-10-31 17:11:02 +000010410# Check for support for loadable sqlite extensions
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10412$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10413# Check whether --enable-loadable-sqlite-extensions was given.
10414if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10415 enableval=$enable_loadable_sqlite_extensions;
10416else
10417 enable_loadable_sqlite_extensions="no"
10418fi
10419
10420
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10422$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10423
Ned Deilyd819b932013-09-06 01:07:05 -070010424# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10425
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10428$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10429
10430# Check whether --with-tcltk-includes was given.
10431if test "${with_tcltk_includes+set}" = set; then :
10432 withval=$with_tcltk_includes;
10433else
10434 with_tcltk_includes="default"
10435fi
10436
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10438$as_echo "$with_tcltk_includes" >&6; }
10439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10440$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10441
10442# Check whether --with-tcltk-libs was given.
10443if test "${with_tcltk_libs+set}" = set; then :
10444 withval=$with_tcltk_libs;
10445else
10446 with_tcltk_libs="default"
10447fi
10448
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10450$as_echo "$with_tcltk_libs" >&6; }
10451if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10452then
10453 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10454 then
10455 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10456 fi
10457 TCLTK_INCLUDES=""
10458 TCLTK_LIBS=""
10459else
10460 TCLTK_INCLUDES="$with_tcltk_includes"
10461 TCLTK_LIBS="$with_tcltk_libs"
10462fi
10463
Matthias Klose55708cc2009-04-30 08:06:49 +000010464# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10466$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010467
10468# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010470 withval=$with_dbmliborder;
10471if test x$with_dbmliborder = xyes
10472then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010473as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010474else
10475 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10476 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10477 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010478 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010479 fi
10480 done
10481fi
10482fi
10483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10485$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010486
Martin v. Löwis11437992002-04-12 09:54:03 +000010487# Templates for things AC_DEFINEd more than once.
10488# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010489
10490
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010491if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010492then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010493 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010495
10496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010497elif test "$ac_cv_kpthread" = "yes"
10498then
10499 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010500 if test "$ac_cv_cxx_thread" = "yes"; then
10501 CXX="$CXX -Kpthread"
10502 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010503 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010504elif test "$ac_cv_kthread" = "yes"
10505then
10506 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010507 if test "$ac_cv_cxx_thread" = "yes"; then
10508 CXX="$CXX -Kthread"
10509 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010510 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010511elif test "$ac_cv_pthread" = "yes"
10512then
10513 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010514 if test "$ac_cv_cxx_thread" = "yes"; then
10515 CXX="$CXX -pthread"
10516 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010517 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010519 if test ! -z "$withval" -a -d "$withval"
10520 then LDFLAGS="$LDFLAGS -L$withval"
10521 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010522
10523 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010524 # define _POSIX_THREADS in unistd.h. Some apparently don't
10525 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10527$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010530
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010531#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010532#ifdef _POSIX_THREADS
10533yes
10534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010535
10536_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010539 unistd_defines_pthreads=yes
10540else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010541 unistd_defines_pthreads=no
10542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010543rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10546$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010549
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010550 # Just looking for pthread_create in libpthread is not enough:
10551 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10552 # So we really have to include pthread.h, and then link.
10553 _libs=$LIBS
10554 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10556$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010559
10560#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010561#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010562
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010563void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010567
10568pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ;
10570 return 0;
10571}
10572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10576$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010577 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010578
Guido van Rossum02a1c402000-02-25 19:26:31 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010581 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010583if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010584
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010586
Guido van Rossumad678af1998-10-02 14:42:15 +000010587else
Guido van Rossumad678af1998-10-02 14:42:15 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10590$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010591if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010595LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599/* Override any GCC internal prototype to avoid an error.
10600 Use char because int might match the return type of a GCC
10601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010602#ifdef __cplusplus
10603extern "C"
10604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010605char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010606int
10607main ()
10608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010619rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010621LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10624$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010625if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010628 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010629
Greg Steinadf63d62000-07-05 10:38:09 +000010630else
Greg Steinadf63d62000-07-05 10:38:09 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10633$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010636else
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010638LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642/* Override any GCC internal prototype to avoid an error.
10643 Use char because int might match the return type of a GCC
10644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010645#ifdef __cplusplus
10646extern "C"
10647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010648char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010649int
10650main ()
10651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010662rm -f core conftest.err conftest.$ac_objext \
10663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10667$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010668if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010669
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010670 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010671 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010672
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010673else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10676$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010677if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010679else
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010681LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685/* Override any GCC internal prototype to avoid an error.
10686 Use char because int might match the return type of a GCC
10687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
10690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010691char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010692int
10693main ()
10694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010705rm -f core conftest.err conftest.$ac_objext \
10706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10710$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010711if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010712
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010713 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010714 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010715
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010716else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10719$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010724LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728/* Override any GCC internal prototype to avoid an error.
10729 Use char because int might match the return type of a GCC
10730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010731#ifdef __cplusplus
10732extern "C"
10733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010734char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ;
10740 return 0;
10741}
10742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010748rm -f core conftest.err conftest.$ac_objext \
10749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010750LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10753$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010754if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010757 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010758
Guido van Rossumb93a8621998-05-07 13:27:32 +000010759else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010760
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010761 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10762
Guido van Rossum2d38f911996-06-26 19:47:01 +000010763fi
10764
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010766fi
10767
Guido van Rossum0be3e491997-05-22 20:33:33 +000010768fi
10769
Guido van Rossum49545951997-12-02 19:28:29 +000010770fi
10771
Guido van Rossumb93a8621998-05-07 13:27:32 +000010772fi
10773
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010775rm -f core conftest.err conftest.$ac_objext \
10776 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10779$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782else
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010784LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788/* Override any GCC internal prototype to avoid an error.
10789 Use char because int might match the return type of a GCC
10790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010791#ifdef __cplusplus
10792extern "C"
10793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010794char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010808rm -f core conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10813$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010814if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815
Martin v. Löwis130fb172001-07-19 11:00:41 +000010816 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010817
Guido van Rossum627b2d71993-12-24 10:39:16 +000010818fi
10819
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010820
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010821fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010822
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823if test "$posix_threads" = "yes"; then
10824 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010827
10828 fi
10829
10830 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10831 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010832 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835 ;;
10836 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010838
10839 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010840 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010842
10843 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 esac
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10847$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010848 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852 ac_cv_pthread_system_supported=no
10853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010855/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010856
10857 #include <stdio.h>
10858 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 void *foo(void *parm) {
10860 return NULL;
10861 }
10862 main() {
10863 pthread_attr_t attr;
10864 pthread_t id;
10865 if (pthread_attr_init(&attr)) exit(-1);
10866 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10867 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10868 exit(0);
10869 }
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 ac_cv_pthread_system_supported=yes
10873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881fi
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10884$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 if test "$ac_cv_pthread_system_supported" = "yes"; then
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888
10889 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 for ac_func in pthread_sigmask
10891do :
10892 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010893if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010897 case $ac_sys_system in
10898 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010901
10902 ;;
10903 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010904fi
10905done
10906
pdoxe14679c2017-10-05 00:01:56 -070010907 for ac_func in pthread_getcpuclockid
10908do :
10909 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10910if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10911 cat >>confdefs.h <<_ACEOF
10912#define HAVE_PTHREAD_GETCPUCLOCKID 1
10913_ACEOF
10914
10915fi
10916done
10917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918fi
10919
10920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10924$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10930$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6=no
10932 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10934$as_echo "yes" >&6; }
10935 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936
10937 ipv6=yes
10938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010943/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944 /* AF_INET6 available check */
10945#include <sys/types.h>
10946#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010947int
10948main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010950int domain = AF_INET6;
10951 ;
10952 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953}
Martin v. Löwis11437992002-04-12 09:54:03 +000010954_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010955if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961else
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010970if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10972$as_echo_n "checking if RFC2553 API is available... " >&6; }
10973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
10976 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010977#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978int
10979main ()
10980{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010981struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010982 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 ;
10984 return 0;
10985}
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Martin v. Löwis11437992002-04-12 09:54:03 +000010987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010989
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 ipv6=yes
10993
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010994else
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010998 ipv6=no
10999
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002fi
11003
11004if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006
11007fi
11008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009fi
11010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011
11012ipv6type=unknown
11013ipv6lib=none
11014ipv6trylibc=no
11015
11016if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11018$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011019 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11020 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021 case $i in
11022 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011025
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026#include <netinet/in.h>
11027#ifdef IPV6_INRIA_VERSION
11028yes
11029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011033 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011035rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036
11037 ;;
11038 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042#include <netinet/in.h>
11043#ifdef __KAME__
11044yes
11045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049 ipv6type=$i;
11050 ipv6lib=inet6
11051 ipv6libdir=/usr/local/v6/lib
11052 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011054rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055
11056 ;;
11057 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061#include <features.h>
11062#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11063yes
11064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068 ipv6type=$i;
11069 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072
11073 ;;
11074 linux-inet6)
11075 if test -d /usr/inet6; then
11076 ipv6type=$i
11077 ipv6lib=inet6
11078 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011079 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080 fi
11081 ;;
11082 solaris)
11083 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011084 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085 ipv6type=$i
11086 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087 fi
11088 fi
11089 ;;
11090 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094#include <sys/param.h>
11095#ifdef _TOSHIBA_INET6
11096yes
11097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101 ipv6type=$i;
11102 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011103 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011105rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106
11107 ;;
11108 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112#include </usr/local/v6/include/sys/v6config.h>
11113#ifdef __V6D__
11114yes
11115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119 ipv6type=$i;
11120 ipv6lib=v6;
11121 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011122 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011124rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125
11126 ;;
11127 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131#include <sys/param.h>
11132#ifdef _ZETA_MINAMI_INET6
11133yes
11134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138 ipv6type=$i;
11139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143
11144 ;;
11145 esac
11146 if test "$ipv6type" != "unknown"; then
11147 break
11148 fi
11149 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11151$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152fi
11153
11154if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11155 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11156 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11157 echo "using lib$ipv6lib"
11158 else
11159 if test $ipv6trylibc = "yes"; then
11160 echo "using libc"
11161 else
11162 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11163 echo "You need to fetch lib$ipv6lib.a from appropriate"
11164 echo 'ipv6 kit and compile beforehand.'
11165 exit 1
11166 fi
11167 fi
11168fi
11169
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11171$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h. */
11174 /* CAN_RAW_FD_FRAMES available check */
11175#include <linux/can/raw.h>
11176int
11177main ()
11178{
11179int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11180 ;
11181 return 0;
11182}
11183_ACEOF
11184if ac_fn_c_try_compile "$LINENO"; then :
11185
11186
11187$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11188
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11190$as_echo "yes" >&6; }
11191
11192else
11193
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
11196
11197fi
11198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011200# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11202$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206 withval=$with_doc_strings;
11207fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011208
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011209
11210if test -z "$with_doc_strings"
11211then with_doc_strings="yes"
11212fi
11213if test "$with_doc_strings" != "no"
11214then
11215
Matthias Kloseb9621712010-04-24 17:59:49 +000011216$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
11218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11220$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011221
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011222# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11224$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228 withval=$with_pymalloc;
11229fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011230
Neil Schemenauera35c6882001-02-27 04:45:05 +000011231
Neil Schemenauer16c22972002-03-22 15:34:49 +000011232if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011233then
11234 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011235fi
11236if test "$with_pymalloc" != "no"
11237then
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011240
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011241 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11244$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011245
Nick Coghlan6ea41862017-06-11 13:16:15 +100011246# Check for --with-c-locale-coercion
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11248$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11249
11250# Check whether --with-c-locale-coercion was given.
11251if test "${with_c_locale_coercion+set}" = set; then :
11252 withval=$with_c_locale_coercion;
11253fi
11254
11255
11256if test -z "$with_c_locale_coercion"
11257then
11258 with_c_locale_coercion="yes"
11259fi
11260if test "$with_c_locale_coercion" != "no"
11261then
11262
11263$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11264
11265fi
11266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11267$as_echo "$with_c_locale_coercion" >&6; }
11268
Benjamin Peterson05159c42009-12-03 03:01:27 +000011269# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11271$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011272
11273# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011275 withval=$with_valgrind;
11276else
11277 with_valgrind=no
11278fi
11279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11281$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011282if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011283 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 +020011284if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011287
11288else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011289 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290
11291fi
11292
11293
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011294 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295fi
11296
Łukasz Langaa785c872016-09-09 17:37:37 -070011297# Check for DTrace support
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11299$as_echo_n "checking for --with-dtrace... " >&6; }
11300
11301# Check whether --with-dtrace was given.
11302if test "${with_dtrace+set}" = set; then :
11303 withval=$with_dtrace;
11304else
11305 with_dtrace=no
11306fi
11307
11308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11309$as_echo "$with_dtrace" >&6; }
11310
11311
11312
11313
11314
11315DTRACE=
11316DFLAGS=
11317DTRACE_HEADERS=
11318DTRACE_OBJS=
11319
11320if test "$with_dtrace" = "yes"
11321then
11322 # Extract the first word of "dtrace", so it can be a program name with args.
11323set dummy dtrace; ac_word=$2
11324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11325$as_echo_n "checking for $ac_word... " >&6; }
11326if ${ac_cv_path_DTRACE+:} false; then :
11327 $as_echo_n "(cached) " >&6
11328else
11329 case $DTRACE in
11330 [\\/]* | ?:[\\/]*)
11331 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11332 ;;
11333 *)
11334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11335for as_dir in $PATH
11336do
11337 IFS=$as_save_IFS
11338 test -z "$as_dir" && as_dir=.
11339 for ac_exec_ext in '' $ac_executable_extensions; do
11340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11341 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11343 break 2
11344 fi
11345done
11346 done
11347IFS=$as_save_IFS
11348
11349 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11350 ;;
11351esac
11352fi
11353DTRACE=$ac_cv_path_DTRACE
11354if test -n "$DTRACE"; then
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11356$as_echo "$DTRACE" >&6; }
11357else
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359$as_echo "no" >&6; }
11360fi
11361
11362
11363 if test "$DTRACE" = "not found"; then
11364 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11365 fi
11366
11367$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11368
11369 DTRACE_HEADERS="Include/pydtrace_probes.h"
11370
11371 # On OS X, DTrace providers do not need to be explicitly compiled and
11372 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11373 # generation flag '-G'. We check for presence of this flag, rather than
11374 # hardcoding support by OS, in the interest of robustness.
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11376$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11377if ${ac_cv_dtrace_link+:} false; then :
11378 $as_echo_n "(cached) " >&6
11379else
11380 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011381 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011382 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11383 ac_cv_dtrace_link=yes
11384
11385fi
11386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11387$as_echo "$ac_cv_dtrace_link" >&6; }
11388 if test "$ac_cv_dtrace_link" = "yes"; then
11389 DTRACE_OBJS="Python/pydtrace.o"
11390 fi
11391fi
11392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011394
Guido van Rossum98935bf2001-09-05 19:13:16 +000011395DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011396
Guido van Rossume97ee181999-12-20 21:27:22 +000011397# the dlopen() function means we might want to use dynload_shlib.o. some
11398# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011399for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011400do :
11401 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011406
Guido van Rossume97ee181999-12-20 21:27:22 +000011407fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011408done
Guido van Rossume97ee181999-12-20 21:27:22 +000011409
Michael W. Hudson54241132001-12-07 15:38:26 +000011410
Guido van Rossume97ee181999-12-20 21:27:22 +000011411# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11412# loading of modules.
11413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11415$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011416if test -z "$DYNLOADFILE"
11417then
11418 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011419 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11420 if test "$ac_cv_func_dlopen" = yes
11421 then DYNLOADFILE="dynload_shlib.o"
11422 else DYNLOADFILE="dynload_aix.o"
11423 fi
11424 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011425 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011426 *)
11427 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11428 # out any dynamic loading
11429 if test "$ac_cv_func_dlopen" = yes
11430 then DYNLOADFILE="dynload_shlib.o"
11431 else DYNLOADFILE="dynload_stub.o"
11432 fi
11433 ;;
11434 esac
11435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11437$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011438if test "$DYNLOADFILE" != "dynload_stub.o"
11439then
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011442
11443fi
11444
Neil Schemenauer4e425612001-06-19 15:44:15 +000011445# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11449$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011450if test -z "$MACHDEP_OBJS"
11451then
Jack Jansene578a632001-08-15 01:27:14 +000011452 MACHDEP_OBJS=$extra_machdep_objs
11453else
11454 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011455fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011456if test -z "$MACHDEP_OBJS"; then
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11458$as_echo "none" >&6; }
11459else
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11461$as_echo "$MACHDEP_OBJS" >&6; }
11462fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011463
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011465for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011466 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011467 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011468 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011469 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011470 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011471 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011472 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011473 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011474 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011475 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011476 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011477 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11478 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011479 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011480 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011481 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011482 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11483 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011484 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011485 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011486 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011487 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011488 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011489do :
11490 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11491ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011492if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011495_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011497fi
11498done
11499
Michael W. Hudson54241132001-12-07 15:38:26 +000011500
Benjamin Peterson40caa052018-09-12 15:52:40 -070011501# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11502# links. Some libc implementations have a stub lchmod implementation that always
11503# returns an error.
11504if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011505 for ac_func in lchmod
11506do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011507 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11508if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011509 cat >>confdefs.h <<_ACEOF
11510#define HAVE_LCHMOD 1
11511_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011512
11513fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011514done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011515
11516fi
11517
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011518ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11519 #include <dirent.h>
11520"
11521if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11522
11523$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11524
11525fi
11526
11527
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011528# For some functions, having a definition is not sufficient, since
11529# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11531$as_echo_n "checking for chroot... " >&6; }
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011534#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011535int
11536main ()
11537{
11538void *x=chroot
11539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011546
Matthias Kloseb159a552010-04-25 21:00:44 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552
11553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11556$as_echo_n "checking for link... " >&6; }
11557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011558/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011560int
11561main ()
11562{
11563void *x=link
11564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571
Matthias Kloseb159a552010-04-25 21:00:44 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011577
11578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11581$as_echo_n "checking for symlink... " >&6; }
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585int
11586main ()
11587{
11588void *x=symlink
11589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596
Matthias Kloseb159a552010-04-25 21:00:44 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602
11603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11606$as_echo_n "checking for fchdir... " >&6; }
11607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011609#include <unistd.h>
11610int
11611main ()
11612{
11613void *x=fchdir
11614 ;
11615 return 0;
11616}
11617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011621
Matthias Kloseb159a552010-04-25 21:00:44 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011627
11628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11631$as_echo_n "checking for fsync... " >&6; }
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011634#include <unistd.h>
11635int
11636main ()
11637{
11638void *x=fsync
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646
Matthias Kloseb159a552010-04-25 21:00:44 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011652
11653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11656$as_echo_n "checking for fdatasync... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659#include <unistd.h>
11660int
11661main ()
11662{
11663void *x=fdatasync
11664 ;
11665 return 0;
11666}
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671
Matthias Kloseb159a552010-04-25 21:00:44 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011677
11678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11681$as_echo_n "checking for epoll... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011683/* end confdefs.h. */
11684#include <sys/epoll.h>
11685int
11686main ()
11687{
11688void *x=epoll_create
11689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011696
Matthias Kloseb159a552010-04-25 21:00:44 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011702
11703fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11706$as_echo_n "checking for epoll_create1... " >&6; }
11707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708/* end confdefs.h. */
11709#include <sys/epoll.h>
11710int
11711main ()
11712{
11713void *x=epoll_create1
11714 ;
11715 return 0;
11716}
11717_ACEOF
11718if ac_fn_c_try_compile "$LINENO"; then :
11719
11720$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11721
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11723$as_echo "yes" >&6; }
11724else
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727
11728fi
11729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11731$as_echo_n "checking for kqueue... " >&6; }
11732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011733/* end confdefs.h. */
11734
11735#include <sys/types.h>
11736#include <sys/event.h>
11737
11738int
11739main ()
11740{
11741int x=kqueue()
11742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011749
Matthias Kloseb159a552010-04-25 21:00:44 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011755
11756fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11759$as_echo_n "checking for prlimit... " >&6; }
11760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761/* end confdefs.h. */
11762
11763#include <sys/time.h>
11764#include <sys/resource.h>
11765
11766int
11767main ()
11768{
11769void *x=prlimit
11770 ;
11771 return 0;
11772}
11773_ACEOF
11774if ac_fn_c_try_compile "$LINENO"; then :
11775
11776$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11777
11778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11779$as_echo "yes" >&6; }
11780else
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11782$as_echo "no" >&6; }
11783
11784fi
11785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786
Martin v. Löwisd5843682002-11-21 20:41:28 +000011787# On some systems (eg. FreeBSD 5), we would find a definition of the
11788# functions ctermid_r, setgroups in the library, but no prototype
11789# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11790# address to avoid compiler warnings and potential miscompilations
11791# because of the missing prototypes.
11792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11794$as_echo_n "checking for ctermid_r... " >&6; }
11795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011796/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011797
Martin v. Löwisd5843682002-11-21 20:41:28 +000011798#include <stdio.h>
11799
Martin v. Löwisd5843682002-11-21 20:41:28 +000011800int
11801main ()
11802{
11803void* p = ctermid_r
11804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011811
Matthias Kloseb159a552010-04-25 21:00:44 +000011812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11816$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011817
11818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11820
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11822$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011824 $as_echo_n "(cached) " >&6
11825else
11826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011828#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011829int
11830main ()
11831{
11832void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011833
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011834 ;
11835 return 0;
11836}
11837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011838if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011839 ac_cv_flock_decl=yes
11840else
11841 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011842
11843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011845
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011846fi
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11848$as_echo "$ac_cv_flock_decl" >&6; }
11849if test "x${ac_cv_flock_decl}" = xyes; then
11850 for ac_func in flock
11851do :
11852 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011854 cat >>confdefs.h <<_ACEOF
11855#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011856_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011857
Antoine Pitroua3000072010-09-07 14:52:42 +000011858else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011860$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011862 $as_echo_n "(cached) " >&6
11863else
11864 ac_check_lib_save_LIBS=$LIBS
11865LIBS="-lbsd $LIBS"
11866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11867/* end confdefs.h. */
11868
11869/* Override any GCC internal prototype to avoid an error.
11870 Use char because int might match the return type of a GCC
11871 builtin and then its argument prototype would still apply. */
11872#ifdef __cplusplus
11873extern "C"
11874#endif
11875char flock ();
11876int
11877main ()
11878{
11879return flock ();
11880 ;
11881 return 0;
11882}
11883_ACEOF
11884if ac_fn_c_try_link "$LINENO"; then :
11885 ac_cv_lib_bsd_flock=yes
11886else
11887 ac_cv_lib_bsd_flock=no
11888fi
11889rm -f core conftest.err conftest.$ac_objext \
11890 conftest$ac_exeext conftest.$ac_ext
11891LIBS=$ac_check_lib_save_LIBS
11892fi
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11894$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011896 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011897
11898
11899$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11900
11901
11902fi
11903
11904
11905fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011906done
11907
Antoine Pitroua3000072010-09-07 14:52:42 +000011908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11911$as_echo_n "checking for getpagesize... " >&6; }
11912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011913/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011914
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011915#include <unistd.h>
11916
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011917int
11918main ()
11919{
11920void* p = getpagesize
11921 ;
11922 return 0;
11923}
11924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011925if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011928
Matthias Kloseb159a552010-04-25 21:00:44 +000011929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011930$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011931else
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011934
11935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011937
Victor Stinner984890f2011-11-24 13:53:38 +010011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11939$as_echo_n "checking for broken unsetenv... " >&6; }
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941/* end confdefs.h. */
11942
11943#include <stdlib.h>
11944
11945int
11946main ()
11947{
11948int res = unsetenv("DUMMY")
11949 ;
11950 return 0;
11951}
11952_ACEOF
11953if ac_fn_c_try_compile "$LINENO"; then :
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11955$as_echo "no" >&6; }
11956else
11957
11958$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11959
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11961$as_echo "yes" >&6; }
11962
11963fi
11964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11965
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011966for ac_prog in true
11967do
11968 # Extract the first word of "$ac_prog", so it can be a program name with args.
11969set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11971$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011974else
11975 if test -n "$TRUE"; then
11976 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11977else
11978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11979for as_dir in $PATH
11980do
11981 IFS=$as_save_IFS
11982 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011985 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 $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 +000011987 break 2
11988 fi
11989done
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011992
11993fi
11994fi
11995TRUE=$ac_cv_prog_TRUE
11996if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11998$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011999else
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012002fi
12003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012005 test -n "$TRUE" && break
12006done
12007test -n "$TRUE" || TRUE="/bin/true"
12008
12009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12011$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012012if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014else
12015 ac_check_lib_save_LIBS=$LIBS
12016LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020/* Override any GCC internal prototype to avoid an error.
12021 Use char because int might match the return type of a GCC
12022 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012023#ifdef __cplusplus
12024extern "C"
12025#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012026char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012027int
12028main ()
12029{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012036 ac_cv_lib_c_inet_aton=yes
12037else
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012040rm -f core conftest.err conftest.$ac_objext \
12041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042LIBS=$ac_check_lib_save_LIBS
12043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12045$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012047 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12050$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053else
12054 ac_check_lib_save_LIBS=$LIBS
12055LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012057/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059/* Override any GCC internal prototype to avoid an error.
12060 Use char because int might match the return type of a GCC
12061 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062#ifdef __cplusplus
12063extern "C"
12064#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066int
12067main ()
12068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012075 ac_cv_lib_resolv_inet_aton=yes
12076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079rm -f core conftest.err conftest.$ac_objext \
12080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081LIBS=$ac_check_lib_save_LIBS
12082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12084$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012085if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012086 cat >>confdefs.h <<_ACEOF
12087#define HAVE_LIBRESOLV 1
12088_ACEOF
12089
12090 LIBS="-lresolv $LIBS"
12091
12092fi
12093
12094
12095fi
12096
12097
Christian Heimesd0764e22007-12-04 15:00:33 +000012098# On Tru64, chflags seems to be present, but calling it will
12099# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12101$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012102if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012106 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012109/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012110
Christian Heimesd0764e22007-12-04 15:00:33 +000012111#include <sys/stat.h>
12112#include <unistd.h>
12113int main(int argc, char*argv[])
12114{
12115 if(chflags(argv[0], 0) != 0)
12116 return 1;
12117 return 0;
12118}
Ned Deily3eb67d52011-06-28 00:00:28 -070012119
Christian Heimesd0764e22007-12-04 15:00:33 +000012120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012128fi
12129
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12133$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012134if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012136if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012137 ac_cv_have_chflags="yes"
12138else
12139 ac_cv_have_chflags="no"
12140fi
12141
12142fi
12143if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012146
12147fi
12148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12150$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012155 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012156else
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012158/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012159
Christian Heimesd0764e22007-12-04 15:00:33 +000012160#include <sys/stat.h>
12161#include <unistd.h>
12162int main(int argc, char*argv[])
12163{
12164 if(lchflags(argv[0], 0) != 0)
12165 return 1;
12166 return 0;
12167}
Ned Deily3eb67d52011-06-28 00:00:28 -070012168
Christian Heimesd0764e22007-12-04 15:00:33 +000012169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012177fi
12178
12179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12182$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012183if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012186 ac_cv_have_lchflags="yes"
12187else
12188 ac_cv_have_lchflags="no"
12189fi
12190
12191fi
12192if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012195
12196fi
12197
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012198case $ac_sys_system/$ac_sys_release in
12199Darwin/*)
12200 _CUR_CFLAGS="${CFLAGS}"
12201 _CUR_LDFLAGS="${LDFLAGS}"
12202 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12203 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12204 ;;
12205esac
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12208$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012211else
12212 ac_check_lib_save_LIBS=$LIBS
12213LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012215/* end confdefs.h. */
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217/* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012220#ifdef __cplusplus
12221extern "C"
12222#endif
12223char inflateCopy ();
12224int
12225main ()
12226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012233 ac_cv_lib_z_inflateCopy=yes
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012239LIBS=$ac_check_lib_save_LIBS
12240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12242$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012246
12247fi
12248
12249
12250case $ac_sys_system/$ac_sys_release in
12251Darwin/*)
12252 CFLAGS="${_CUR_CFLAGS}"
12253 LDFLAGS="${_CUR_LDFLAGS}"
12254 ;;
12255esac
12256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12258$as_echo_n "checking for hstrerror... " >&6; }
12259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012260/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012261
Martin v. Löwise9416172003-05-03 10:12:45 +000012262#include <netdb.h>
12263
Martin v. Löwise9416172003-05-03 10:12:45 +000012264int
12265main ()
12266{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012267void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012268 ;
12269 return 0;
12270}
12271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012275
Matthias Kloseb159a552010-04-25 21:00:44 +000012276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12280$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012281
12282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12287$as_echo_n "checking for inet_aton... " >&6; }
12288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012290
Martin v. Löwis86d66262006-02-17 08:40:11 +000012291#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012292#include <sys/socket.h>
12293#include <netinet/in.h>
12294#include <arpa/inet.h>
12295
Martin v. Löwise9416172003-05-03 10:12:45 +000012296int
12297main ()
12298{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012299void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012307
Matthias Kloseb159a552010-04-25 21:00:44 +000012308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12312$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012313
12314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315rm -f core conftest.err conftest.$ac_objext \
12316 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12319$as_echo_n "checking for inet_pton... " >&6; }
12320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012322
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012323#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012324#include <sys/socket.h>
12325#include <netinet/in.h>
12326#include <arpa/inet.h>
12327
Martin v. Löwise9416172003-05-03 10:12:45 +000012328int
12329main ()
12330{
12331void* p = inet_pton
12332 ;
12333 return 0;
12334}
12335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012337
Matthias Kloseb9621712010-04-24 17:59:49 +000012338$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012339
Matthias Kloseb159a552010-04-25 21:00:44 +000012340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012342else
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012345
12346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012348
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012349# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12351$as_echo_n "checking for setgroups... " >&6; }
12352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012354
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012355#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012356#ifdef HAVE_GRP_H
12357#include <grp.h>
12358#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012359
Martin v. Löwisd5843682002-11-21 20:41:28 +000012360int
12361main ()
12362{
12363void* p = setgroups
12364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012371
Matthias Kloseb159a552010-04-25 21:00:44 +000012372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012374else
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012377
12378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012380
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012381# check for openpty and forkpty
12382
12383for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012384do :
12385 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012386if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012389_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012390
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012391else
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12393$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012396else
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012398LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402/* Override any GCC internal prototype to avoid an error.
12403 Use char because int might match the return type of a GCC
12404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012405#ifdef __cplusplus
12406extern "C"
12407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012408char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012409int
12410main ()
12411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 ;
12414 return 0;
12415}
12416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012419else
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012422rm -f core conftest.err conftest.$ac_objext \
12423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012424LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12427$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012429 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012430 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12433$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012434if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012436else
12437 ac_check_lib_save_LIBS=$LIBS
12438LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012440/* end confdefs.h. */
12441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442/* Override any GCC internal prototype to avoid an error.
12443 Use char because int might match the return type of a GCC
12444 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012445#ifdef __cplusplus
12446extern "C"
12447#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012448char openpty ();
12449int
12450main ()
12451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012453 ;
12454 return 0;
12455}
12456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012458 ac_cv_lib_bsd_openpty=yes
12459else
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012462rm -f core conftest.err conftest.$ac_objext \
12463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012464LIBS=$ac_check_lib_save_LIBS
12465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12467$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012468if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012470 LIBS="$LIBS -lbsd"
12471fi
12472
12473
12474fi
12475
Fred Drake8cef4cf2000-06-28 16:40:38 +000012476
12477fi
12478done
12479
12480for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012481do :
12482 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012483if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012486_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487
Fred Drake8cef4cf2000-06-28 16:40:38 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12490$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012493else
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499/* Override any GCC internal prototype to avoid an error.
12500 Use char because int might match the return type of a GCC
12501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012502#ifdef __cplusplus
12503extern "C"
12504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012505char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012506int
12507main ()
12508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012519rm -f core conftest.err conftest.$ac_objext \
12520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012521LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12524$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012525if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012527 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12530$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012531if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012533else
12534 ac_check_lib_save_LIBS=$LIBS
12535LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012537/* end confdefs.h. */
12538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539/* Override any GCC internal prototype to avoid an error.
12540 Use char because int might match the return type of a GCC
12541 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012542#ifdef __cplusplus
12543extern "C"
12544#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012545char forkpty ();
12546int
12547main ()
12548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012550 ;
12551 return 0;
12552}
12553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012554if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012555 ac_cv_lib_bsd_forkpty=yes
12556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012559rm -f core conftest.err conftest.$ac_objext \
12560 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012561LIBS=$ac_check_lib_save_LIBS
12562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12564$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012565if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012567 LIBS="$LIBS -lbsd"
12568fi
12569
12570
12571fi
12572
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573
12574fi
12575done
12576
Jack Jansendd19cf82001-12-06 22:36:17 +000012577
Michael W. Hudson54241132001-12-07 15:38:26 +000012578# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012579for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012580do :
12581 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12582ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012583if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012586_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012587
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589done
12590
Michael W. Hudson54241132001-12-07 15:38:26 +000012591
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012592ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012593if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012594 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012595
Martin v. Löwis1142de32002-03-29 16:28:31 +000012596else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012598 *" dup2.$ac_objext "* ) ;;
12599 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012600 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012601esac
12602
Martin v. Löwis1142de32002-03-29 16:28:31 +000012603fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012604
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012605ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012606if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012607 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12608
12609else
12610 case " $LIBOBJS " in
12611 *" strdup.$ac_objext "* ) ;;
12612 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12613 ;;
12614esac
12615
12616fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012617
12618
12619for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012620do :
12621 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012622if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012640
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012643
Guido van Rossum627b2d71993-12-24 10:39:16 +000012644fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012645done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646
Jack Jansen150753c2003-03-29 22:07:47 +000012647for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012648do :
12649 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012650if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012651 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012656#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012657int
12658main ()
12659{
12660setpgrp(0,0);
12661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012668
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012671
12672fi
12673done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012674
Thomas Wouters3a584202000-08-05 23:28:51 +000012675for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012676do :
12677 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012678if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012684#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012685int
12686main ()
12687{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 ;
12690 return 0;
12691}
12692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_compile "$LINENO"; then :
12694
Guido van Rossum627b2d71993-12-24 10:39:16 +000012695else
Skip Montanaro6dead952003-09-25 14:50:04 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
Guido van Rossum627b2d71993-12-24 10:39:16 +000012700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012704done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012705
Michael W. Hudson54241132001-12-07 15:38:26 +000012706
Gregory P. Smith387512c2018-12-30 15:42:32 -080012707# We search for both crypt and crypt_r as one or the other may be defined
12708# This gets us our -lcrypt in LIBS when required on the target platform.
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12710$as_echo_n "checking for library containing crypt... " >&6; }
12711if ${ac_cv_search_crypt+:} false; then :
12712 $as_echo_n "(cached) " >&6
12713else
12714 ac_func_search_save_LIBS=$LIBS
12715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12716/* end confdefs.h. */
12717
12718/* Override any GCC internal prototype to avoid an error.
12719 Use char because int might match the return type of a GCC
12720 builtin and then its argument prototype would still apply. */
12721#ifdef __cplusplus
12722extern "C"
12723#endif
12724char crypt ();
12725int
12726main ()
12727{
12728return crypt ();
12729 ;
12730 return 0;
12731}
12732_ACEOF
12733for ac_lib in '' crypt; do
12734 if test -z "$ac_lib"; then
12735 ac_res="none required"
12736 else
12737 ac_res=-l$ac_lib
12738 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12739 fi
12740 if ac_fn_c_try_link "$LINENO"; then :
12741 ac_cv_search_crypt=$ac_res
12742fi
12743rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext
12745 if ${ac_cv_search_crypt+:} false; then :
12746 break
12747fi
12748done
12749if ${ac_cv_search_crypt+:} false; then :
12750
12751else
12752 ac_cv_search_crypt=no
12753fi
12754rm conftest.$ac_ext
12755LIBS=$ac_func_search_save_LIBS
12756fi
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12758$as_echo "$ac_cv_search_crypt" >&6; }
12759ac_res=$ac_cv_search_crypt
12760if test "$ac_res" != no; then :
12761 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12762
12763fi
12764
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12766$as_echo_n "checking for library containing crypt_r... " >&6; }
12767if ${ac_cv_search_crypt_r+:} false; then :
12768 $as_echo_n "(cached) " >&6
12769else
12770 ac_func_search_save_LIBS=$LIBS
12771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12772/* end confdefs.h. */
12773
12774/* Override any GCC internal prototype to avoid an error.
12775 Use char because int might match the return type of a GCC
12776 builtin and then its argument prototype would still apply. */
12777#ifdef __cplusplus
12778extern "C"
12779#endif
12780char crypt_r ();
12781int
12782main ()
12783{
12784return crypt_r ();
12785 ;
12786 return 0;
12787}
12788_ACEOF
12789for ac_lib in '' crypt; do
12790 if test -z "$ac_lib"; then
12791 ac_res="none required"
12792 else
12793 ac_res=-l$ac_lib
12794 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12795 fi
12796 if ac_fn_c_try_link "$LINENO"; then :
12797 ac_cv_search_crypt_r=$ac_res
12798fi
12799rm -f core conftest.err conftest.$ac_objext \
12800 conftest$ac_exeext
12801 if ${ac_cv_search_crypt_r+:} false; then :
12802 break
12803fi
12804done
12805if ${ac_cv_search_crypt_r+:} false; then :
12806
12807else
12808 ac_cv_search_crypt_r=no
12809fi
12810rm conftest.$ac_ext
12811LIBS=$ac_func_search_save_LIBS
12812fi
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12814$as_echo "$ac_cv_search_crypt_r" >&6; }
12815ac_res=$ac_cv_search_crypt_r
12816if test "$ac_res" != no; then :
12817 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12818
12819fi
12820
12821
12822ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12823if test "x$ac_cv_func_crypt_r" = xyes; then :
12824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825/* end confdefs.h. */
12826
12827#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12828#include <crypt.h>
12829
12830int
12831main ()
12832{
12833
12834struct crypt_data d;
12835char *r = crypt_r("", "", &d);
12836
12837 ;
12838 return 0;
12839}
12840_ACEOF
12841if ac_fn_c_try_compile "$LINENO"; then :
12842
12843$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12844
12845fi
12846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12847
12848fi
12849
12850
Victor Stinnere0be4232011-10-25 13:06:09 +020012851for ac_func in clock_gettime
12852do :
12853 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12854if test "x$ac_cv_func_clock_gettime" = xyes; then :
12855 cat >>confdefs.h <<_ACEOF
12856#define HAVE_CLOCK_GETTIME 1
12857_ACEOF
12858
12859else
12860
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12862$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12863if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12864 $as_echo_n "(cached) " >&6
12865else
12866 ac_check_lib_save_LIBS=$LIBS
12867LIBS="-lrt $LIBS"
12868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869/* end confdefs.h. */
12870
12871/* Override any GCC internal prototype to avoid an error.
12872 Use char because int might match the return type of a GCC
12873 builtin and then its argument prototype would still apply. */
12874#ifdef __cplusplus
12875extern "C"
12876#endif
12877char clock_gettime ();
12878int
12879main ()
12880{
12881return clock_gettime ();
12882 ;
12883 return 0;
12884}
12885_ACEOF
12886if ac_fn_c_try_link "$LINENO"; then :
12887 ac_cv_lib_rt_clock_gettime=yes
12888else
12889 ac_cv_lib_rt_clock_gettime=no
12890fi
12891rm -f core conftest.err conftest.$ac_objext \
12892 conftest$ac_exeext conftest.$ac_ext
12893LIBS=$ac_check_lib_save_LIBS
12894fi
12895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12896$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12897if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12898
Victor Stinner7efb8332014-08-29 15:41:08 +020012899 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012900 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12901
12902
12903$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12904
12905
12906fi
12907
12908
12909fi
12910done
12911
12912
12913for ac_func in clock_getres
12914do :
12915 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12916if test "x$ac_cv_func_clock_getres" = xyes; then :
12917 cat >>confdefs.h <<_ACEOF
12918#define HAVE_CLOCK_GETRES 1
12919_ACEOF
12920
12921else
12922
12923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12924$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12925if ${ac_cv_lib_rt_clock_getres+:} false; then :
12926 $as_echo_n "(cached) " >&6
12927else
12928 ac_check_lib_save_LIBS=$LIBS
12929LIBS="-lrt $LIBS"
12930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931/* end confdefs.h. */
12932
12933/* Override any GCC internal prototype to avoid an error.
12934 Use char because int might match the return type of a GCC
12935 builtin and then its argument prototype would still apply. */
12936#ifdef __cplusplus
12937extern "C"
12938#endif
12939char clock_getres ();
12940int
12941main ()
12942{
12943return clock_getres ();
12944 ;
12945 return 0;
12946}
12947_ACEOF
12948if ac_fn_c_try_link "$LINENO"; then :
12949 ac_cv_lib_rt_clock_getres=yes
12950else
12951 ac_cv_lib_rt_clock_getres=no
12952fi
12953rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
12955LIBS=$ac_check_lib_save_LIBS
12956fi
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12958$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12959if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12960
12961 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12962
12963
12964fi
12965
12966
12967fi
12968done
12969
12970
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012971for ac_func in clock_settime
12972do :
12973 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12974if test "x$ac_cv_func_clock_settime" = xyes; then :
12975 cat >>confdefs.h <<_ACEOF
12976#define HAVE_CLOCK_SETTIME 1
12977_ACEOF
12978
12979else
12980
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12982$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12983if ${ac_cv_lib_rt_clock_settime+:} false; then :
12984 $as_echo_n "(cached) " >&6
12985else
12986 ac_check_lib_save_LIBS=$LIBS
12987LIBS="-lrt $LIBS"
12988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12989/* end confdefs.h. */
12990
12991/* Override any GCC internal prototype to avoid an error.
12992 Use char because int might match the return type of a GCC
12993 builtin and then its argument prototype would still apply. */
12994#ifdef __cplusplus
12995extern "C"
12996#endif
12997char clock_settime ();
12998int
12999main ()
13000{
13001return clock_settime ();
13002 ;
13003 return 0;
13004}
13005_ACEOF
13006if ac_fn_c_try_link "$LINENO"; then :
13007 ac_cv_lib_rt_clock_settime=yes
13008else
13009 ac_cv_lib_rt_clock_settime=no
13010fi
13011rm -f core conftest.err conftest.$ac_objext \
13012 conftest$ac_exeext conftest.$ac_ext
13013LIBS=$ac_check_lib_save_LIBS
13014fi
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13016$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13017if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13018
13019 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13020
13021
13022fi
13023
13024
13025fi
13026done
13027
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13030$as_echo_n "checking for major... " >&6; }
13031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013033
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013034#if defined(MAJOR_IN_MKDEV)
13035#include <sys/mkdev.h>
13036#elif defined(MAJOR_IN_SYSMACROS)
13037#include <sys/sysmacros.h>
13038#else
13039#include <sys/types.h>
13040#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013041
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013042int
13043main ()
13044{
13045
13046 makedev(major(0),minor(0));
13047
13048 ;
13049 return 0;
13050}
13051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013053
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13058$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013059
13060else
Skip Montanaro6dead952003-09-25 14:50:04 +000013061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013064
13065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013066rm -f core conftest.err conftest.$ac_objext \
13067 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013068
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013069# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013070# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13072$as_echo_n "checking for getaddrinfo... " >&6; }
13073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013075
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013076#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013077#include <sys/socket.h>
13078#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013079#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080
Martin v. Löwis11437992002-04-12 09:54:03 +000013081int
13082main ()
13083{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013084getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013090 have_getaddrinfo=yes
13091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013094rm -f core conftest.err conftest.$ac_objext \
13095 conftest$ac_exeext conftest.$ac_ext
13096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13097$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013098if test $have_getaddrinfo = yes
13099then
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13101$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013102 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013106
13107if test "${enable_ipv6+set}" = set; then
13108 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13109else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013110 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013111fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115
Stefan Krah19c21392012-11-22 23:47:32 +010013116#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117#include <sys/types.h>
13118#include <netdb.h>
13119#include <string.h>
13120#include <sys/socket.h>
13121#include <netinet/in.h>
13122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124{
13125 int passive, gaierr, inet4 = 0, inet6 = 0;
13126 struct addrinfo hints, *ai, *aitop;
13127 char straddr[INET6_ADDRSTRLEN], strport[16];
13128
13129 for (passive = 0; passive <= 1; passive++) {
13130 memset(&hints, 0, sizeof(hints));
13131 hints.ai_family = AF_UNSPEC;
13132 hints.ai_flags = passive ? AI_PASSIVE : 0;
13133 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013134 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13136 (void)gai_strerror(gaierr);
13137 goto bad;
13138 }
13139 for (ai = aitop; ai; ai = ai->ai_next) {
13140 if (ai->ai_addr == NULL ||
13141 ai->ai_addrlen == 0 ||
13142 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13143 straddr, sizeof(straddr), strport, sizeof(strport),
13144 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13145 goto bad;
13146 }
13147 switch (ai->ai_family) {
13148 case AF_INET:
13149 if (strcmp(strport, "54321") != 0) {
13150 goto bad;
13151 }
13152 if (passive) {
13153 if (strcmp(straddr, "0.0.0.0") != 0) {
13154 goto bad;
13155 }
13156 } else {
13157 if (strcmp(straddr, "127.0.0.1") != 0) {
13158 goto bad;
13159 }
13160 }
13161 inet4++;
13162 break;
13163 case AF_INET6:
13164 if (strcmp(strport, "54321") != 0) {
13165 goto bad;
13166 }
13167 if (passive) {
13168 if (strcmp(straddr, "::") != 0) {
13169 goto bad;
13170 }
13171 } else {
13172 if (strcmp(straddr, "::1") != 0) {
13173 goto bad;
13174 }
13175 }
13176 inet6++;
13177 break;
13178 case AF_UNSPEC:
13179 goto bad;
13180 break;
13181 default:
13182 /* another family support? */
13183 break;
13184 }
13185 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013186 freeaddrinfo(aitop);
13187 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188 }
13189
13190 if (!(inet4 == 0 || inet4 == 2))
13191 goto bad;
13192 if (!(inet6 == 0 || inet6 == 2))
13193 goto bad;
13194
13195 if (aitop)
13196 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198
13199 bad:
13200 if (aitop)
13201 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013203}
13204
Martin v. Löwis11437992002-04-12 09:54:03 +000013205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013207 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13220$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13221
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013222if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223then
13224 if test $ipv6 = yes
13225 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226 echo 'Fatal: You must get working getaddrinfo() function.'
13227 echo ' or you can specify "--disable-ipv6"'.
13228 exit 1
13229 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013230else
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013233
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013235
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013236for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013237do :
13238 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013239if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013242_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244fi
13245done
13246
Michael W. Hudson54241132001-12-07 15:38:26 +000013247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13250$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013251if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013256#include <sys/types.h>
13257#include <sys/time.h>
13258#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260int
13261main ()
13262{
13263if ((struct tm *) 0)
13264return 0;
13265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013271else
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13277$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013278if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281
13282fi
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13285$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291#include <sys/types.h>
13292#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013297struct tm tm;
13298 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305 ac_cv_struct_tm=time.h
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13312$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013313if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316
13317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319ac_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 +000013320#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322"
Victor Stinnere0be4232011-10-25 13:06:09 +020013323if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
13325cat >>confdefs.h <<_ACEOF
13326#define HAVE_STRUCT_TM_TM_ZONE 1
13327_ACEOF
13328
13329
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13338"
Victor Stinnere0be4232011-10-25 13:06:09 +020013339if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343fi
13344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013346#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347_ACEOF
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13350$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013351if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013356#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357#if !HAVE_DECL_TZNAME
13358extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361int
13362main ()
13363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ;
13366 return 0;
13367}
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370 ac_cv_var_tzname=yes
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013374rm -f core conftest.err conftest.$ac_objext \
13375 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13378$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013379 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383 fi
13384fi
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386ac_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 +020013387if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
13389cat >>confdefs.h <<_ACEOF
13390#define HAVE_STRUCT_STAT_ST_RDEV 1
13391_ACEOF
13392
13393
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013394fi
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396ac_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 +020013397if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399cat >>confdefs.h <<_ACEOF
13400#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13401_ACEOF
13402
13403
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013404fi
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406ac_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 +020013407if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013408
13409cat >>confdefs.h <<_ACEOF
13410#define HAVE_STRUCT_STAT_ST_FLAGS 1
13411_ACEOF
13412
13413
13414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416ac_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 +020013417if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013418
13419cat >>confdefs.h <<_ACEOF
13420#define HAVE_STRUCT_STAT_ST_GEN 1
13421_ACEOF
13422
13423
13424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426ac_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 +020013427if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013428
13429cat >>confdefs.h <<_ACEOF
13430#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13431_ACEOF
13432
13433
13434fi
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436ac_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 +020013437if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439cat >>confdefs.h <<_ACEOF
13440#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13441_ACEOF
13442
13443
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013444fi
13445
Stefan Krah267b6392016-04-26 01:09:18 +020013446ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13447 #include <sys/types.h>
13448 #include <pwd.h>
13449
13450"
13451if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13452
13453cat >>confdefs.h <<_ACEOF
13454#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13455_ACEOF
13456
13457
13458fi
13459ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13460 #include <sys/types.h>
13461 #include <pwd.h>
13462
13463"
13464if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13465
13466cat >>confdefs.h <<_ACEOF
13467#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13468_ACEOF
13469
13470
13471fi
13472
Zachary Ware6a6967e2016-10-01 00:47:27 -050013473# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13474ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13475"
13476if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13477
13478cat >>confdefs.h <<_ACEOF
13479#define HAVE_SIGINFO_T_SI_BAND 1
13480_ACEOF
13481
13482
13483fi
13484
Michael W. Hudson54241132001-12-07 15:38:26 +000013485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13487$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013488if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490else
Matthias Kloseb159a552010-04-25 21:00:44 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013494#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013495int
13496main ()
13497{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ;
13500 return 0;
13501}
13502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504 ac_cv_header_time_altzone=yes
13505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510fi
13511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13513$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517
13518fi
13519
Guido van Rossumda88dad1995-01-26 00:46:29 +000013520was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13522$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013524/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013525
13526#include <sys/types.h>
13527#include <sys/select.h>
13528#include <sys/time.h>
13529
Martin v. Löwis11437992002-04-12 09:54:03 +000013530int
13531main ()
13532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533;
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013543 was_it_defined=yes
13544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13548$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13551$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013552if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013556/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013557#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013558int
13559main ()
13560{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013561struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013567 ac_cv_struct_addrinfo=yes
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13572fi
13573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13575$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013576if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579
13580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13583$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586else
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013588/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589
13590# include <sys/types.h>
13591# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 ;
13597 return 0;
13598}
13599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601 ac_cv_struct_sockaddr_storage=yes
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13606fi
13607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13609$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013610if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013613
13614fi
13615
Christian Heimesdffa3942016-09-05 23:54:41 +020013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13617$as_echo_n "checking for sockaddr_alg... " >&6; }
13618if ${ac_cv_struct_sockaddr_alg+:} false; then :
13619 $as_echo_n "(cached) " >&6
13620else
13621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622/* end confdefs.h. */
13623
13624# include <sys/types.h>
13625# include <sys/socket.h>
13626# include <linux/if_alg.h>
13627int
13628main ()
13629{
13630struct sockaddr_alg s
13631 ;
13632 return 0;
13633}
13634_ACEOF
13635if ac_fn_c_try_compile "$LINENO"; then :
13636 ac_cv_struct_sockaddr_alg=yes
13637else
13638 ac_cv_struct_sockaddr_alg=no
13639fi
13640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641fi
13642
13643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13644$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13645if test $ac_cv_struct_sockaddr_alg = yes; then
13646
13647$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13648
13649fi
13650
Guido van Rossum627b2d71993-12-24 10:39:16 +000013651# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13654$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013655if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013660$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013661int
13662main ()
13663{
13664static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013665test_array [0] = 0;
13666return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013667
13668 ;
13669 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013670}
Martin v. Löwis11437992002-04-12 09:54:03 +000013671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013672if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013673 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013674else
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13680$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013683
13684fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13687$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013699 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013701 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703 char const *const *pcpcc;
13704 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 /* NEC SVR4.0.2 mips cc rejects this. */
13706 struct point {int x, y;};
13707 static struct point const zero = {0,0};
13708 /* AIX XL C 1.02.0.0 rejects this.
13709 It does not let you subtract one const X* pointer from another in
13710 an arm of an if-expression whose if-part is not a constant
13711 expression */
13712 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715 ++pcpcc;
13716 ppc = (char**) pcpcc;
13717 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013718 { /* SCO 3.2v4 cc rejects this sort of thing. */
13719 char tx;
13720 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 }
13726 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13727 int x[] = {25, 17};
13728 const int *foo = &x[0];
13729 ++foo;
13730 }
13731 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13732 typedef const int *iptr;
13733 iptr p = 0;
13734 ++p;
13735 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013736 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013738 struct s { int j; const int *ap[3]; } bx;
13739 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 }
13741 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13742 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013746#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 ;
13749 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013750}
Martin v. Löwis11437992002-04-12 09:54:03 +000013751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013752if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013753 ac_cv_c_const=yes
13754else
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13760$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764
13765fi
13766
Michael W. Hudson54241132001-12-07 15:38:26 +000013767
Guido van Rossumda88dad1995-01-26 00:46:29 +000013768works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13770$as_echo_n "checking for working signed char... " >&6; }
13771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013772/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774int
13775main ()
13776{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777signed char c;
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 :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013783 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013784else
Skip Montanaro6dead952003-09-25 14:50:04 +000013785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013787
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013788
Guido van Rossum7f43da71994-08-01 12:15:30 +000013789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13792$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013793
Guido van Rossumda88dad1995-01-26 00:46:29 +000013794have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13796$as_echo_n "checking for prototypes... " >&6; }
13797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013798/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013799int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013800int
13801main ()
13802{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 ;
13805 return 0;
13806}
13807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013808if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
Matthias Kloseb159a552010-04-25 21:00:44 +000013812 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13816$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817
Guido van Rossumda88dad1995-01-26 00:46:29 +000013818works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13820$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013822/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013823
13824#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013825int foo(int x, ...) {
13826 va_list va;
13827 va_start(va, x);
13828 va_arg(va, int);
13829 va_arg(va, char *);
13830 va_arg(va, double);
13831 return 0;
13832}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833
Martin v. Löwis11437992002-04-12 09:54:03 +000013834int
13835main ()
13836{
Guido van Rossum90eea071996-08-30 20:58:57 +000013837return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ;
13839 return 0;
13840}
13841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013843
13844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013847 works=yes
13848
Guido van Rossum627b2d71993-12-24 10:39:16 +000013849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13852$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853
Martin v. Löwisd6320502004-08-12 13:45:08 +000013854# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13856$as_echo_n "checking for socketpair... " >&6; }
13857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013858/* end confdefs.h. */
13859
13860#include <sys/types.h>
13861#include <sys/socket.h>
13862
13863int
13864main ()
13865{
13866void *x=socketpair
13867 ;
13868 return 0;
13869}
13870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013874
Matthias Kloseb159a552010-04-25 21:00:44 +000013875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013876$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13879$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013880
13881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013883
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13886$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013888/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013889#include <sys/types.h>
13890#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013891int
13892main ()
13893{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013894struct sockaddr x;
13895x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;
13897 return 0;
13898}
13899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013900if ac_fn_c_try_compile "$LINENO"; then :
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13902$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013905
13906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13908$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013909
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013913# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
13915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013917if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13922$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013923 OLD_CFLAGS=$CFLAGS
13924 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013926/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013927
13928# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Martin v. Löwis11437992002-04-12 09:54:03 +000013930int
13931main ()
13932{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013933
13934 char *name;
13935 struct hostent *he, *res;
13936 char buffer[2048];
13937 int buflen = 2048;
13938 int h_errnop;
13939
13940 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
13942 ;
13943 return 0;
13944}
13945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013949
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13954$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956else
Skip Montanaro6dead952003-09-25 14:50:04 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13959$as_echo "no" >&6; }
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13961$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967int
13968main ()
13969{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013970
13971 char *name;
13972 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013973 char buffer[2048];
13974 int buflen = 2048;
13975 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976
Matthias Kloseb159a552010-04-25 21:00:44 +000013977 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
13979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Matthias Kloseb159a552010-04-25 21:00:44 +000013988$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13991$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993else
Skip Montanaro6dead952003-09-25 14:50:04 +000013994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13996$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13998$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14000/* end confdefs.h. */
14001
14002# include <netdb.h>
14003
14004int
14005main ()
14006{
14007
14008 char *name;
14009 struct hostent *he;
14010 struct hostent_data data;
14011
14012 (void) gethostbyname_r(name, he, &data);
14013
14014 ;
14015 return 0;
14016}
14017_ACEOF
14018if ac_fn_c_try_compile "$LINENO"; then :
14019
14020 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14021
14022
14023$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14024
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14026$as_echo "yes" >&6; }
14027
14028else
14029
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14031$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041 CFLAGS=$OLD_CFLAGS
14042
14043else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 for ac_func in gethostbyname
14046do :
14047 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014050#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014051_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014054done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055
Michael W. Hudson54241132001-12-07 15:38:26 +000014056
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057fi
14058
Michael W. Hudson54241132001-12-07 15:38:26 +000014059
14060
14061
14062
14063
14064
Guido van Rossum627b2d71993-12-24 10:39:16 +000014065# checks for system services
14066# (none yet)
14067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014069ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014070if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014071
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014072else
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14074$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014075if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014077else
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014079LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083/* Override any GCC internal prototype to avoid an error.
14084 Use char because int might match the return type of a GCC
14085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014086#ifdef __cplusplus
14087extern "C"
14088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014089char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014090int
14091main ()
14092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014093return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 ;
14095 return 0;
14096}
14097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100else
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014103rm -f core conftest.err conftest.$ac_objext \
14104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014105LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14108$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014109if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 cat >>confdefs.h <<_ACEOF
14111#define HAVE_LIBIEEE 1
14112_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014114 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014115
Guido van Rossum627b2d71993-12-24 10:39:16 +000014116fi
14117
Michael W. Hudson54241132001-12-07 15:38:26 +000014118
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014119fi
14120
Michael W. Hudson54241132001-12-07 15:38:26 +000014121
Guido van Rossum7f43da71994-08-01 12:15:30 +000014122# check for --with-libm=...
14123
Guido van Rossum563e7081996-09-10 18:20:48 +000014124case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014125Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014126*) LIBM=-lm
14127esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14129$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014134if test "$withval" = no
14135then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14137$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014138elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014139then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14141$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014142else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014143fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14146$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147fi
14148
Guido van Rossum7f43da71994-08-01 12:15:30 +000014149
14150# check for --with-libc=...
14151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14153$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014158if test "$withval" = no
14159then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14161$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014162elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014163then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14165$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014166else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014167fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14170$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171fi
14172
Guido van Rossum7f43da71994-08-01 12:15:30 +000014173
Stefan Krah1919b7e2012-03-21 18:25:23 +010014174# **************************************
14175# * Check for gcc x64 inline assembler *
14176# **************************************
14177
14178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14179$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181/* end confdefs.h. */
14182
14183int
14184main ()
14185{
14186
14187 __asm__ __volatile__ ("movq %rcx, %rax");
14188
14189 ;
14190 return 0;
14191}
14192_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014193if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014194 have_gcc_asm_for_x64=yes
14195else
14196 have_gcc_asm_for_x64=no
14197fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014198rm -f core conftest.err conftest.$ac_objext \
14199 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14201$as_echo "$have_gcc_asm_for_x64" >&6; }
14202if test "$have_gcc_asm_for_x64" = yes
14203then
14204
14205$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14206
14207fi
14208
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014209# **************************************************
14210# * Check for various properties of floating point *
14211# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014212
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14214$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14215if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014217else
14218
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014219
14220ax_cv_c_float_words_bigendian=unknown
14221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014222/* end confdefs.h. */
14223
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014224
14225double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14226
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014227
14228_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014229if ac_fn_c_try_compile "$LINENO"; then :
14230
14231
14232if grep noonsees conftest.$ac_objext >/dev/null ; then
14233 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014234fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014235if grep seesnoon conftest.$ac_objext >/dev/null ; then
14236 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14237 ax_cv_c_float_words_bigendian=no
14238 else
14239 ax_cv_c_float_words_bigendian=unknown
14240 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241fi
14242
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014243
14244fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014246fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14248$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014249
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014250case $ax_cv_c_float_words_bigendian in
14251 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014253$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14254 ;;
14255 no)
14256 ;;
14257 *)
14258 as_fn_error $? "
14259
14260Unknown float word ordering. You need to manually preset
14261ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14262
14263 " "$LINENO" 5 ;;
14264esac
14265
14266
14267if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268then
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014272elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014273then
14274
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014275$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14276
14277else
14278 # Some ARM platforms use a mixed-endian representation for doubles.
14279 # While Python doesn't currently have full support for these platforms
14280 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14281 # conversions work.
14282 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14283 # or little, then it must be this?
14284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014286
14287fi
14288
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014289# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014290# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014291# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014292# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014293# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014294# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014295
14296# This inline assembler syntax may also work for suncc and icc,
14297# so we try it on all platforms.
14298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14300$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014302/* end confdefs.h. */
14303
14304int
14305main ()
14306{
14307
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014308 unsigned short cw;
14309 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14310 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311
14312 ;
14313 return 0;
14314}
14315_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014316if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317 have_gcc_asm_for_x87=yes
14318else
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014321rm -f core conftest.err conftest.$ac_objext \
14322 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14324$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014325if test "$have_gcc_asm_for_x87" = yes
14326then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014329
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014330fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14333$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14335/* end confdefs.h. */
14336
14337int
14338main ()
14339{
14340
14341 unsigned int fpcr;
14342 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14343 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14344
14345 ;
14346 return 0;
14347}
14348_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014349if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014350 have_gcc_asm_for_mc68881=yes
14351else
14352 have_gcc_asm_for_mc68881=no
14353fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014354rm -f core conftest.err conftest.$ac_objext \
14355 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14357$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14358if test "$have_gcc_asm_for_mc68881" = yes
14359then
14360
14361$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14362
14363fi
14364
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014365# Detect whether system arithmetic is subject to x87-style double
14366# rounding issues. The result of this test has little meaning on non
14367# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14368# mode is round-to-nearest and double rounding issues are present, and
14369# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14371$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014372# $BASECFLAGS may affect the result
14373ac_save_cc="$CC"
14374CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014375if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376 ac_cv_x87_double_rounding=no
14377else
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379/* end confdefs.h. */
14380
14381#include <stdlib.h>
14382#include <math.h>
14383int main() {
14384 volatile double x, y, z;
14385 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14386 x = 0.99999999999999989; /* 1-2**-53 */
14387 y = 1./x;
14388 if (y != 1.)
14389 exit(0);
14390 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14391 x = 1e16;
14392 y = 2.99999;
14393 z = x + y;
14394 if (z != 1e16+4.)
14395 exit(0);
14396 /* both tests show evidence of double rounding */
14397 exit(1);
14398}
14399
14400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014401if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014402 ac_cv_x87_double_rounding=no
14403else
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014408fi
14409
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014410CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14412$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014413if test "$ac_cv_x87_double_rounding" = yes
14414then
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014417
14418fi
14419
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014420# ************************************
14421# * Check for mathematical functions *
14422# ************************************
14423
14424LIBS_SAVE=$LIBS
14425LIBS="$LIBS $LIBM"
14426
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014427for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14428do :
14429 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14430ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014431if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014432 cat >>confdefs.h <<_ACEOF
14433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14434_ACEOF
14435
14436fi
14437done
14438
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014439for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014440do :
14441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14442ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014443if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014444 cat >>confdefs.h <<_ACEOF
14445#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14446_ACEOF
14447
14448fi
14449done
14450
14451ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14452"
Victor Stinnere0be4232011-10-25 13:06:09 +020014453if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014454 ac_have_decl=1
14455else
14456 ac_have_decl=0
14457fi
14458
14459cat >>confdefs.h <<_ACEOF
14460#define HAVE_DECL_ISINF $ac_have_decl
14461_ACEOF
14462ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14463"
Victor Stinnere0be4232011-10-25 13:06:09 +020014464if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014465 ac_have_decl=1
14466else
14467 ac_have_decl=0
14468fi
14469
14470cat >>confdefs.h <<_ACEOF
14471#define HAVE_DECL_ISNAN $ac_have_decl
14472_ACEOF
14473ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14474"
Victor Stinnere0be4232011-10-25 13:06:09 +020014475if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014476 ac_have_decl=1
14477else
14478 ac_have_decl=0
14479fi
14480
14481cat >>confdefs.h <<_ACEOF
14482#define HAVE_DECL_ISFINITE $ac_have_decl
14483_ACEOF
14484
14485
Mark Dickinsona614f042009-11-28 12:48:43 +000014486# For multiprocessing module, check that sem_open
14487# actually works. For FreeBSD versions <= 7.2,
14488# the kernel module that provides POSIX semaphores
14489# isn't loaded by default, so an attempt to call
14490# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14492$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014495else
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014497 ac_cv_posix_semaphores_enabled=yes
14498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014500/* end confdefs.h. */
14501
14502#include <unistd.h>
14503#include <fcntl.h>
14504#include <stdio.h>
14505#include <semaphore.h>
14506#include <sys/stat.h>
14507
14508int main(void) {
14509 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14510 if (a == SEM_FAILED) {
14511 perror("sem_open");
14512 return 1;
14513 }
14514 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014515 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014516 return 0;
14517}
14518
14519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014521 ac_cv_posix_semaphores_enabled=yes
14522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014527fi
14528
14529
Mark Dickinsona614f042009-11-28 12:48:43 +000014530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14533$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014534if test $ac_cv_posix_semaphores_enabled = no
14535then
14536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014538
14539fi
14540
Mark Dickinson10683072009-04-18 21:18:19 +000014541# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14543$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014544if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014546else
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014548 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014549else
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014551/* end confdefs.h. */
14552
14553#include <unistd.h>
14554#include <fcntl.h>
14555#include <stdio.h>
14556#include <semaphore.h>
14557#include <sys/stat.h>
14558
14559int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014560 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014561 int count;
14562 int res;
14563 if(a==SEM_FAILED){
14564 perror("sem_open");
14565 return 1;
14566
14567 }
14568 res = sem_getvalue(a, &count);
14569 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014570 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014571 return res==-1 ? 1 : 0;
14572}
14573
Mark Dickinson10683072009-04-18 21:18:19 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014576 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014582fi
14583
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014584
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014585fi
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14588$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014589if test $ac_cv_broken_sem_getvalue = yes
14590then
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014593
14594fi
14595
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014596ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14597"
14598if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14599 ac_have_decl=1
14600else
14601 ac_have_decl=0
14602fi
14603
14604cat >>confdefs.h <<_ACEOF
14605#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14606_ACEOF
14607ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14608"
14609if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14610 ac_have_decl=1
14611else
14612 ac_have_decl=0
14613fi
14614
14615cat >>confdefs.h <<_ACEOF
14616#define HAVE_DECL_RTLD_NOW $ac_have_decl
14617_ACEOF
14618ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14619"
14620if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14621 ac_have_decl=1
14622else
14623 ac_have_decl=0
14624fi
14625
14626cat >>confdefs.h <<_ACEOF
14627#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14628_ACEOF
14629ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14630"
14631if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14632 ac_have_decl=1
14633else
14634 ac_have_decl=0
14635fi
14636
14637cat >>confdefs.h <<_ACEOF
14638#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14639_ACEOF
14640ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14641"
14642if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14643 ac_have_decl=1
14644else
14645 ac_have_decl=0
14646fi
14647
14648cat >>confdefs.h <<_ACEOF
14649#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14650_ACEOF
14651ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14652"
14653if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14654 ac_have_decl=1
14655else
14656 ac_have_decl=0
14657fi
14658
14659cat >>confdefs.h <<_ACEOF
14660#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14661_ACEOF
14662ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14663"
14664if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14665 ac_have_decl=1
14666else
14667 ac_have_decl=0
14668fi
14669
14670cat >>confdefs.h <<_ACEOF
14671#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14672_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014673ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14674"
14675if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14676 ac_have_decl=1
14677else
14678 ac_have_decl=0
14679fi
14680
14681cat >>confdefs.h <<_ACEOF
14682#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14683_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014684
14685
Mark Dickinsonbd792642009-03-18 20:06:12 +000014686# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14688$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014689# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014690if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014691 enableval=$enable_big_digits; case $enable_big_digits in
14692yes)
14693 enable_big_digits=30 ;;
14694no)
14695 enable_big_digits=15 ;;
1469615|30)
14697 ;;
14698*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014699 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 +000014700esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14702$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014703
14704cat >>confdefs.h <<_ACEOF
14705#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14706_ACEOF
14707
14708
14709else
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14711$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014712fi
14713
14714
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014716ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014717if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
14719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014722 wchar_h="yes"
14723
Guido van Rossumef2255b2000-03-10 22:30:29 +000014724else
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014726
14727fi
14728
Michael W. Hudson54241132001-12-07 15:38:26 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014731# determine wchar_t size
14732if test "$wchar_h" = yes
14733then
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14739$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014740if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014742else
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14744"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014745
Martin v. Löwis11437992002-04-12 09:54:03 +000014746else
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 if test "$ac_cv_type_wchar_t" = yes; then
14748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014750as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014751See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752 else
14753 ac_cv_sizeof_wchar_t=0
14754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014756
Martin v. Löwis11437992002-04-12 09:54:03 +000014757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14759$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760
14761
14762
Martin v. Löwis11437992002-04-12 09:54:03 +000014763cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014764#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014765_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014766
Michael W. Hudson54241132001-12-07 15:38:26 +000014767
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014768fi
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14771$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014772have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014775
14776#include <tcl.h>
14777#if TCL_UTF_MAX != 6
14778# error "NOT UCS4_TCL"
14779#endif
14780int
14781main ()
14782{
14783
14784 ;
14785 return 0;
14786}
14787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014789
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014792
14793 have_ucs4_tcl=yes
14794
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14798$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014799
Skip Montanaro6dead952003-09-25 14:50:04 +000014800# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014801if test "$wchar_h" = yes
14802then
14803 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14805$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014806 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014808else
14809
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014811 ac_cv_wchar_t_signed=yes
14812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014814/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014815
14816 #include <wchar.h>
14817 int main()
14818 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014819 /* Success: exit code 0 */
14820 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014821 }
14822
14823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014824if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014825 ac_cv_wchar_t_signed=yes
14826else
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014831fi
14832
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014833fi
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14836$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837fi
14838
Michael Osipov3738fad2018-08-24 18:17:19 +020014839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14840$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014841# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014842if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014843 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014844then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014847
Michael Osipov3738fad2018-08-24 18:17:19 +020014848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14849$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014850else
Michael Osipov3738fad2018-08-24 18:17:19 +020014851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14852$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014853fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014854
14855# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14857$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014858if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014860else
Matthias Kloseb9621712010-04-24 17:59:49 +000014861 ac_cv_c_bigendian=unknown
14862 # See if we're dealing with a universal compiler.
14863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864/* end confdefs.h. */
14865#ifndef __APPLE_CC__
14866 not a universal capable compiler
14867 #endif
14868 typedef int dummy;
14869
Skip Montanaro6dead952003-09-25 14:50:04 +000014870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014871if ac_fn_c_try_compile "$LINENO"; then :
14872
14873 # Check for potential -arch flags. It is not universal unless
14874 # there are at least two -arch flags with different values.
14875 ac_arch=
14876 ac_prev=
14877 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14878 if test -n "$ac_prev"; then
14879 case $ac_word in
14880 i?86 | x86_64 | ppc | ppc64)
14881 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14882 ac_arch=$ac_word
14883 else
14884 ac_cv_c_bigendian=universal
14885 break
14886 fi
14887 ;;
14888 esac
14889 ac_prev=
14890 elif test "x$ac_word" = "x-arch"; then
14891 ac_prev=arch
14892 fi
14893 done
14894fi
14895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14896 if test $ac_cv_c_bigendian = unknown; then
14897 # See if sys/param.h defines the BYTE_ORDER macro.
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014902
Martin v. Löwis11437992002-04-12 09:54:03 +000014903int
14904main ()
14905{
Matthias Kloseb9621712010-04-24 17:59:49 +000014906#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14907 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14908 && LITTLE_ENDIAN)
14909 bogus endian macros
14910 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014911
14912 ;
14913 return 0;
14914}
14915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014916if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014919/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923int
14924main ()
14925{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014926#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 not big endian
14928 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
14930 ;
14931 return 0;
14932}
14933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935 ac_cv_c_bigendian=yes
14936else
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014940fi
14941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14942 fi
14943 if test $ac_cv_c_bigendian = unknown; then
14944 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014946/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014947#include <limits.h>
14948
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Matthias Kloseb9621712010-04-24 17:59:49 +000014952#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14953 bogus endian macros
14954 #endif
14955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ;
14957 return 0;
14958}
14959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014960if ac_fn_c_try_compile "$LINENO"; then :
14961 # It does; now see whether it defined to _BIG_ENDIAN or not.
14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963/* end confdefs.h. */
14964#include <limits.h>
14965
14966int
14967main ()
14968{
14969#ifndef _BIG_ENDIAN
14970 not big endian
14971 #endif
14972
14973 ;
14974 return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014979else
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14983fi
14984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14985 fi
14986 if test $ac_cv_c_bigendian = unknown; then
14987 # Compile a test program.
14988 if test "$cross_compiling" = yes; then :
14989 # Try to guess by grepping values from an object file.
14990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14991/* end confdefs.h. */
14992short int ascii_mm[] =
14993 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14994 short int ascii_ii[] =
14995 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14996 int use_ascii (int i) {
14997 return ascii_mm[i] + ascii_ii[i];
14998 }
14999 short int ebcdic_ii[] =
15000 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15001 short int ebcdic_mm[] =
15002 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15003 int use_ebcdic (int i) {
15004 return ebcdic_mm[i] + ebcdic_ii[i];
15005 }
15006 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008int
15009main ()
15010{
15011return use_ascii (foo) == use_ebcdic (foo);
15012 ;
15013 return 0;
15014}
15015_ACEOF
15016if ac_fn_c_try_compile "$LINENO"; then :
15017 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15018 ac_cv_c_bigendian=yes
15019 fi
15020 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15021 if test "$ac_cv_c_bigendian" = unknown; then
15022 ac_cv_c_bigendian=no
15023 else
15024 # finding both strings is unlikely to happen, but who knows?
15025 ac_cv_c_bigendian=unknown
15026 fi
15027 fi
15028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015030else
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015032/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015034int
15035main ()
15036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 /* Are we little or big endian? From Harbison&Steele. */
15039 union
15040 {
15041 long int l;
15042 char c[sizeof (long int)];
15043 } u;
15044 u.l = 1;
15045 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046
15047 ;
15048 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049}
Martin v. Löwis11437992002-04-12 09:54:03 +000015050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015051if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052 ac_cv_c_bigendian=no
15053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15063$as_echo "$ac_cv_c_bigendian" >&6; }
15064 case $ac_cv_c_bigendian in #(
15065 yes)
15066 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15067;; #(
15068 no)
15069 ;; #(
15070 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015071
Matthias Kloseb9621712010-04-24 17:59:49 +000015072$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015073
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 ;; #(
15075 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015076 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015077 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079
Michael W. Hudson54241132001-12-07 15:38:26 +000015080
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015081# ABI version string for Python extension modules. This appears between the
15082# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15083# from the following attributes which affect the ABI of this Python build (in
15084# this order):
15085#
15086# * The Python implementation (always 'cpython-' for us)
15087# * The major and minor version numbers
15088# * --with-pydebug (adds a 'd')
15089# * --with-pymalloc (adds a 'm')
15090# * --with-wide-unicode (adds a 'u')
15091#
15092# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015093# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15094# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015095
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15097$as_echo_n "checking ABIFLAGS... " >&6; }
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15099$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15101$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015102SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15104$as_echo "$SOABI" >&6; }
15105
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015106
15107case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015108 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015109 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15110 *)
15111 EXT_SUFFIX=${SHLIB_SUFFIX};;
15112esac
15113
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15115$as_echo_n "checking LDVERSION... " >&6; }
15116LDVERSION='$(VERSION)$(ABIFLAGS)'
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15118$as_echo "$LDVERSION" >&6; }
15119
doko@python.org87421192013-01-26 11:39:31 +010015120
doko@ubuntu.com55532312016-06-14 08:55:19 +020015121if test x$PLATFORM_TRIPLET = x; then
15122 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15123else
15124 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15125fi
doko@python.org87421192013-01-26 11:39:31 +010015126
15127
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015128# Check whether right shifting a negative integer extends the sign bit
15129# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15131$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015132if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
Matthias Kloseb9621712010-04-24 17:59:49 +000015136if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015137 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015138else
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015140/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015141
15142int main()
15143{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015144 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015145}
15146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015148if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015149 ac_cv_rshift_extends_sign=yes
15150else
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015155fi
15156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157fi
15158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15160$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015161if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015162then
Martin v. Löwis11437992002-04-12 09:54:03 +000015163
Matthias Kloseb9621712010-04-24 17:59:49 +000015164$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015165
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015166fi
15167
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015168# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15170$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015171if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015173else
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015176/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015177#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015178int
15179main ()
15180{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015181
15182 FILE *f = fopen("/dev/null", "r");
15183 flockfile(f);
15184 getc_unlocked(f);
15185 funlockfile(f);
15186
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ;
15188 return 0;
15189}
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015192 ac_cv_have_getc_unlocked=yes
15193else
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 ac_cv_have_getc_unlocked=no
15195fi
15196rm -f core conftest.err conftest.$ac_objext \
15197 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15201$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015202if test "$ac_cv_have_getc_unlocked" = yes
15203then
Martin v. Löwis11437992002-04-12 09:54:03 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015206
15207fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015208
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015209# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015210# save the value of LIBS so we don't actually link Python with readline
15211LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015212
Gregory P. Smith18820942008-09-07 06:24:49 +000015213# On some systems we need to link readline to a termcap compatible
15214# library. NOTE: Keep the precedence of listed libraries synchronised
15215# with setup.py.
15216py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15218$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015219for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015220 if test -z "$py_libtermcap"; then
15221 READLINE_LIBS="-lreadline"
15222 else
15223 READLINE_LIBS="-lreadline -l$py_libtermcap"
15224 fi
15225 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015227/* end confdefs.h. */
15228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229/* Override any GCC internal prototype to avoid an error.
15230 Use char because int might match the return type of a GCC
15231 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015232#ifdef __cplusplus
15233extern "C"
15234#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015235char readline ();
15236int
15237main ()
15238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015240 ;
15241 return 0;
15242}
15243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015245 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247rm -f core conftest.err conftest.$ac_objext \
15248 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015249 if test $py_cv_lib_readline = yes; then
15250 break
15251 fi
15252done
15253# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15254#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015255if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15257$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015258else
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15260$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015263
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015264fi
15265
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015266# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015268/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015269#include <readline/readline.h>
15270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015271if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015272 have_readline=yes
15273else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015274 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015275
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015276fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015277rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015278if test $have_readline = yes
15279then
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015281/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015282#include <readline/readline.h>
15283
15284_ACEOF
15285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015289
15290fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015291rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015294/* end confdefs.h. */
15295#include <readline/readline.h>
15296
15297_ACEOF
15298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015302
15303fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015304rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015305
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015306fi
15307
Martin v. Löwis0daad592001-09-30 21:09:59 +000015308# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15310$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015311if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015315LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319/* Override any GCC internal prototype to avoid an error.
15320 Use char because int might match the return type of a GCC
15321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015322#ifdef __cplusplus
15323extern "C"
15324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015325char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015326int
15327main ()
15328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ;
15331 return 0;
15332}
15333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015335 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015336else
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015339rm -f core conftest.err conftest.$ac_objext \
15340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015341LIBS=$ac_check_lib_save_LIBS
15342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15344$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015345if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015348
Martin v. Löwis0daad592001-09-30 21:09:59 +000015349fi
15350
Michael W. Hudson54241132001-12-07 15:38:26 +000015351
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15354$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015355if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015357else
15358 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015359LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015361/* end confdefs.h. */
15362
15363/* Override any GCC internal prototype to avoid an error.
15364 Use char because int might match the return type of a GCC
15365 builtin and then its argument prototype would still apply. */
15366#ifdef __cplusplus
15367extern "C"
15368#endif
15369char rl_completion_display_matches_hook ();
15370int
15371main ()
15372{
15373return rl_completion_display_matches_hook ();
15374 ;
15375 return 0;
15376}
15377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015378if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015379 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15380else
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015383rm -f core conftest.err conftest.$ac_objext \
15384 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015385LIBS=$ac_check_lib_save_LIBS
15386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15388$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015389if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015392
15393fi
15394
15395
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015396# also in 4.0, but not in editline
15397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15398$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15399if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15400 $as_echo_n "(cached) " >&6
15401else
15402 ac_check_lib_save_LIBS=$LIBS
15403LIBS="-lreadline $READLINE_LIBS $LIBS"
15404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405/* end confdefs.h. */
15406
15407/* Override any GCC internal prototype to avoid an error.
15408 Use char because int might match the return type of a GCC
15409 builtin and then its argument prototype would still apply. */
15410#ifdef __cplusplus
15411extern "C"
15412#endif
15413char rl_resize_terminal ();
15414int
15415main ()
15416{
15417return rl_resize_terminal ();
15418 ;
15419 return 0;
15420}
15421_ACEOF
15422if ac_fn_c_try_link "$LINENO"; then :
15423 ac_cv_lib_readline_rl_resize_terminal=yes
15424else
15425 ac_cv_lib_readline_rl_resize_terminal=no
15426fi
15427rm -f core conftest.err conftest.$ac_objext \
15428 conftest$ac_exeext conftest.$ac_ext
15429LIBS=$ac_check_lib_save_LIBS
15430fi
15431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15432$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15433if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15434
15435$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15436
15437fi
15438
15439
Martin v. Löwis0daad592001-09-30 21:09:59 +000015440# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15442$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015443if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015445else
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015447LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451/* Override any GCC internal prototype to avoid an error.
15452 Use char because int might match the return type of a GCC
15453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015454#ifdef __cplusplus
15455extern "C"
15456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015457char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015458int
15459main ()
15460{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 ;
15463 return 0;
15464}
15465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015466if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015468else
Matthias Kloseb9621712010-04-24 17:59:49 +000015469 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015471rm -f core conftest.err conftest.$ac_objext \
15472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015473LIBS=$ac_check_lib_save_LIBS
15474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15476$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015477if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015480
Guido van Rossum353ae582001-07-10 16:45:32 +000015481fi
15482
Jack Jansendd19cf82001-12-06 22:36:17 +000015483
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015484# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015486/* end confdefs.h. */
15487#include <readline/readline.h>
15488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015490 have_readline=yes
15491else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015492 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015493
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015494fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015495rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015496if test $have_readline = yes
15497then
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015499/* end confdefs.h. */
15500#include <readline/readline.h>
15501
15502_ACEOF
15503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015507
15508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015509rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015510
15511fi
15512
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15514$as_echo_n "checking for append_history in -lreadline... " >&6; }
15515if ${ac_cv_lib_readline_append_history+:} false; then :
15516 $as_echo_n "(cached) " >&6
15517else
15518 ac_check_lib_save_LIBS=$LIBS
15519LIBS="-lreadline $READLINE_LIBS $LIBS"
15520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15521/* end confdefs.h. */
15522
15523/* Override any GCC internal prototype to avoid an error.
15524 Use char because int might match the return type of a GCC
15525 builtin and then its argument prototype would still apply. */
15526#ifdef __cplusplus
15527extern "C"
15528#endif
15529char append_history ();
15530int
15531main ()
15532{
15533return append_history ();
15534 ;
15535 return 0;
15536}
15537_ACEOF
15538if ac_fn_c_try_link "$LINENO"; then :
15539 ac_cv_lib_readline_append_history=yes
15540else
15541 ac_cv_lib_readline_append_history=no
15542fi
15543rm -f core conftest.err conftest.$ac_objext \
15544 conftest$ac_exeext conftest.$ac_ext
15545LIBS=$ac_check_lib_save_LIBS
15546fi
15547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15548$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15549if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15550
15551$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15552
15553fi
15554
15555
Martin v. Löwis82bca632006-02-10 20:49:30 +000015556# End of readline checks: restore LIBS
15557LIBS=$LIBS_no_readline
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15560$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015561if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015563else
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015566 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015569/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015570
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015571#include <stdlib.h>
15572#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015573int main()
15574{
15575 int val1 = nice(1);
15576 if (val1 != -1 && val1 == nice(2))
15577 exit(0);
15578 exit(1);
15579}
15580
Martin v. Löwis11437992002-04-12 09:54:03 +000015581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015582if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015583 ac_cv_broken_nice=yes
15584else
Matthias Kloseb9621712010-04-24 17:59:49 +000015585 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015589fi
15590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591fi
15592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15594$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015595if test "$ac_cv_broken_nice" = yes
15596then
Martin v. Löwis11437992002-04-12 09:54:03 +000015597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015599
15600fi
15601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15603$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015604if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608 ac_cv_broken_poll=no
15609else
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015611/* end confdefs.h. */
15612
15613#include <poll.h>
15614
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015615int main()
15616{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015617 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015618 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015619
15620 close (42);
15621
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015622 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015623 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015624 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015625 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015626 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015627 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015628 return 1;
15629}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015630
15631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015632if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015633 ac_cv_broken_poll=yes
15634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015641fi
15642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15644$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015645if test "$ac_cv_broken_poll" = yes
15646then
15647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015649
15650fi
15651
Martin v. Löwis1d459062005-03-14 21:23:33 +000015652# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15654$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015655if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015657else
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015660 ac_cv_working_tzset=no
15661else
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015663/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015664
15665#include <stdlib.h>
15666#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015667#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015668
15669#if HAVE_TZNAME
15670extern char *tzname[];
15671#endif
15672
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015673int main()
15674{
Brett Cannon18367812003-09-19 00:59:16 +000015675 /* Note that we need to ensure that not only does tzset(3)
15676 do 'something' with localtime, but it works as documented
15677 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015678 This includes making sure that tzname is set properly if
15679 tm->tm_zone does not exist since it is the alternative way
15680 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015681
15682 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015683 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015684 */
15685
Martin v. Löwis1d459062005-03-14 21:23:33 +000015686 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015687 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15688
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015689 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015690 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015691 if (localtime(&groundhogday)->tm_hour != 0)
15692 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015693#if HAVE_TZNAME
15694 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15695 if (strcmp(tzname[0], "UTC") ||
15696 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15697 exit(1);
15698#endif
Brett Cannon18367812003-09-19 00:59:16 +000015699
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015700 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015701 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015702 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015703 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015704#if HAVE_TZNAME
15705 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15706 exit(1);
15707#endif
Brett Cannon18367812003-09-19 00:59:16 +000015708
15709 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15710 tzset();
15711 if (localtime(&groundhogday)->tm_hour != 11)
15712 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015713#if HAVE_TZNAME
15714 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15715 exit(1);
15716#endif
15717
15718#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015719 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15720 exit(1);
15721 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15722 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015723#endif
Brett Cannon18367812003-09-19 00:59:16 +000015724
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725 exit(0);
15726}
15727
15728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015729if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730 ac_cv_working_tzset=yes
15731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015736fi
15737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738fi
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15741$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015742if test "$ac_cv_working_tzset" = yes
15743then
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015746
15747fi
15748
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015749# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15751$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015752if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015754else
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015756/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015757#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015758int
15759main ()
15760{
15761
15762struct stat st;
15763st.st_mtim.tv_nsec = 1;
15764
15765 ;
15766 return 0;
15767}
15768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015769if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015770 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15775fi
15776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15778$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015779if test "$ac_cv_stat_tv_nsec" = yes
15780then
15781
Matthias Kloseb9621712010-04-24 17:59:49 +000015782$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015783
15784fi
15785
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015786# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15788$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015789if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015793/* end confdefs.h. */
15794#include <sys/stat.h>
15795int
15796main ()
15797{
15798
15799struct stat st;
15800st.st_mtimespec.tv_nsec = 1;
15801
15802 ;
15803 return 0;
15804}
15805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015807 ac_cv_stat_tv_nsec2=yes
15808else
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15812fi
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15815$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015816if test "$ac_cv_stat_tv_nsec2" = yes
15817then
15818
Matthias Kloseb9621712010-04-24 17:59:49 +000015819$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015820
15821fi
15822
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015823# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015824ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015825if test "$cross_compiling" = no; then
15826 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15827fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015828
15829for ac_header in curses.h ncurses.h
15830do :
15831 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15832ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15833if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15834 cat >>confdefs.h <<_ACEOF
15835#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15836_ACEOF
15837
15838fi
15839
15840done
15841
15842
15843# On Solaris, term.h requires curses.h
15844for ac_header in term.h
15845do :
15846 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15847#ifdef HAVE_CURSES_H
15848#include <curses.h>
15849#endif
15850
15851"
15852if test "x$ac_cv_header_term_h" = xyes; then :
15853 cat >>confdefs.h <<_ACEOF
15854#define HAVE_TERM_H 1
15855_ACEOF
15856
15857fi
15858
15859done
15860
15861
Jack Jansen666b1e72001-10-31 12:11:48 +000015862# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15864$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015865if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015869/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015870#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015871int
15872main ()
15873{
Jack Jansen666b1e72001-10-31 12:11:48 +000015874
15875 int rtn;
15876 rtn = mvwdelch(0,0,0);
15877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 ;
15879 return 0;
15880}
15881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015882if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015883 ac_cv_mvwdelch_is_expression=yes
15884else
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15888fi
15889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15891$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015892
15893if test "$ac_cv_mvwdelch_is_expression" = yes
15894then
Martin v. Löwis11437992002-04-12 09:54:03 +000015895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015897
15898fi
15899
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015900# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15901# structs since version 5.7. If the macro is defined as zero before including
15902# [n]curses.h, ncurses will expose fields of the structs regardless of the
15903# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15905$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015906if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015907 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015908else
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015911
15912 #define NCURSES_OPAQUE 0
15913 #include <curses.h>
15914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915int
15916main ()
15917{
Jack Jansen666b1e72001-10-31 12:11:48 +000015918
15919 WINDOW *w;
15920 w->_flags = 0;
15921
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 ;
15923 return 0;
15924}
15925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015926if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015927 ac_cv_window_has_flags=yes
15928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15932fi
15933
Matthias Kloseb9621712010-04-24 17:59:49 +000015934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15935$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015936
Jack Jansen666b1e72001-10-31 12:11:48 +000015937
15938if test "$ac_cv_window_has_flags" = yes
15939then
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015942
15943fi
15944
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15946$as_echo_n "checking for is_pad... " >&6; }
15947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15948/* end confdefs.h. */
15949#include <curses.h>
15950int
15951main ()
15952{
15953
15954#ifndef is_pad
15955void *x=is_pad
15956#endif
15957
15958 ;
15959 return 0;
15960}
15961_ACEOF
15962if ac_fn_c_try_compile "$LINENO"; then :
15963
15964$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15965
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15967$as_echo "yes" >&6; }
15968else
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15970$as_echo "no" >&6; }
15971
15972fi
15973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15976$as_echo_n "checking for is_term_resized... " >&6; }
15977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015978/* end confdefs.h. */
15979#include <curses.h>
15980int
15981main ()
15982{
15983void *x=is_term_resized
15984 ;
15985 return 0;
15986}
15987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015989
Matthias Kloseb9621712010-04-24 17:59:49 +000015990$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015991
Matthias Kloseb159a552010-04-25 21:00:44 +000015992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994else
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15996$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015997
15998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16002$as_echo_n "checking for resize_term... " >&6; }
16003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016004/* end confdefs.h. */
16005#include <curses.h>
16006int
16007main ()
16008{
16009void *x=resize_term
16010 ;
16011 return 0;
16012}
16013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016014if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016017
Matthias Kloseb159a552010-04-25 21:00:44 +000016018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016019$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020else
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16022$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016023
16024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16028$as_echo_n "checking for resizeterm... " >&6; }
16029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016030/* end confdefs.h. */
16031#include <curses.h>
16032int
16033main ()
16034{
16035void *x=resizeterm
16036 ;
16037 return 0;
16038}
16039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016040if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016043
Matthias Kloseb159a552010-04-25 21:00:44 +000016044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016045$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016046else
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16048$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016049
16050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016052
16053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16054$as_echo_n "checking for immedok... " >&6; }
16055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16056/* end confdefs.h. */
16057#include <curses.h>
16058int
16059main ()
16060{
16061
16062#ifndef immedok
16063void *x=immedok
16064#endif
16065
16066 ;
16067 return 0;
16068}
16069_ACEOF
16070if ac_fn_c_try_compile "$LINENO"; then :
16071
16072$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16073
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16075$as_echo "yes" >&6; }
16076else
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
16079
16080fi
16081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16082
16083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16084$as_echo_n "checking for syncok... " >&6; }
16085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086/* end confdefs.h. */
16087#include <curses.h>
16088int
16089main ()
16090{
16091
16092#ifndef syncok
16093void *x=syncok
16094#endif
16095
16096 ;
16097 return 0;
16098}
16099_ACEOF
16100if ac_fn_c_try_compile "$LINENO"; then :
16101
16102$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16103
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16105$as_echo "yes" >&6; }
16106else
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108$as_echo "no" >&6; }
16109
16110fi
16111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16112
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16114$as_echo_n "checking for wchgat... " >&6; }
16115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16116/* end confdefs.h. */
16117#include <curses.h>
16118int
16119main ()
16120{
16121
16122#ifndef wchgat
16123void *x=wchgat
16124#endif
16125
16126 ;
16127 return 0;
16128}
16129_ACEOF
16130if ac_fn_c_try_compile "$LINENO"; then :
16131
16132$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16133
16134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16135$as_echo "yes" >&6; }
16136else
16137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16138$as_echo "no" >&6; }
16139
16140fi
16141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16142
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16144$as_echo_n "checking for filter... " >&6; }
16145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16146/* end confdefs.h. */
16147#include <curses.h>
16148int
16149main ()
16150{
16151
16152#ifndef filter
16153void *x=filter
16154#endif
16155
16156 ;
16157 return 0;
16158}
16159_ACEOF
16160if ac_fn_c_try_compile "$LINENO"; then :
16161
16162$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16163
16164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16165$as_echo "yes" >&6; }
16166else
16167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16168$as_echo "no" >&6; }
16169
16170fi
16171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16172
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16174$as_echo_n "checking for has_key... " >&6; }
16175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176/* end confdefs.h. */
16177#include <curses.h>
16178int
16179main ()
16180{
16181
16182#ifndef has_key
16183void *x=has_key
16184#endif
16185
16186 ;
16187 return 0;
16188}
16189_ACEOF
16190if ac_fn_c_try_compile "$LINENO"; then :
16191
16192$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16193
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16195$as_echo "yes" >&6; }
16196else
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16198$as_echo "no" >&6; }
16199
16200fi
16201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16202
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16204$as_echo_n "checking for typeahead... " >&6; }
16205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16206/* end confdefs.h. */
16207#include <curses.h>
16208int
16209main ()
16210{
16211
16212#ifndef typeahead
16213void *x=typeahead
16214#endif
16215
16216 ;
16217 return 0;
16218}
16219_ACEOF
16220if ac_fn_c_try_compile "$LINENO"; then :
16221
16222$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16223
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16225$as_echo "yes" >&6; }
16226else
16227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16228$as_echo "no" >&6; }
16229
16230fi
16231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16232
16233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16234$as_echo_n "checking for use_env... " >&6; }
16235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237#include <curses.h>
16238int
16239main ()
16240{
16241
16242#ifndef use_env
16243void *x=use_env
16244#endif
16245
16246 ;
16247 return 0;
16248}
16249_ACEOF
16250if ac_fn_c_try_compile "$LINENO"; then :
16251
16252$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16253
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16255$as_echo "yes" >&6; }
16256else
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258$as_echo "no" >&6; }
16259
16260fi
16261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016262# last curses configure check
16263CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16266$as_echo "$as_me: checking for device files" >&6;}
16267
16268if test "x$cross_compiling" = xyes; then
16269 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16271$as_echo_n "checking for /dev/ptmx... " >&6; }
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16273$as_echo "not set" >&6; }
16274 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16275 fi
16276 if test "${ac_cv_file__dev_ptc+set}" != set; then
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16278$as_echo_n "checking for /dev/ptc... " >&6; }
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16280$as_echo "not set" >&6; }
16281 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16282 fi
16283fi
16284
Matthias Kloseb9621712010-04-24 17:59:49 +000016285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16286$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016287if ${ac_cv_file__dev_ptmx+:} false; then :
16288 $as_echo_n "(cached) " >&6
16289else
16290 test "$cross_compiling" = yes &&
16291 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16292if test -r "/dev/ptmx"; then
16293 ac_cv_file__dev_ptmx=yes
16294else
16295 ac_cv_file__dev_ptmx=no
16296fi
16297fi
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16299$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16300if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016301
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016302fi
16303
16304if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016305
Matthias Kloseb9621712010-04-24 17:59:49 +000016306$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016307
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16310$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016311if ${ac_cv_file__dev_ptc+:} false; then :
16312 $as_echo_n "(cached) " >&6
16313else
16314 test "$cross_compiling" = yes &&
16315 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16316if test -r "/dev/ptc"; then
16317 ac_cv_file__dev_ptc=yes
16318else
16319 ac_cv_file__dev_ptc=no
16320fi
16321fi
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16323$as_echo "$ac_cv_file__dev_ptc" >&6; }
16324if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016325
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016326fi
16327
16328if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016329
Matthias Kloseb9621712010-04-24 17:59:49 +000016330$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016331
Neal Norwitz865400f2003-03-21 01:42:58 +000016332fi
16333
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016334if test $ac_sys_system = Darwin
16335then
16336 LIBS="$LIBS -framework CoreFoundation"
16337fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016338
Matthias Kloseb9621712010-04-24 17:59:49 +000016339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16340$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016341if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016342 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016343else
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016345 ac_cv_have_size_t_format="cross -- assuming yes"
16346
Thomas Wouters477c8d52006-05-27 19:21:47 +000016347else
Matthias Kloseb9621712010-04-24 17:59:49 +000016348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016349/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016350
Thomas Wouters477c8d52006-05-27 19:21:47 +000016351#include <stdio.h>
16352#include <stddef.h>
16353#include <string.h>
16354
Christian Heimes2c181612007-12-17 20:04:13 +000016355#ifdef HAVE_SYS_TYPES_H
16356#include <sys/types.h>
16357#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016358
16359#ifdef HAVE_SSIZE_T
16360typedef ssize_t Py_ssize_t;
16361#elif SIZEOF_VOID_P == SIZEOF_LONG
16362typedef long Py_ssize_t;
16363#else
16364typedef int Py_ssize_t;
16365#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016366
Christian Heimes2c181612007-12-17 20:04:13 +000016367int main()
16368{
16369 char buffer[256];
16370
Thomas Wouters477c8d52006-05-27 19:21:47 +000016371 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16372 return 1;
16373
Thomas Wouters89f507f2006-12-13 04:49:30 +000016374 if (strcmp(buffer, "123"))
16375 return 1;
16376
16377 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16378 return 1;
16379
16380 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016381 return 1;
16382
16383 return 0;
16384}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016385
Thomas Wouters477c8d52006-05-27 19:21:47 +000016386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016388 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016389else
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016394fi
16395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16398$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016399if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016402
16403fi
16404
Matthias Kloseb9621712010-04-24 17:59:49 +000016405ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016406#ifdef HAVE_SYS_TYPES_H
16407#include <sys/types.h>
16408#endif
16409#ifdef HAVE_SYS_SOCKET_H
16410#include <sys/socket.h>
16411#endif
16412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413"
Victor Stinnere0be4232011-10-25 13:06:09 +020016414if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016415
Martin v. Löwis11437992002-04-12 09:54:03 +000016416else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016419
16420fi
16421
Michael W. Hudson54241132001-12-07 15:38:26 +000016422
Matthias Kloseb9621712010-04-24 17:59:49 +000016423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16424$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016425if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016427else
Matthias Kloseb9621712010-04-24 17:59:49 +000016428 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016429 ac_cv_broken_mbstowcs=no
16430else
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016432/* end confdefs.h. */
16433
Stefan Krah19c21392012-11-22 23:47:32 +010016434#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016435#include<stdlib.h>
16436int main() {
16437 size_t len = -1;
16438 const char *str = "text";
16439 len = mbstowcs(NULL, str, 0);
16440 return (len != 4);
16441}
16442
16443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016444if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016445 ac_cv_broken_mbstowcs=no
16446else
Matthias Kloseb9621712010-04-24 17:59:49 +000016447 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016451fi
16452
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016453fi
16454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16456$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016457if test "$ac_cv_broken_mbstowcs" = yes
16458then
16459
Matthias Kloseb9621712010-04-24 17:59:49 +000016460$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016461
16462fi
16463
Antoine Pitroub52ec782009-01-25 16:34:23 +000016464# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16466$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016467
16468# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016469if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016470 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016471if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016472then
16473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016475
Matthias Kloseb9621712010-04-24 17:59:49 +000016476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16477$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016478fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016479if test "$withval" = no
16480then
16481
16482$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16485$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016486fi
16487
Antoine Pitrou042b1282010-08-13 21:15:58 +000016488else
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16490$as_echo "no value specified" >&6; }
16491fi
16492
Antoine Pitroub52ec782009-01-25 16:34:23 +000016493
Matthias Kloseb17289e2012-03-15 19:51:34 +010016494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16495$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16496if ${ac_cv_computed_gotos+:} false; then :
16497 $as_echo_n "(cached) " >&6
16498else
16499 if test "$cross_compiling" = yes; then :
16500 if test "${with_computed_gotos+set}" = set; then
16501 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16502 else
16503 ac_cv_computed_gotos=no
16504 fi
16505else
16506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16507/* end confdefs.h. */
16508
16509int main(int argc, char **argv)
16510{
16511 static void *targets[1] = { &&LABEL1 };
16512 goto LABEL2;
16513LABEL1:
16514 return 0;
16515LABEL2:
16516 goto *targets[0];
16517 return 1;
16518}
16519
16520_ACEOF
16521if ac_fn_c_try_run "$LINENO"; then :
16522 ac_cv_computed_gotos=yes
16523else
16524 ac_cv_computed_gotos=no
16525fi
16526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16527 conftest.$ac_objext conftest.beam conftest.$ac_ext
16528fi
16529
16530fi
16531
16532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16533$as_echo "$ac_cv_computed_gotos" >&6; }
16534case "$ac_cv_computed_gotos" in yes*)
16535
16536$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16537
16538esac
16539
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016540case $ac_sys_system in
16541AIX*)
16542
16543$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16544 ;;
16545esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016546
Michael W. Hudson54241132001-12-07 15:38:26 +000016547
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016548
16549
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016550for h in `(cd $srcdir;echo Python/thread_*.h)`
16551do
16552 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16553done
16554
Michael W. Hudson54241132001-12-07 15:38:26 +000016555
Victor Stinner21a74a92019-04-11 22:28:12 +020016556SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16558$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016559for dir in $SRCDIRS; do
16560 if test ! -d $dir; then
16561 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016562 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016563done
Matthias Kloseb9621712010-04-24 17:59:49 +000016564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16565$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016566
Stefan Krah1919b7e2012-03-21 18:25:23 +010016567# Availability of -O2:
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16569$as_echo_n "checking for -O2... " >&6; }
16570saved_cflags="$CFLAGS"
16571CFLAGS="-O2"
16572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574
16575int
16576main ()
16577{
16578
16579
16580 ;
16581 return 0;
16582}
16583_ACEOF
16584if ac_fn_c_try_compile "$LINENO"; then :
16585 have_O2=yes
16586else
16587 have_O2=no
16588fi
16589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16591$as_echo "$have_O2" >&6; }
16592CFLAGS="$saved_cflags"
16593
16594# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16595# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16597$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16598saved_cflags="$CFLAGS"
16599CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16600if test "$have_O2" = no; then
16601 CFLAGS=""
16602fi
16603if test "$cross_compiling" = yes; then :
16604 have_glibc_memmove_bug=undefined
16605else
16606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16607/* end confdefs.h. */
16608
16609#include <stdio.h>
16610#include <stdlib.h>
16611#include <string.h>
16612void foo(void *p, void *q) { memmove(p, q, 19); }
16613int main() {
16614 char a[32] = "123456789000000000";
16615 foo(&a[9], a);
16616 if (strcmp(a, "123456789123456789000000000") != 0)
16617 return 1;
16618 foo(a, &a[9]);
16619 if (strcmp(a, "123456789000000000") != 0)
16620 return 1;
16621 return 0;
16622}
16623
16624_ACEOF
16625if ac_fn_c_try_run "$LINENO"; then :
16626 have_glibc_memmove_bug=no
16627else
16628 have_glibc_memmove_bug=yes
16629fi
16630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16631 conftest.$ac_objext conftest.beam conftest.$ac_ext
16632fi
16633
16634CFLAGS="$saved_cflags"
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16636$as_echo "$have_glibc_memmove_bug" >&6; }
16637if test "$have_glibc_memmove_bug" = yes; then
16638
16639$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16640
16641fi
16642
16643if test "$have_gcc_asm_for_x87" = yes; then
16644 # Some versions of gcc miscompile inline asm:
16645 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16646 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16647 case $CC in
16648 *gcc*)
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16650$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16651 saved_cflags="$CFLAGS"
16652 CFLAGS="-O2"
16653 if test "$cross_compiling" = yes; then :
16654 have_ipa_pure_const_bug=undefined
16655else
16656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16657/* end confdefs.h. */
16658
16659 __attribute__((noinline)) int
16660 foo(int *p) {
16661 int r;
16662 asm ( "movl \$6, (%1)\n\t"
16663 "xorl %0, %0\n\t"
16664 : "=r" (r) : "r" (p) : "memory"
16665 );
16666 return r;
16667 }
16668 int main() {
16669 int p = 8;
16670 if ((foo(&p) ? : p) != 6)
16671 return 1;
16672 return 0;
16673 }
16674
16675_ACEOF
16676if ac_fn_c_try_run "$LINENO"; then :
16677 have_ipa_pure_const_bug=no
16678else
16679 have_ipa_pure_const_bug=yes
16680fi
16681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16682 conftest.$ac_objext conftest.beam conftest.$ac_ext
16683fi
16684
16685 CFLAGS="$saved_cflags"
16686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16687$as_echo "$have_ipa_pure_const_bug" >&6; }
16688 if test "$have_ipa_pure_const_bug" = yes; then
16689
16690$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16691
16692 fi
16693 ;;
16694 esac
16695fi
16696
Victor Stinner4f5366e2015-01-09 02:13:19 +010016697# Check for stdatomic.h
16698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16699$as_echo_n "checking for stdatomic.h... " >&6; }
16700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16701/* end confdefs.h. */
16702
16703
16704 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016705 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016706 int main() {
16707 int loaded_value = atomic_load(&value);
16708 return 0;
16709 }
16710
16711
16712_ACEOF
16713if ac_fn_c_try_link "$LINENO"; then :
16714 have_stdatomic_h=yes
16715else
16716 have_stdatomic_h=no
16717fi
16718rm -f core conftest.err conftest.$ac_objext \
16719 conftest$ac_exeext conftest.$ac_ext
16720
16721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16722$as_echo "$have_stdatomic_h" >&6; }
16723
16724if test "$have_stdatomic_h" = yes; then
16725
16726$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16727
16728fi
16729
16730# Check for GCC >= 4.7 __atomic builtins
16731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16732$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16734/* end confdefs.h. */
16735
16736
16737 volatile int val = 1;
16738 int main() {
16739 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16740 return 0;
16741 }
16742
16743
16744_ACEOF
16745if ac_fn_c_try_link "$LINENO"; then :
16746 have_builtin_atomic=yes
16747else
16748 have_builtin_atomic=no
16749fi
16750rm -f core conftest.err conftest.$ac_objext \
16751 conftest$ac_exeext conftest.$ac_ext
16752
16753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16754$as_echo "$have_builtin_atomic" >&6; }
16755
16756if test "$have_builtin_atomic" = yes; then
16757
16758$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16759
16760fi
16761
Ned Deily322f5ba2013-11-21 23:01:59 -080016762# ensurepip option
16763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16764$as_echo_n "checking for ensurepip... " >&6; }
16765
16766# Check whether --with-ensurepip was given.
16767if test "${with_ensurepip+set}" = set; then :
16768 withval=$with_ensurepip;
16769else
16770 with_ensurepip=upgrade
16771fi
16772
16773case $with_ensurepip in #(
16774 yes|upgrade) :
16775 ENSUREPIP=upgrade ;; #(
16776 install) :
16777 ENSUREPIP=install ;; #(
16778 no) :
16779 ENSUREPIP=no ;; #(
16780 *) :
16781 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16782esac
16783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16784$as_echo "$ENSUREPIP" >&6; }
16785
16786
Victor Stinner35a97c02015-03-08 02:59:09 +010016787# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16789$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16791/* end confdefs.h. */
16792
16793
16794 #include <dirent.h>
16795
16796 int main() {
16797 struct dirent entry;
16798 return entry.d_type == DT_UNKNOWN;
16799 }
16800
16801
16802_ACEOF
16803if ac_fn_c_try_link "$LINENO"; then :
16804 have_dirent_d_type=yes
16805else
16806 have_dirent_d_type=no
16807fi
16808rm -f core conftest.err conftest.$ac_objext \
16809 conftest$ac_exeext conftest.$ac_ext
16810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16811$as_echo "$have_dirent_d_type" >&6; }
16812
16813if test "$have_dirent_d_type" = yes; then
16814
16815$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16816
16817fi
16818
Victor Stinner9eb57c52015-03-19 22:21:49 +010016819# check if the Linux getrandom() syscall is available
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16821$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16823/* end confdefs.h. */
16824
16825
Victor Stinner1b80b242016-04-12 22:34:58 +020016826 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016827 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016828 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016829
16830 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016831 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016832 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016833 const int flags = GRND_NONBLOCK;
16834 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016835 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016836 return 0;
16837 }
16838
16839
16840_ACEOF
16841if ac_fn_c_try_link "$LINENO"; then :
16842 have_getrandom_syscall=yes
16843else
16844 have_getrandom_syscall=no
16845fi
16846rm -f core conftest.err conftest.$ac_objext \
16847 conftest$ac_exeext conftest.$ac_ext
16848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16849$as_echo "$have_getrandom_syscall" >&6; }
16850
16851if test "$have_getrandom_syscall" = yes; then
16852
16853$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16854
16855fi
16856
Victor Stinner3abf44e2015-09-18 15:38:37 +020016857# check if the getrandom() function is available
16858# the test was written for the Solaris function of <sys/random.h>
16859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16860$as_echo_n "checking for the getrandom() function... " >&6; }
16861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16862/* end confdefs.h. */
16863
16864
16865 #include <sys/random.h>
16866
16867 int main() {
16868 char buffer[1];
16869 const size_t buflen = sizeof(buffer);
16870 const int flags = 0;
16871 /* ignore the result, Python checks for ENOSYS at runtime */
16872 (void)getrandom(buffer, buflen, flags);
16873 return 0;
16874 }
16875
16876
16877_ACEOF
16878if ac_fn_c_try_link "$LINENO"; then :
16879 have_getrandom=yes
16880else
16881 have_getrandom=no
16882fi
16883rm -f core conftest.err conftest.$ac_objext \
16884 conftest$ac_exeext conftest.$ac_ext
16885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16886$as_echo "$have_getrandom" >&6; }
16887
16888if test "$have_getrandom" = yes; then
16889
16890$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16891
16892fi
16893
Neil Schemenauer5741c452019-02-08 10:48:46 -080016894# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16895# shm_* may only be available if linking against librt
16896save_LIBS="$LIBS"
16897save_includes_default="$ac_includes_default"
16898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16899$as_echo_n "checking for library containing shm_open... " >&6; }
16900if ${ac_cv_search_shm_open+:} false; then :
16901 $as_echo_n "(cached) " >&6
16902else
16903 ac_func_search_save_LIBS=$LIBS
16904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16905/* end confdefs.h. */
16906
16907/* Override any GCC internal prototype to avoid an error.
16908 Use char because int might match the return type of a GCC
16909 builtin and then its argument prototype would still apply. */
16910#ifdef __cplusplus
16911extern "C"
16912#endif
16913char shm_open ();
16914int
16915main ()
16916{
16917return shm_open ();
16918 ;
16919 return 0;
16920}
16921_ACEOF
16922for ac_lib in '' rt; do
16923 if test -z "$ac_lib"; then
16924 ac_res="none required"
16925 else
16926 ac_res=-l$ac_lib
16927 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16928 fi
16929 if ac_fn_c_try_link "$LINENO"; then :
16930 ac_cv_search_shm_open=$ac_res
16931fi
16932rm -f core conftest.err conftest.$ac_objext \
16933 conftest$ac_exeext
16934 if ${ac_cv_search_shm_open+:} false; then :
16935 break
16936fi
16937done
16938if ${ac_cv_search_shm_open+:} false; then :
16939
16940else
16941 ac_cv_search_shm_open=no
16942fi
16943rm conftest.$ac_ext
16944LIBS=$ac_func_search_save_LIBS
16945fi
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16947$as_echo "$ac_cv_search_shm_open" >&6; }
16948ac_res=$ac_cv_search_shm_open
16949if test "$ac_res" != no; then :
16950 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16951
16952fi
16953
16954if test "$ac_cv_search_shm_open" = "-lrt"; then
16955
16956$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16957
16958fi
16959for ac_header in sys/mman.h
16960do :
16961 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16962if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16963 cat >>confdefs.h <<_ACEOF
16964#define HAVE_SYS_MMAN_H 1
16965_ACEOF
16966
16967fi
16968
16969done
16970
16971# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16972ac_includes_default="\
16973${ac_includes_default}
16974#ifndef __cplusplus
16975# ifdef HAVE_SYS_MMAN_H
16976# include <sys/mman.h>
16977# endif
16978#endif
16979"
16980for ac_func in shm_open shm_unlink
16981do :
16982 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16983ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16984if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16985 cat >>confdefs.h <<_ACEOF
16986#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16987_ACEOF
16988
16989fi
16990done
16991
16992# we don't want to link with librt always, restore LIBS
16993LIBS="$save_LIBS"
16994ac_includes_default="$save_includes_default"
16995
Christian Heimesff5be6e2018-01-20 13:19:21 +010016996# Check for usable OpenSSL
16997
16998 found=false
16999
17000# Check whether --with-openssl was given.
17001if test "${with_openssl+set}" = set; then :
17002 withval=$with_openssl;
17003 case "$withval" in
17004 "" | y | ye | yes | n | no)
17005 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17006 ;;
17007 *) ssldirs="$withval"
17008 ;;
17009 esac
17010
17011else
17012
17013 # if pkg-config is installed and openssl has installed a .pc file,
17014 # then use that information and don't search ssldirs
17015 if test -n "$ac_tool_prefix"; then
17016 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17017set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17019$as_echo_n "checking for $ac_word... " >&6; }
17020if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17021 $as_echo_n "(cached) " >&6
17022else
17023 if test -n "$PKG_CONFIG"; then
17024 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17025else
17026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17027for as_dir in $PATH
17028do
17029 IFS=$as_save_IFS
17030 test -z "$as_dir" && as_dir=.
17031 for ac_exec_ext in '' $ac_executable_extensions; do
17032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17033 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17035 break 2
17036 fi
17037done
17038 done
17039IFS=$as_save_IFS
17040
17041fi
17042fi
17043PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17044if test -n "$PKG_CONFIG"; then
17045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17046$as_echo "$PKG_CONFIG" >&6; }
17047else
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17049$as_echo "no" >&6; }
17050fi
17051
17052
17053fi
17054if test -z "$ac_cv_prog_PKG_CONFIG"; then
17055 ac_ct_PKG_CONFIG=$PKG_CONFIG
17056 # Extract the first word of "pkg-config", so it can be a program name with args.
17057set dummy pkg-config; ac_word=$2
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17059$as_echo_n "checking for $ac_word... " >&6; }
17060if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17061 $as_echo_n "(cached) " >&6
17062else
17063 if test -n "$ac_ct_PKG_CONFIG"; then
17064 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17065else
17066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17067for as_dir in $PATH
17068do
17069 IFS=$as_save_IFS
17070 test -z "$as_dir" && as_dir=.
17071 for ac_exec_ext in '' $ac_executable_extensions; do
17072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17073 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17075 break 2
17076 fi
17077done
17078 done
17079IFS=$as_save_IFS
17080
17081fi
17082fi
17083ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17084if test -n "$ac_ct_PKG_CONFIG"; then
17085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17086$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17087else
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17089$as_echo "no" >&6; }
17090fi
17091
17092 if test "x$ac_ct_PKG_CONFIG" = x; then
17093 PKG_CONFIG=""
17094 else
17095 case $cross_compiling:$ac_tool_warned in
17096yes:)
17097{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17098$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17099ac_tool_warned=yes ;;
17100esac
17101 PKG_CONFIG=$ac_ct_PKG_CONFIG
17102 fi
17103else
17104 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17105fi
17106
17107 if test x"$PKG_CONFIG" != x""; then
17108 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17109 if test $? = 0; then
17110 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17111 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17112 found=true
17113 fi
17114 fi
17115
17116 # no such luck; use some default ssldirs
17117 if ! $found; then
17118 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17119 fi
17120
17121
17122fi
17123
17124
17125
17126 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17127 # an 'openssl' subdirectory
17128
17129 if ! $found; then
17130 OPENSSL_INCLUDES=
17131 for ssldir in $ssldirs; do
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17133$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17134 if test -f "$ssldir/include/openssl/ssl.h"; then
17135 OPENSSL_INCLUDES="-I$ssldir/include"
17136 OPENSSL_LDFLAGS="-L$ssldir/lib"
17137 OPENSSL_LIBS="-lssl -lcrypto"
17138 found=true
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17140$as_echo "yes" >&6; }
17141 break
17142 else
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17144$as_echo "no" >&6; }
17145 fi
17146 done
17147
17148 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17149 # it will just work!
17150 fi
17151
17152 # try the preprocessor and linker with our new flags,
17153 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17154
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17156$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17157 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17158 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17159
17160 save_LIBS="$LIBS"
17161 save_LDFLAGS="$LDFLAGS"
17162 save_CPPFLAGS="$CPPFLAGS"
17163 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17164 LIBS="$OPENSSL_LIBS $LIBS"
17165 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17167/* end confdefs.h. */
17168#include <openssl/ssl.h>
17169int
17170main ()
17171{
17172SSL_new(NULL)
17173 ;
17174 return 0;
17175}
17176_ACEOF
17177if ac_fn_c_try_link "$LINENO"; then :
17178
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17180$as_echo "yes" >&6; }
17181 have_openssl=yes
17182
17183else
17184
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17186$as_echo "no" >&6; }
17187 have_openssl=no
17188
17189fi
17190rm -f core conftest.err conftest.$ac_objext \
17191 conftest$ac_exeext conftest.$ac_ext
17192 CPPFLAGS="$save_CPPFLAGS"
17193 LDFLAGS="$save_LDFLAGS"
17194 LIBS="$save_LIBS"
17195
17196
17197
17198
17199
17200
17201if test "$have_openssl" = yes; then
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17203$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17204
17205 save_LIBS="$LIBS"
17206 save_LDFLAGS="$LDFLAGS"
17207 save_CPPFLAGS="$CPPFLAGS"
17208 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17209 LIBS="$OPENSSL_LIBS $LIBS"
17210 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17211
17212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17213/* end confdefs.h. */
17214
17215 #include <openssl/x509_vfy.h>
17216
17217int
17218main ()
17219{
17220
17221 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17222 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17223 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17224 X509_VERIFY_PARAM_set_hostflags(p, 0);
17225
17226 ;
17227 return 0;
17228}
17229
17230_ACEOF
17231if ac_fn_c_try_link "$LINENO"; then :
17232
17233 ac_cv_has_x509_verify_param_set1_host=yes
17234
17235else
17236
17237 ac_cv_has_x509_verify_param_set1_host=no
17238
17239fi
17240rm -f core conftest.err conftest.$ac_objext \
17241 conftest$ac_exeext conftest.$ac_ext
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17243$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17244 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17245
17246$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17247
17248 fi
17249
17250 CPPFLAGS="$save_CPPFLAGS"
17251 LDFLAGS="$save_LDFLAGS"
17252 LIBS="$save_LIBS"
17253fi
17254
Christian Heimes892d66e2018-01-29 14:10:18 +010017255# ssl module default cipher suite string
17256
17257
17258
17259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17260$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17261
17262# Check whether --with-ssl-default-suites was given.
17263if test "${with_ssl_default_suites+set}" = set; then :
17264 withval=$with_ssl_default_suites;
17265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17266$as_echo "$withval" >&6; }
17267case "$withval" in
17268 python)
17269 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17270
17271 ;;
17272 openssl)
17273 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17274
17275 ;;
17276 *)
17277 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17278
17279 cat >>confdefs.h <<_ACEOF
17280#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17281_ACEOF
17282
17283 ;;
17284esac
17285
17286else
17287
17288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17289$as_echo "python" >&6; }
17290$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17291
17292
17293fi
17294
17295
17296
Guido van Rossum627b2d71993-12-24 10:39:16 +000017297# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017298ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017299
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017300ac_config_files="$ac_config_files Modules/ld_so_aix"
17301
Martin v. Löwis11437992002-04-12 09:54:03 +000017302cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017303# This file is a shell script that caches the results of configure
17304# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017305# scripts and configure runs, see configure's option --config-cache.
17306# It is not useful on other systems. If it contains results you don't
17307# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017308#
Martin v. Löwis11437992002-04-12 09:54:03 +000017309# config.status only pays attention to the cache file if you give it
17310# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017311#
Skip Montanaro6dead952003-09-25 14:50:04 +000017312# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017313# loading this file, other *unset* `ac_cv_foo' will be assigned the
17314# following values.
17315
17316_ACEOF
17317
Guido van Rossumf78abae1997-01-21 22:02:36 +000017318# The following way of writing the cache mishandles newlines in values,
17319# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017321# Ultrix sh set writes to stderr and can't be redirected directly,
17322# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323(
17324 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17325 eval ac_val=\$$ac_var
17326 case $ac_val in #(
17327 *${as_nl}*)
17328 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017329 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17330$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 esac
17332 case $ac_var in #(
17333 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17335 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 esac ;;
17337 esac
17338 done
17339
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17342 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017343 # `set' does not quote correctly, so add quotes: double-quote
17344 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017346 "s/'/'\\\\''/g;
17347 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 *)
17350 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017352 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 esac |
17354 sort
17355) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017356 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017358 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17361 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17363 :end' >>confcache
17364if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17365 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017366 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17368$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017369 if test ! -f "$cache_file" || test -h "$cache_file"; then
17370 cat confcache >"$cache_file"
17371 else
17372 case $cache_file in #(
17373 */* | ?:*)
17374 mv -f confcache "$cache_file"$$ &&
17375 mv -f "$cache_file"$$ "$cache_file" ;; #(
17376 *)
17377 mv -f confcache "$cache_file" ;;
17378 esac
17379 fi
17380 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017381 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17383$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017384 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017385fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017386rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017388test "x$prefix" = xNONE && prefix=$ac_default_prefix
17389# Let make expand exec_prefix.
17390test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017391
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017392DEFS=-DHAVE_CONFIG_H
17393
Skip Montanaro6dead952003-09-25 14:50:04 +000017394ac_libobjs=
17395ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017396U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017397for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17398 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017400 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17402 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17404 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017405done
17406LIBOBJS=$ac_libobjs
17407
17408LTLIBOBJS=$ac_ltlibobjs
17409
17410
Martin v. Löwis11437992002-04-12 09:54:03 +000017411
Matthias Kloseb9621712010-04-24 17:59:49 +000017412
Victor Stinnere0be4232011-10-25 13:06:09 +020017413: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017414ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017415ac_clean_files_save=$ac_clean_files
17416ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017417{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17418$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17419as_write_fail=0
17420cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017421#! $SHELL
17422# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017423# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017424# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017425# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017426
Martin v. Löwis11437992002-04-12 09:54:03 +000017427debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017428ac_cs_recheck=false
17429ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017430
Matthias Kloseb9621712010-04-24 17:59:49 +000017431SHELL=\${CONFIG_SHELL-$SHELL}
17432export SHELL
17433_ASEOF
17434cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17435## -------------------- ##
17436## M4sh Initialization. ##
17437## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439# Be more Bourne compatible
17440DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017441if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 emulate sh
17443 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017445 # is contrary to our usage. Disable this feature.
17446 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017448else
Matthias Kloseb9621712010-04-24 17:59:49 +000017449 case `(set -o) 2>/dev/null` in #(
17450 *posix*) :
17451 set -o posix ;; #(
17452 *) :
17453 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017455fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017456
17457
Matthias Kloseb9621712010-04-24 17:59:49 +000017458as_nl='
17459'
17460export as_nl
17461# Printing a long string crashes Solaris 7 /usr/bin/printf.
17462as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17463as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17464as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17465# Prefer a ksh shell builtin over an external printf program on Solaris,
17466# but without wasting forks for bash or zsh.
17467if test -z "$BASH_VERSION$ZSH_VERSION" \
17468 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17469 as_echo='print -r --'
17470 as_echo_n='print -rn --'
17471elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17472 as_echo='printf %s\n'
17473 as_echo_n='printf %s'
17474else
17475 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17476 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17477 as_echo_n='/usr/ucb/echo -n'
17478 else
17479 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17480 as_echo_n_body='eval
17481 arg=$1;
17482 case $arg in #(
17483 *"$as_nl"*)
17484 expr "X$arg" : "X\\(.*\\)$as_nl";
17485 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17486 esac;
17487 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17488 '
17489 export as_echo_n_body
17490 as_echo_n='sh -c $as_echo_n_body as_echo'
17491 fi
17492 export as_echo_body
17493 as_echo='sh -c $as_echo_body as_echo'
17494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
17496# The user is always right.
17497if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017498 PATH_SEPARATOR=:
17499 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17500 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17501 PATH_SEPARATOR=';'
17502 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505
17506# IFS
17507# We need space, tab and new line, in precisely that order. Quoting is
17508# there to prevent editors from complaining about space-tab.
17509# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17510# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511IFS=" "" $as_nl"
17512
17513# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017514as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017515case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 *[\\/]* ) as_myself=$0 ;;
17517 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017518for as_dir in $PATH
17519do
17520 IFS=$as_save_IFS
17521 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017522 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17523 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526 ;;
17527esac
17528# We did not find ourselves, most probably we were run as `sh COMMAND'
17529# in which case we are not to be found in the path.
17530if test "x$as_myself" = x; then
17531 as_myself=$0
17532fi
17533if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17535 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536fi
17537
Matthias Kloseb9621712010-04-24 17:59:49 +000017538# Unset variables that we do not need and which cause bugs (e.g. in
17539# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17540# suppresses any "Segmentation fault" message there. '((' could
17541# trigger a bug in pdksh 5.2.14.
17542for as_var in BASH_ENV ENV MAIL MAILPATH
17543do eval test x\${$as_var+set} = xset \
17544 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545done
17546PS1='$ '
17547PS2='> '
17548PS4='+ '
17549
17550# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017551LC_ALL=C
17552export LC_ALL
17553LANGUAGE=C
17554export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555
Matthias Kloseb9621712010-04-24 17:59:49 +000017556# CDPATH.
17557(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17558
17559
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017560# as_fn_error STATUS ERROR [LINENO LOG_FD]
17561# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017562# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17563# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017564# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017565as_fn_error ()
17566{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017567 as_status=$1; test $as_status -eq 0 && as_status=1
17568 if test "$4"; then
17569 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17570 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017571 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017572 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017573 as_fn_exit $as_status
17574} # as_fn_error
17575
17576
17577# as_fn_set_status STATUS
17578# -----------------------
17579# Set $? to STATUS, without forking.
17580as_fn_set_status ()
17581{
17582 return $1
17583} # as_fn_set_status
17584
17585# as_fn_exit STATUS
17586# -----------------
17587# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17588as_fn_exit ()
17589{
17590 set +e
17591 as_fn_set_status $1
17592 exit $1
17593} # as_fn_exit
17594
17595# as_fn_unset VAR
17596# ---------------
17597# Portably unset VAR.
17598as_fn_unset ()
17599{
17600 { eval $1=; unset $1;}
17601}
17602as_unset=as_fn_unset
17603# as_fn_append VAR VALUE
17604# ----------------------
17605# Append the text in VALUE to the end of the definition contained in VAR. Take
17606# advantage of any shell optimizations that allow amortized linear growth over
17607# repeated appends, instead of the typical quadratic growth present in naive
17608# implementations.
17609if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17610 eval 'as_fn_append ()
17611 {
17612 eval $1+=\$2
17613 }'
17614else
17615 as_fn_append ()
17616 {
17617 eval $1=\$$1\$2
17618 }
17619fi # as_fn_append
17620
17621# as_fn_arith ARG...
17622# ------------------
17623# Perform arithmetic evaluation on the ARGs, and store the result in the
17624# global $as_val. Take advantage of shells that can avoid forks. The arguments
17625# must be portable across $(()) and expr.
17626if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17627 eval 'as_fn_arith ()
17628 {
17629 as_val=$(( $* ))
17630 }'
17631else
17632 as_fn_arith ()
17633 {
17634 as_val=`expr "$@" || test $? -eq 1`
17635 }
17636fi # as_fn_arith
17637
17638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639if expr a : '\(a\)' >/dev/null 2>&1 &&
17640 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17641 as_expr=expr
17642else
17643 as_expr=false
17644fi
17645
17646if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17647 as_basename=basename
17648else
17649 as_basename=false
17650fi
17651
Matthias Kloseb9621712010-04-24 17:59:49 +000017652if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17653 as_dirname=dirname
17654else
17655 as_dirname=false
17656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658as_me=`$as_basename -- "$0" ||
17659$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17660 X"$0" : 'X\(//\)$' \| \
17661 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017662$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663 sed '/^.*\/\([^/][^/]*\)\/*$/{
17664 s//\1/
17665 q
17666 }
17667 /^X\/\(\/\/\)$/{
17668 s//\1/
17669 q
17670 }
17671 /^X\/\(\/\).*/{
17672 s//\1/
17673 q
17674 }
17675 s/.*/./; q'`
17676
Matthias Kloseb9621712010-04-24 17:59:49 +000017677# Avoid depending upon Character Ranges.
17678as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17679as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17680as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17681as_cr_digits='0123456789'
17682as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683
17684ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017685case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017687 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017689 xy) ECHO_C='\c';;
17690 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17691 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 esac;;
17693*)
17694 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698if test -d conf$$.dir; then
17699 rm -f conf$$.dir/conf$$.file
17700else
17701 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017704if (echo >conf$$.file) 2>/dev/null; then
17705 if ln -s conf$$.file conf$$ 2>/dev/null; then
17706 as_ln_s='ln -s'
17707 # ... but there are two gotchas:
17708 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17709 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017710 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017712 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 elif ln conf$$.file conf$$ 2>/dev/null; then
17714 as_ln_s=ln
17715 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017716 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017718else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017719 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17722rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017723
Matthias Kloseb9621712010-04-24 17:59:49 +000017724
17725# as_fn_mkdir_p
17726# -------------
17727# Create "$as_dir" as a directory, including parents if necessary.
17728as_fn_mkdir_p ()
17729{
17730
17731 case $as_dir in #(
17732 -*) as_dir=./$as_dir;;
17733 esac
17734 test -d "$as_dir" || eval $as_mkdir_p || {
17735 as_dirs=
17736 while :; do
17737 case $as_dir in #(
17738 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17739 *) as_qdir=$as_dir;;
17740 esac
17741 as_dirs="'$as_qdir' $as_dirs"
17742 as_dir=`$as_dirname -- "$as_dir" ||
17743$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17744 X"$as_dir" : 'X\(//\)[^/]' \| \
17745 X"$as_dir" : 'X\(//\)$' \| \
17746 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17747$as_echo X"$as_dir" |
17748 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17749 s//\1/
17750 q
17751 }
17752 /^X\(\/\/\)[^/].*/{
17753 s//\1/
17754 q
17755 }
17756 /^X\(\/\/\)$/{
17757 s//\1/
17758 q
17759 }
17760 /^X\(\/\).*/{
17761 s//\1/
17762 q
17763 }
17764 s/.*/./; q'`
17765 test -d "$as_dir" && break
17766 done
17767 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017768 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017769
17770
17771} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017772if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017774else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017775 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017776 as_mkdir_p=false
17777fi
17778
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017779
17780# as_fn_executable_p FILE
17781# -----------------------
17782# Test if FILE is an executable regular file.
17783as_fn_executable_p ()
17784{
17785 test -f "$1" && test -x "$1"
17786} # as_fn_executable_p
17787as_test_x='test -x'
17788as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017789
17790# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017791as_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 +000017792
17793# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017794as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017795
17796
Martin v. Löwis11437992002-04-12 09:54:03 +000017797exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017798## ----------------------------------- ##
17799## Main body of $CONFIG_STATUS script. ##
17800## ----------------------------------- ##
17801_ASEOF
17802test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017803
Matthias Kloseb9621712010-04-24 17:59:49 +000017804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17805# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017806# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807# values after options handling.
17808ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017809This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017810generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
17812 CONFIG_FILES = $CONFIG_FILES
17813 CONFIG_HEADERS = $CONFIG_HEADERS
17814 CONFIG_LINKS = $CONFIG_LINKS
17815 CONFIG_COMMANDS = $CONFIG_COMMANDS
17816 $ $0 $@
17817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818on `(hostname || uname -n) 2>/dev/null | sed 1q`
17819"
17820
Martin v. Löwis11437992002-04-12 09:54:03 +000017821_ACEOF
17822
Matthias Kloseb9621712010-04-24 17:59:49 +000017823case $ac_config_files in *"
17824"*) set x $ac_config_files; shift; ac_config_files=$*;;
17825esac
17826
17827case $ac_config_headers in *"
17828"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17829esac
17830
17831
17832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017833# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017834config_files="$ac_config_files"
17835config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017838
Matthias Kloseb9621712010-04-24 17:59:49 +000017839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017840ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017841\`$as_me' instantiates files and other configuration actions
17842from templates according to the current configuration. Unless the files
17843and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017844
Matthias Kloseb9621712010-04-24 17:59:49 +000017845Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017846
17847 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017849 --config print configuration, then exit
17850 -q, --quiet, --silent
17851 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 -d, --debug don't remove temporary files
17853 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 --file=FILE[:TEMPLATE]
17855 instantiate the configuration file FILE
17856 --header=FILE[:TEMPLATE]
17857 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017858
17859Configuration files:
17860$config_files
17861
17862Configuration headers:
17863$config_headers
17864
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017865Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17869ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017870ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017871python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017872configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017873 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017874
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017875Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017876This config.status script is free software; the Free Software Foundation
17877gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878
17879ac_pwd='$ac_pwd'
17880srcdir='$srcdir'
17881INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017882MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017883test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017884_ACEOF
17885
Matthias Kloseb9621712010-04-24 17:59:49 +000017886cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17887# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017888ac_need_defaults=:
17889while test $# != 0
17890do
17891 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17894 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017895 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017897 --*=)
17898 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17899 ac_optarg=
17900 ac_shift=:
17901 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017903 ac_option=$1
17904 ac_optarg=$2
17905 ac_shift=shift
17906 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 esac
17908
Skip Montanaro6dead952003-09-25 14:50:04 +000017909 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017911 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17912 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017914 $as_echo "$ac_cs_version"; exit ;;
17915 --config | --confi | --conf | --con | --co | --c )
17916 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017918 debug=: ;;
17919 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017920 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017921 case $ac_optarg in
17922 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 esac
17925 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017926 ac_need_defaults=false;;
17927 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017928 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017929 case $ac_optarg in
17930 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17931 esac
17932 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934 --he | --h)
17935 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017936 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017937Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017939 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017940 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17941 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17942 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017943
17944 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017945 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017946Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
17951 esac
17952 shift
17953done
17954
Skip Montanaro6dead952003-09-25 14:50:04 +000017955ac_configure_extra_args=
17956
17957if $ac_cs_silent; then
17958 exec 6>/dev/null
17959 ac_configure_extra_args="$ac_configure_extra_args --silent"
17960fi
17961
17962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017964if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017965 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017966 shift
17967 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17968 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017970 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017971fi
17972
Martin v. Löwis11437992002-04-12 09:54:03 +000017973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017974cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975exec 5>>config.log
17976{
17977 echo
17978 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17979## Running $as_me. ##
17980_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017987
Matthias Kloseb9621712010-04-24 17:59:49 +000017988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989
17990# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017991for ac_config_target in $ac_config_targets
17992do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993 case $ac_config_target in
17994 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17995 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17996 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017997 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17998 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018000 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018001 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018002 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003
Victor Stinnere0be4232011-10-25 13:06:09 +020018004 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018005 esac
18006done
18007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008
Martin v. Löwis11437992002-04-12 09:54:03 +000018009# If the user did not use the arguments to specify the items to instantiate,
18010# then the envvar interface is used. Set only those that are not.
18011# We use the long form for the default assignment because of an extremely
18012# bizarre bug on SunOS 4.1.3.
18013if $ac_need_defaults; then
18014 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18015 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18016fi
18017
Skip Montanaro6dead952003-09-25 14:50:04 +000018018# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018020# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021# Hook for its removal unless debugging.
18022# Note that there is a small window in which the directory will not be cleaned:
18023# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018024$debug ||
18025{
Victor Stinnere0be4232011-10-25 13:06:09 +020018026 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018028 : "${ac_tmp:=$tmp}"
18029 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018031 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018032}
Martin v. Löwis11437992002-04-12 09:54:03 +000018033# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018034
Martin v. Löwis11437992002-04-12 09:54:03 +000018035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018037 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018038} ||
18039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040 tmp=./conf$$-$RANDOM
18041 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018042} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018043ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018044
Matthias Kloseb9621712010-04-24 17:59:49 +000018045# Set up the scripts for CONFIG_FILES section.
18046# No need to generate them if there are no CONFIG_FILES.
18047# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018049
Matthias Kloseb9621712010-04-24 17:59:49 +000018050
18051ac_cr=`echo X | tr X '\015'`
18052# On cygwin, bash can eat \r inside `` if the user requested igncr.
18053# But we know of no other shell where ac_cr would be empty at this
18054# point, so we can use a bashism as a fallback.
18055if test "x$ac_cr" = x; then
18056 eval ac_cr=\$\'\\r\'
18057fi
18058ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18059if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018060 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018061else
18062 ac_cs_awk_cr=$ac_cr
18063fi
18064
Victor Stinnere0be4232011-10-25 13:06:09 +020018065echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018066_ACEOF
18067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068
Matthias Kloseb9621712010-04-24 17:59:49 +000018069{
18070 echo "cat >conf$$subs.awk <<_ACEOF" &&
18071 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18072 echo "_ACEOF"
18073} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018074 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18075ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076ac_delim='%!_!# '
18077for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018078 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018079 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080
Matthias Kloseb9621712010-04-24 17:59:49 +000018081 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18082 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083 break
18084 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018085 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 else
18087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089done
Matthias Kloseb9621712010-04-24 17:59:49 +000018090rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091
Matthias Kloseb9621712010-04-24 17:59:49 +000018092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018093cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018095sed -n '
18096h
18097s/^/S["/; s/!.*/"]=/
18098p
18099g
18100s/^[^!]*!//
18101:repl
18102t repl
18103s/'"$ac_delim"'$//
18104t delim
18105:nl
18106h
18107s/\(.\{148\}\)..*/\1/
18108t more1
18109s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18110p
18111n
18112b repl
18113:more1
18114s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18115p
18116g
18117s/.\{148\}//
18118t nl
18119:delim
18120h
18121s/\(.\{148\}\)..*/\1/
18122t more2
18123s/["\\]/\\&/g; s/^/"/; s/$/"/
18124p
18125b
18126:more2
18127s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18128p
18129g
18130s/.\{148\}//
18131t delim
18132' <conf$$subs.awk | sed '
18133/^[^""]/{
18134 N
18135 s/\n//
18136}
18137' >>$CONFIG_STATUS || ac_write_fail=1
18138rm -f conf$$subs.awk
18139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18140_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018141cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018142 for (key in S) S_is_set[key] = 1
18143 FS = ""
18144
18145}
18146{
18147 line = $ 0
18148 nfields = split(line, field, "@")
18149 substed = 0
18150 len = length(field[1])
18151 for (i = 2; i < nfields; i++) {
18152 key = field[i]
18153 keylen = length(key)
18154 if (S_is_set[key]) {
18155 value = S[key]
18156 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18157 len += length(value) + length(field[++i])
18158 substed = 1
18159 } else
18160 len += 1 + keylen
18161 }
18162
18163 print line
18164}
18165
18166_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18169if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18170 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18171else
18172 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018173fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018174 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018175_ACEOF
18176
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18178# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179# trailing colons and then remove the whole line if VPATH becomes empty
18180# (actually we leave an empty line to preserve line numbers).
18181if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018182 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18183h
18184s///
18185s/^/:/
18186s/[ ]*$/:/
18187s/:\$(srcdir):/:/g
18188s/:\${srcdir}:/:/g
18189s/:@srcdir@:/:/g
18190s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018192x
18193s/\(=[ ]*\).*/\1/
18194G
18195s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196s/^[^=]*=[ ]*$//
18197}'
18198fi
18199
Matthias Kloseb9621712010-04-24 17:59:49 +000018200cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018201fi # test -n "$CONFIG_FILES"
18202
Matthias Kloseb9621712010-04-24 17:59:49 +000018203# Set up the scripts for CONFIG_HEADERS section.
18204# No need to generate them if there are no CONFIG_HEADERS.
18205# This happens for instance with `./config.status Makefile'.
18206if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018207cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018208BEGIN {
18209_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210
Matthias Kloseb9621712010-04-24 17:59:49 +000018211# Transform confdefs.h into an awk script `defines.awk', embedded as
18212# here-document in config.status, that substitutes the proper values into
18213# config.h.in to produce config.h.
18214
18215# Create a delimiter string that does not exist in confdefs.h, to ease
18216# handling of long lines.
18217ac_delim='%!_!# '
18218for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018219 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18220 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018221 break
18222 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018223 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018224 else
18225 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18226 fi
18227done
18228
18229# For the awk script, D is an array of macro values keyed by name,
18230# likewise P contains macro parameters if any. Preserve backslash
18231# newline sequences.
18232
18233ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18234sed -n '
18235s/.\{148\}/&'"$ac_delim"'/g
18236t rset
18237:rset
18238s/^[ ]*#[ ]*define[ ][ ]*/ /
18239t def
18240d
18241:def
18242s/\\$//
18243t bsnl
18244s/["\\]/\\&/g
18245s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18246D["\1"]=" \3"/p
18247s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18248d
18249:bsnl
18250s/["\\]/\\&/g
18251s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18252D["\1"]=" \3\\\\\\n"\\/p
18253t cont
18254s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18255t cont
18256d
18257:cont
18258n
18259s/.\{148\}/&'"$ac_delim"'/g
18260t clear
18261:clear
18262s/\\$//
18263t bsnlc
18264s/["\\]/\\&/g; s/^/"/; s/$/"/p
18265d
18266:bsnlc
18267s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18268b cont
18269' <confdefs.h | sed '
18270s/'"$ac_delim"'/"\\\
18271"/g' >>$CONFIG_STATUS || ac_write_fail=1
18272
18273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18274 for (key in D) D_is_set[key] = 1
18275 FS = ""
18276}
18277/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18278 line = \$ 0
18279 split(line, arg, " ")
18280 if (arg[1] == "#") {
18281 defundef = arg[2]
18282 mac1 = arg[3]
18283 } else {
18284 defundef = substr(arg[1], 2)
18285 mac1 = arg[2]
18286 }
18287 split(mac1, mac2, "(") #)
18288 macro = mac2[1]
18289 prefix = substr(line, 1, index(line, defundef) - 1)
18290 if (D_is_set[macro]) {
18291 # Preserve the white space surrounding the "#".
18292 print prefix "define", macro P[macro] D[macro]
18293 next
18294 } else {
18295 # Replace #undef with comments. This is necessary, for example,
18296 # in the case of _POSIX_SOURCE, which is predefined and required
18297 # on some systems where configure will not decide to define it.
18298 if (defundef == "undef") {
18299 print "/*", prefix defundef, macro, "*/"
18300 next
18301 }
18302 }
18303}
18304{ print }
18305_ACAWK
18306_ACEOF
18307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018308 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018309fi # test -n "$CONFIG_HEADERS"
18310
18311
18312eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18313shift
18314for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315do
18316 case $ac_tag in
18317 :[FHLC]) ac_mode=$ac_tag; continue;;
18318 esac
18319 case $ac_mode$ac_tag in
18320 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018321 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322 :[FH]-) ac_tag=-:-;;
18323 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18324 esac
18325 ac_save_IFS=$IFS
18326 IFS=:
18327 set x $ac_tag
18328 IFS=$ac_save_IFS
18329 shift
18330 ac_file=$1
18331 shift
18332
18333 case $ac_mode in
18334 :L) ac_source=$1;;
18335 :[FH])
18336 ac_file_inputs=
18337 for ac_f
18338 do
18339 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018340 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341 *) # Look for the file first in the build tree, then in the source tree
18342 # (if the path is not absolute). The absolute path cannot be DOS-style,
18343 # because $ac_f cannot contain `:'.
18344 test -f "$ac_f" ||
18345 case $ac_f in
18346 [\\/$]*) false;;
18347 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18348 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018349 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018350 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018351 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18352 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 done
18354
18355 # Let's still pretend it is `configure' which instantiates (i.e., don't
18356 # use $as_me), people would be surprised to read:
18357 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 configure_input='Generated from '`
18359 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18360 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361 if test x"$ac_file" != x-; then
18362 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018363 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18364$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018366 # Neutralize special characters interpreted by sed in replacement strings.
18367 case $configure_input in #(
18368 *\&* | *\|* | *\\* )
18369 ac_sed_conf_input=`$as_echo "$configure_input" |
18370 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18371 *) ac_sed_conf_input=$configure_input;;
18372 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018373
18374 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018375 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18376 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 esac
18378 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 esac
18380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018381 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018382$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018383 X"$ac_file" : 'X\(//\)[^/]' \| \
18384 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018386$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18388 s//\1/
18389 q
18390 }
18391 /^X\(\/\/\)[^/].*/{
18392 s//\1/
18393 q
18394 }
18395 /^X\(\/\/\)$/{
18396 s//\1/
18397 q
18398 }
18399 /^X\(\/\).*/{
18400 s//\1/
18401 q
18402 }
18403 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018404 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018405 ac_builddir=.
18406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407case "$ac_dir" in
18408.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18409*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018410 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018412 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413 case $ac_top_builddir_sub in
18414 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18415 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18416 esac ;;
18417esac
18418ac_abs_top_builddir=$ac_pwd
18419ac_abs_builddir=$ac_pwd$ac_dir_suffix
18420# for backward compatibility:
18421ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018422
18423case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426 ac_top_srcdir=$ac_top_builddir_sub
18427 ac_abs_top_srcdir=$ac_pwd ;;
18428 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 ac_top_srcdir=$srcdir
18431 ac_abs_top_srcdir=$srcdir ;;
18432 *) # Relative name.
18433 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18434 ac_top_srcdir=$ac_top_build_prefix$srcdir
18435 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018436esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018438
Martin v. Löwis11437992002-04-12 09:54:03 +000018439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 case $ac_mode in
18441 :F)
18442 #
18443 # CONFIG_FILE
18444 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018445
18446 case $INSTALL in
18447 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018450 ac_MKDIR_P=$MKDIR_P
18451 case $MKDIR_P in
18452 [\\/$]* | ?:[\\/]* ) ;;
18453 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18454 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018455_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456
Matthias Kloseb9621712010-04-24 17:59:49 +000018457cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458# If the template does not know about datarootdir, expand it.
18459# FIXME: This hack should be removed a few years after 2.60.
18460ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018461ac_sed_dataroot='
18462/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463 p
18464 q
18465}
18466/@datadir@/p
18467/@docdir@/p
18468/@infodir@/p
18469/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018470/@mandir@/p'
18471case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472*datarootdir*) ac_datarootdir_seen=yes;;
18473*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18475$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018477cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478 ac_datarootdir_hack='
18479 s&@datadir@&$datadir&g
18480 s&@docdir@&$docdir&g
18481 s&@infodir@&$infodir&g
18482 s&@localedir@&$localedir&g
18483 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018484 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485esac
18486_ACEOF
18487
18488# Neutralize VPATH when `$srcdir' = `.'.
18489# Shell code in configure.ac might set extrasub.
18490# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18492ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018493$extrasub
18494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018495cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018496:t
18497/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018498s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018500s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501s&@srcdir@&$ac_srcdir&;t t
18502s&@abs_srcdir@&$ac_abs_srcdir&;t t
18503s&@top_srcdir@&$ac_top_srcdir&;t t
18504s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18505s&@builddir@&$ac_builddir&;t t
18506s&@abs_builddir@&$ac_abs_builddir&;t t
18507s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18508s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018509s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018511"
Victor Stinnere0be4232011-10-25 13:06:09 +020018512eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18513 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018516 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18517 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18518 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018520which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018521$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018522which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018523
Victor Stinnere0be4232011-10-25 13:06:09 +020018524 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018526 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18527 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018528 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018529 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530 ;;
18531 :H)
18532 #
18533 # CONFIG_HEADER
18534 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018536 {
18537 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018538 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18539 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018540 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018541 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018542 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18543$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018544 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018545 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018546 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018547 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 fi
18549 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018550 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018551 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018552 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018553 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556
18557 esac
18558
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018559
18560 case $ac_file$ac_mode in
18561 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18562
18563 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564done # for ac_tag
18565
Guido van Rossum627b2d71993-12-24 10:39:16 +000018566
Matthias Kloseb9621712010-04-24 17:59:49 +000018567as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018568_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018569ac_clean_files=$ac_clean_files_save
18570
Matthias Kloseb9621712010-04-24 17:59:49 +000018571test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018572 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018573
Martin v. Löwis11437992002-04-12 09:54:03 +000018574
18575# configure is writing to config.log, and then calls config.status.
18576# config.status does its own redirection, appending to config.log.
18577# Unfortunately, on DOS this fails, as config.log is still kept open
18578# by configure, so config.status won't be able to write to it; its
18579# output is simply discarded. So we exec the FD to /dev/null,
18580# effectively closing config.log, so it can be properly (re)opened and
18581# appended to by config.status. When coming back to configure, we
18582# need to make the FD available again.
18583if test "$no_create" != yes; then
18584 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018585 ac_config_status_args=
18586 test "$silent" = yes &&
18587 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018589 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018590 exec 5>>config.log
18591 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18592 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018593 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018594fi
18595if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18597$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018598fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018599
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018600
Christian Heimes75ed8902013-11-20 01:11:18 +010018601echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018602if test ! -f Modules/Setup.local
18603then
18604 echo "# Edit this file for local setup changes" >Modules/Setup.local
18605fi
18606
Christian Heimes75ed8902013-11-20 01:11:18 +010018607echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018608$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018609 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018610 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018611mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018612
18613if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18614 echo "" >&6
18615 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018616 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 +000018617 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018618 echo "" >&6
18619 echo "" >&6
18620fi
18621