blob: 0b07f0b97bf1080d5152937d3e897236f726c5c4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_cxx_main
811with_suffix
812enable_shared
813enable_profiling
814with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200815with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000816enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700817with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100818with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100819with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_libs
821with_system_expat
822with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100823with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000824enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700825with_tcltk_includes
826with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000828enable_ipv6
829with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000831with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700833with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100839with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100840with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893includedir='${prefix}/include'
894oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 # If the previous option needs an argument, assign it.
910 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 ac_prev=
913 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918 *=) ac_optarg= ;;
919 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Accept the important Cygnus configure options, so we can diagnose typos.
923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_dashdash$ac_option in
925 --)
926 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -bindir | --bindir | --bindi | --bind | --bin | --bi)
929 ac_prev=bindir ;;
930 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
933 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 -cache-file | --cache-file | --cache-fil | --cache-fi \
939 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940 ac_prev=cache_file ;;
941 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 cache_file=$ac_optarg ;;
944
945 --config-cache | -C)
946 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954 | --dataroo | --dataro | --datar)
955 ac_prev=datarootdir ;;
956 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958 datarootdir=$ac_optarg ;;
959
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975
976 -docdir | --docdir | --docdi | --doc | --do)
977 ac_prev=docdir ;;
978 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979 docdir=$ac_optarg ;;
980
981 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982 ac_prev=dvidir ;;
983 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004 | --exec | --exe | --ex)
1005 ac_prev=exec_prefix ;;
1006 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 # Obsolete; use --with-gas.
1013 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 -help | --help | --hel | --he | -h)
1016 ac_init_help=long ;;
1017 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018 ac_init_help=recursive ;;
1019 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028 ac_prev=htmldir ;;
1029 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030 | --ht=*)
1031 htmldir=$ac_optarg ;;
1032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -includedir | --includedir | --includedi | --included | --include \
1034 | --includ | --inclu | --incl | --inc)
1035 ac_prev=includedir ;;
1036 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -infodir | --infodir | --infodi | --infod | --info | --inf)
1041 ac_prev=infodir ;;
1042 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libdir | --libdir | --libdi | --libd)
1046 ac_prev=libdir ;;
1047 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051 | --libexe | --libex | --libe)
1052 ac_prev=libexecdir ;;
1053 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -localedir | --localedir | --localedi | --localed | --locale)
1058 ac_prev=localedir ;;
1059 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060 localedir=$ac_optarg ;;
1061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 ac_prev=localstatedir ;;
1065 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070 ac_prev=mandir ;;
1071 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Obsolete; use --without-fp.
1076 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 no_create=yes ;;
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088 | --oldin | --oldi | --old | --ol | --o)
1089 ac_prev=oldincludedir ;;
1090 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096 ac_prev=prefix ;;
1097 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101 | --program-pre | --program-pr | --program-p)
1102 ac_prev=program_prefix ;;
1103 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108 | --program-suf | --program-su | --program-s)
1109 ac_prev=program_suffix ;;
1110 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-transform-name | --program-transform-name \
1115 | --program-transform-nam | --program-transform-na \
1116 | --program-transform-n | --program-transform- \
1117 | --program-transform | --program-transfor \
1118 | --program-transfo | --program-transf \
1119 | --program-trans | --program-tran \
1120 | --progr-tra | --program-tr | --program-t)
1121 ac_prev=program_transform_name ;;
1122 -program-transform-name=* | --program-transform-name=* \
1123 | --program-transform-nam=* | --program-transform-na=* \
1124 | --program-transform-n=* | --program-transform-=* \
1125 | --program-transform=* | --program-transfor=* \
1126 | --program-transfo=* | --program-transf=* \
1127 | --program-trans=* | --program-tran=* \
1128 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001131 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132 ac_prev=pdfdir ;;
1133 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134 pdfdir=$ac_optarg ;;
1135
1136 -psdir | --psdir | --psdi | --psd | --ps)
1137 ac_prev=psdir ;;
1138 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139 psdir=$ac_optarg ;;
1140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142 | -silent | --silent | --silen | --sile | --sil)
1143 silent=yes ;;
1144
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1146 ac_prev=sbindir ;;
1147 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1148 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
1151 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1152 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1153 | --sharedst | --shareds | --shared | --share | --shar \
1154 | --sha | --sh)
1155 ac_prev=sharedstatedir ;;
1156 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1157 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1158 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1159 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162 -site | --site | --sit)
1163 ac_prev=site ;;
1164 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1168 ac_prev=srcdir ;;
1169 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1173 | --syscon | --sysco | --sysc | --sys | --sy)
1174 ac_prev=sysconfdir ;;
1175 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1176 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1185 verbose=yes ;;
1186
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 -version | --version | --versio | --versi | --vers | -V)
1188 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001194 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt_orig=$ac_useropt
1196 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197 case $ac_user_opts in
1198 *"
1199"with_$ac_useropt"
1200"*) ;;
1201 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1202 ac_unrecognized_sep=', ';;
1203 esac
1204 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 --x)
1223 # Obsolete; use --with-x.
1224 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
1226 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1227 | --x-incl | --x-inc | --x-in | --x-i)
1228 ac_prev=x_includes ;;
1229 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1230 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1234 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1235 ac_prev=x_libraries ;;
1236 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1237 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001240 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1241Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ;;
1243
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 *=*)
1245 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1246 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001247 case $ac_envvar in #(
1248 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 export $ac_envvar ;;
1253
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001254 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001259 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ;;
1261
1262 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263done
1264
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001267 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268fi
1269
Matthias Kloseb9621712010-04-24 17:59:49 +00001270if test -n "$ac_unrecognized_opts"; then
1271 case $enable_option_checking in
1272 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1275 esac
1276fi
1277
1278# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1280 datadir sysconfdir sharedstatedir localstatedir includedir \
1281 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Xiang Zhang4c855572018-08-20 22:36:19 +08001282 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 # Remove trailing slashes.
1286 case $ac_val in
1287 */ )
1288 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1289 eval $ac_var=\$ac_val;;
1290 esac
1291 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 [\\/$]* | ?:[\\/]* ) continue;;
1294 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001295 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001297done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299# There might be people who depend on the old broken behavior: `$host'
1300# used to hold the argument of --host etc.
1301# FIXME: To remove some day.
1302build=$build_alias
1303host=$host_alias
1304target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# FIXME: To remove some day.
1307if test "x$host_alias" != x; then
1308 if test "x$build_alias" = x; then
1309 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 elif test "x$build_alias" != "x$host_alias"; then
1311 cross_compiling=yes
1312 fi
1313fi
1314
1315ac_tool_prefix=
1316test -n "$host_alias" && ac_tool_prefix=$host_alias-
1317
1318test "$silent" = yes && exec 6>/dev/null
1319
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321ac_pwd=`pwd` && test -n "$ac_pwd" &&
1322ac_ls_di=`ls -di .` &&
1323ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001324 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001326 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329# Find the source files, if location was not specified.
1330if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001331 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 ac_confdir=`$as_dirname -- "$as_myself" ||
1334$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1335 X"$as_myself" : 'X\(//\)[^/]' \| \
1336 X"$as_myself" : 'X\(//\)$' \| \
1337 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1338$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)[^/].*/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\).*/{
1352 s//\1/
1353 q
1354 }
1355 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001356 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358 srcdir=..
1359 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001360else
1361 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363if test ! -r "$srcdir/$ac_unique_file"; then
1364 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1368ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370 pwd)`
1371# When building in place, set srcdir=.
1372if test "$ac_abs_confdir" = "$ac_pwd"; then
1373 srcdir=.
1374fi
1375# Remove unnecessary trailing slashes from srcdir.
1376# Double slashes in file names in object file debugging info
1377# mess up M-x gdb in Emacs.
1378case $srcdir in
1379*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1380esac
1381for ac_var in $ac_precious_vars; do
1382 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1383 eval ac_env_${ac_var}_value=\$${ac_var}
1384 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1386done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388#
1389# Report the --help message.
1390#
1391if test "$ac_init_help" = "long"; then
1392 # Omit some internal or obsolete options to make the list less imposing.
1393 # This message is too long to be a string in the A/UX 3.1 sh.
1394 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001395\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397Usage: $0 [OPTION]... [VAR=VALUE]...
1398
1399To assign environment variables (e.g., CC, CFLAGS...), specify them as
1400VAR=VALUE. See below for descriptions of some of the useful variables.
1401
1402Defaults for the options are specified in brackets.
1403
1404Configuration:
1405 -h, --help display this help and exit
1406 --help=short display options specific to this package
1407 --help=recursive display the short help of all the included packages
1408 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001409 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 --cache-file=FILE cache test results in FILE [disabled]
1411 -C, --config-cache alias for \`--cache-file=config.cache'
1412 -n, --no-create do not create output files
1413 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1414
Martin v. Löwis11437992002-04-12 09:54:03 +00001415Installation directories:
1416 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001417 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001419 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
1421By default, \`make install' will install all the files in
1422\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1423an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1424for instance \`--prefix=\$HOME'.
1425
1426For better control, use the options below.
1427
1428Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 --bindir=DIR user executables [EPREFIX/bin]
1430 --sbindir=DIR system admin executables [EPREFIX/sbin]
1431 --libexecdir=DIR program executables [EPREFIX/libexec]
1432 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1433 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1434 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1435 --libdir=DIR object code libraries [EPREFIX/lib]
1436 --includedir=DIR C header files [PREFIX/include]
1437 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1438 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1439 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1440 --infodir=DIR info documentation [DATAROOTDIR/info]
1441 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1442 --mandir=DIR man documentation [DATAROOTDIR/man]
1443 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1444 --htmldir=DIR html documentation [DOCDIR]
1445 --dvidir=DIR dvi documentation [DOCDIR]
1446 --pdfdir=DIR pdf documentation [DOCDIR]
1447 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
1449
1450 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001451
1452System types:
1453 --build=BUILD configure for building on BUILD [guessed]
1454 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001455 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
1457fi
1458
1459if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001460 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001461 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001462 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 cat <<\_ACEOF
1464
1465Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1468 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001469 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001470 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-framework[=INSTALLDIR]
1472 Build (MacOSX|Darwin) framework
1473 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001474 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001475 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1476 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001477 --enable-loadable-sqlite-extensions
1478 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-ipv6 Enable ipv6 (with ipv4) support
1480 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001481 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001483
1484Optional Packages:
1485 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1486 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001487 --with-universal-archs=ARCH
1488 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001489 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1490 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001491 --with-framework-name=FRAMEWORK
1492 specify an alternate name of the framework built
1493 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001494 --with-cxx-main=<compiler>
1495 compile main() and link python executable with C++
1496 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-suffix=.exe set executable suffix
1498 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001499 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001500 --with-lto Enable Link Time Optimization in any build. Disabled
1501 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001502 --with-hash-algorithm=[fnv|siphash24]
1503 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001504 --with-address-sanitizer
1505 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001507 --with-system-expat build pyexpat module using an installed expat
1508 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001509 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001510 --with-system-libmpdec build _decimal module using an installed libmpdec
1511 library
Ned Deilyd819b932013-09-06 01:07:05 -07001512 --with-tcltk-includes='-I...'
1513 override search for Tcl and Tk include files
1514 --with-tcltk-libs='-L...'
1515 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001516 --with-dbmliborder=db1:db2:...
1517 order to check db backends for dbm. Valid value is a
1518 colon separated string with the backend names
1519 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-doc-strings disable/enable documentation strings
1521 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001522 --with(out)-c-locale-coercion
1523 disable/enable C locale coercion to a UTF-8 based
1524 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001525 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001526 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with-libm=STRING math library
1528 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001529 --with(out)-computed-gotos
1530 Use computed gotos in evaluation loop (enabled by
1531 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001532 --with(out)-ensurepip=[=upgrade]
1533 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001534 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001535 --with-ssl-default-suites=[python|openssl|STRING]
1536 Override default cipher suites string, python: use
1537 Python's preferred selection (default), openssl:
1538 leave OpenSSL's defaults untouched, STRING: use a
1539 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001623python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1977# --------------------------------------------
1978# Tries to find the compile-time value of EXPR in a program that includes
1979# INCLUDES, setting VAR accordingly. Returns whether the value could be
1980# computed
1981ac_fn_c_compute_int ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 if test "$cross_compiling" = yes; then
1985 # Depending upon the size, compute the lo and hi bounds.
1986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$4
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 ac_lo=0 ac_mid=0
2002 while :; do
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_hi=$ac_mid; break
2019else
2020 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2021 if test $ac_lo -le $ac_mid; then
2022 ac_lo= ac_hi=
2023 break
2024 fi
2025 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028 done
2029else
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002037test_array [0] = 0;
2038return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_hi=-1 ac_mid=-1
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=$ac_mid; break
2063else
2064 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2065 if test $ac_mid -le $ac_hi; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 ac_lo= ac_hi=
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079# Binary search between lo and hi bounds.
2080while test "x$ac_lo" != "x$ac_hi"; do
2081 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2083/* end confdefs.h. */
2084$4
2085int
2086main ()
2087{
2088static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002089test_array [0] = 0;
2090return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002154 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002167if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224} # ac_fn_c_check_func
2225
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002226# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2227# ---------------------------------------------
2228# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2229# accordingly.
2230ac_fn_c_check_decl ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 as_decl_name=`echo $2|sed 's/ *(.*//'`
2234 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2236$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2237if eval \${$3+:} false; then :
2238 $as_echo_n "(cached) " >&6
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243int
2244main ()
2245{
2246#ifndef $as_decl_name
2247#ifdef __cplusplus
2248 (void) $as_decl_use;
2249#else
2250 (void) $as_decl_name;
2251#endif
2252#endif
2253
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$3=yes"
2260else
2261 eval "$3=no"
2262fi
2263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2264fi
2265eval ac_res=\$$3
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2267$as_echo "$ac_res" >&6; }
2268 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269
2270} # ac_fn_c_check_decl
2271
Matthias Kloseb9621712010-04-24 17:59:49 +00002272# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2273# ----------------------------------------------------
2274# Tries to find if the field MEMBER exists in type AGGR, after including
2275# INCLUDES, setting cache variable VAR accordingly.
2276ac_fn_c_check_member ()
2277{
2278 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2280$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002281if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002282 $as_echo_n "(cached) " >&6
2283else
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h. */
2286$5
2287int
2288main ()
2289{
2290static $2 ac_aggr;
2291if (ac_aggr.$3)
2292return 0;
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$4=yes"
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (sizeof ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 eval "$4=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$4
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002325 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002326
2327} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Ned Deily5489bda2018-01-31 17:44:09 -05002332It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002333generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# 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 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002443 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002444## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002445## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo
2447 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448(
2449 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2450 eval ac_val=\$$ac_var
2451 case $ac_val in #(
2452 *${as_nl}*)
2453 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002454 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2455$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac
2457 case $ac_var in #(
2458 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2460 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 esac ;;
2462 esac
2463 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2466 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 "s/'\''/'\''\\\\'\'''\''/g;
2469 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2470 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002471 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac |
2475 sort
2476)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002478
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002479 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002480## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002481## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 echo
2483 for ac_var in $ac_subst_vars
2484 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 eval ac_val=\$$ac_var
2486 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 done | sort
2491 echo
2492
2493 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_files
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507 fi
2508
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002511## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 fi
2517 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 $as_echo "$as_me: caught signal $ac_signal"
2519 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 rm -f core *.core core.conftest.* &&
2522 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002525for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002527done
2528ac_signal=0
2529
2530# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
Matthias Kloseb9621712010-04-24 17:59:49 +00002533$as_echo "/* confdefs.h */" > confdefs.h
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535# Predefined preprocessor variables.
2536
2537cat >>confdefs.h <<_ACEOF
2538#define PACKAGE_NAME "$PACKAGE_NAME"
2539_ACEOF
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_VERSION "$PACKAGE_VERSION"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_STRING "$PACKAGE_STRING"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2555_ACEOF
2556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_URL "$PACKAGE_URL"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002563# Prefer an explicitly selected file to automatically selected ones.
2564ac_site_file1=NONE
2565ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567 # We do not want a PATH search for config.site.
2568 case $CONFIG_SITE in #((
2569 -*) ac_site_file1=./$CONFIG_SITE;;
2570 */*) ac_site_file1=$CONFIG_SITE;;
2571 *) ac_site_file1=./$CONFIG_SITE;;
2572 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$prefix/share/config.site
2575 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576else
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$ac_default_prefix/share/config.site
2578 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002580for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 test "x$ac_site_file" = xNONE && continue
2583 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2585$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 . "$ac_site_file" \
2588 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2590as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002591See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592 fi
2593done
2594
2595if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 # Some versions of bash will fail to source /dev/null (special files
2597 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2598 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2600$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2603 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 esac
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606else
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2608$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 >$cache_file
2610fi
2611
2612# Check that the precious variables saved in the cache have kept the same
2613# value.
2614ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2617 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2619 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $ac_old_set,$ac_new_set in
2621 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2623$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 +00002624 ac_cache_corrupted=: ;;
2625 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2627$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_cache_corrupted=: ;;
2629 ,);;
2630 *)
2631 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 # differences in whitespace do not lead to failure.
2633 ac_old_val_w=`echo x $ac_old_val`
2634 ac_new_val_w=`echo x $ac_new_val`
2635 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2637$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2638 ac_cache_corrupted=:
2639 else
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2641$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2642 eval $ac_var=\$ac_old_val
2643 fi
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2645$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2647$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 fi;;
2649 esac
2650 # Pass precious variables to config.status.
2651 if test "$ac_new_set" = set; then
2652 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 *) ac_arg=$ac_var=$ac_new_val ;;
2655 esac
2656 case " $ac_configure_args " in
2657 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 esac
2660 fi
2661done
2662if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2666$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002669## -------------------- ##
2670## Main body of script. ##
2671## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672
Guido van Rossum7f43da71994-08-01 12:15:30 +00002673ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678
Guido van Rossum627b2d71993-12-24 10:39:16 +00002679
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
Trent Nelson4d4ec652012-10-16 08:51:24 -04002681
Christian Heimesff5be6e2018-01-20 13:19:21 +01002682
2683
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002684if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002685 # If we're building out-of-tree, we need to make sure the following
2686 # resources get picked up before their $srcdir counterparts.
2687 # Objects/ -> typeslots.inc
2688 # Include/ -> Python-ast.h, graminit.h
2689 # Python/ -> importlib.h
2690 # (A side effect of this is that these resources will automatically be
2691 # regenerated when building out-of-tree, regardless of whether or not
2692 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2693 # off.)
2694 BASECPPFLAGS="-IObjects -IInclude -IPython"
2695else
2696 BASECPPFLAGS=""
2697fi
2698
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002699
2700
2701
2702
Victor Stinner9ed34a82017-05-02 22:35:58 +02002703if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002704then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002705# Extract the first word of "git", so it can be a program name with args.
2706set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2708$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002709if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710 $as_echo_n "(cached) " >&6
2711else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712 if test -n "$HAS_GIT"; then
2713 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714else
2715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2716for as_dir in $PATH
2717do
2718 IFS=$as_save_IFS
2719 test -z "$as_dir" && as_dir=.
2720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2724 break 2
2725 fi
2726done
2727 done
2728IFS=$as_save_IFS
2729
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731fi
2732fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733HAS_GIT=$ac_cv_prog_HAS_GIT
2734if test -n "$HAS_GIT"; then
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2736$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737else
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2739$as_echo "no" >&6; }
2740fi
2741
2742
2743else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747then
Xiang Zhang4c855572018-08-20 22:36:19 +08002748 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2749 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2750 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 GITVERSION=""
2753 GITTAG=""
2754 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
2756
2757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002761ac_aux_dir=
2762for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2763 if test -f "$ac_dir/install-sh"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/install-sh -c"
2766 break
2767 elif test -f "$ac_dir/install.sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install.sh -c"
2770 break
2771 elif test -f "$ac_dir/shtool"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/shtool install -c"
2774 break
2775 fi
2776done
2777if test -z "$ac_aux_dir"; then
2778 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2779fi
2780
2781# These three variables are undocumented and unsupported,
2782# and are intended to be withdrawn in a future Autoconf release.
2783# They can cause serious problems if a builder's source tree is in a directory
2784# whose full name contains unusual characters.
2785ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2786ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2787ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2788
2789
2790# Make sure we can run config.sub.
2791$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2792 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2793
2794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2795$as_echo_n "checking build system type... " >&6; }
2796if ${ac_cv_build+:} false; then :
2797 $as_echo_n "(cached) " >&6
2798else
2799 ac_build_alias=$build_alias
2800test "x$ac_build_alias" = x &&
2801 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2802test "x$ac_build_alias" = x &&
2803 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2804ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2805 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2806
2807fi
2808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2809$as_echo "$ac_cv_build" >&6; }
2810case $ac_cv_build in
2811*-*-*) ;;
2812*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2813esac
2814build=$ac_cv_build
2815ac_save_IFS=$IFS; IFS='-'
2816set x $ac_cv_build
2817shift
2818build_cpu=$1
2819build_vendor=$2
2820shift; shift
2821# Remember, the first character of IFS is used to create $*,
2822# except with old shells:
2823build_os=$*
2824IFS=$ac_save_IFS
2825case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2826
2827
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2829$as_echo_n "checking host system type... " >&6; }
2830if ${ac_cv_host+:} false; then :
2831 $as_echo_n "(cached) " >&6
2832else
2833 if test "x$host_alias" = x; then
2834 ac_cv_host=$ac_cv_build
2835else
2836 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2837 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2838fi
2839
2840fi
2841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2842$as_echo "$ac_cv_host" >&6; }
2843case $ac_cv_host in
2844*-*-*) ;;
2845*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2846esac
2847host=$ac_cv_host
2848ac_save_IFS=$IFS; IFS='-'
2849set x $ac_cv_host
2850shift
2851host_cpu=$1
2852host_vendor=$2
2853shift; shift
2854# Remember, the first character of IFS is used to create $*,
2855# except with old shells:
2856host_os=$*
2857IFS=$ac_save_IFS
2858case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2859
2860
2861
doko@python.orga10e4a92013-01-25 18:45:12 +01002862
2863
Ned Deilyfcbc2462014-08-22 13:32:49 -07002864# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2865rm -f pybuilddir.txt
2866
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002867for ac_prog in python$PACKAGE_VERSION python3 python
2868do
2869 # Extract the first word of "$ac_prog", so it can be a program name with args.
2870set dummy $ac_prog; ac_word=$2
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2872$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002873if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874 $as_echo_n "(cached) " >&6
2875else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002876 if test -n "$PYTHON_FOR_REGEN"; then
2877 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878else
2879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2880for as_dir in $PATH
2881do
2882 IFS=$as_save_IFS
2883 test -z "$as_dir" && as_dir=.
2884 for ac_exec_ext in '' $ac_executable_extensions; do
2885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002886 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888 break 2
2889 fi
2890done
2891 done
2892IFS=$as_save_IFS
2893
2894fi
2895fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2897if test -n "$PYTHON_FOR_REGEN"; then
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2899$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900else
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2902$as_echo "no" >&6; }
2903fi
2904
2905
Victor Stinnera5c62a82017-05-03 18:21:48 +02002906 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910
2911
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002912if test "$cross_compiling" = yes; then
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2914$as_echo_n "checking for python interpreter for cross build... " >&6; }
2915 if test -z "$PYTHON_FOR_BUILD"; then
2916 for interp in python$PACKAGE_VERSION python3 python; do
2917 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002918 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 +02002919 break
2920 fi
2921 interp=
2922 done
2923 if test x$interp = x; then
2924 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2925 fi
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2927$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002928 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 +02002929 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002930elif test "$cross_compiling" = maybe; then
2931 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002932else
2933 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2934fi
2935
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Benjamin Petersond23f8222009-04-05 19:13:16 +00002938if test "$prefix" != "/"; then
2939 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
2944
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002945# We don't use PACKAGE_ variables, and they cause conflicts
2946# with other autoconf-based packages that include Python.h
2947grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2948rm confdefs.h
2949mv confdefs.h.new confdefs.h
2950
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002951
Ned Deily5489bda2018-01-31 17:44:09 -05002952VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002953
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002954# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002955
2956SOVERSION=1.0
2957
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958# The later defininition of _XOPEN_SOURCE disables certain features
2959# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002962
2963
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002964# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2965# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2966# them.
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002969
2970
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002976
2977
Martin v. Löwisd6320502004-08-12 13:45:08 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002979# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002983
2984
2985
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002986define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002987
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002988# Arguments passed to configure.
2989
2990CONFIG_ARGS="$ac_configure_args"
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2993$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002995if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 case $enableval in
2998 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03002999 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003000 # information
3001 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003002 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003004 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3005 if test ! -d "${enableval}"
3006 then
3007 enableval=/
3008 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 ;;
3011 esac
3012 case $enableval in
3013 no)
3014 UNIVERSALSDK=
3015 enable_universalsdk=
3016 ;;
3017 *)
3018 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 if test ! -d "${UNIVERSALSDK}"
3020 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003021 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003025
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027else
3028
3029 UNIVERSALSDK=
3030 enable_universalsdk=
3031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034if test -n "${UNIVERSALSDK}"
3035then
Matthias Kloseb9621712010-04-24 17:59:49 +00003036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3037$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038else
Matthias Kloseb9621712010-04-24 17:59:49 +00003039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3040$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003044
Ned Deily87adb6e2013-10-18 21:09:56 -07003045ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003046
Ned Deilycbfb9a52012-06-23 16:02:19 -07003047# For backward compatibility reasons we prefer to select '32-bit' if available,
3048# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050if test "`uname -s`" = "Darwin"
3051then
3052 if test -n "${UNIVERSALSDK}"
3053 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003054 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055 then
3056 UNIVERSAL_ARCHS="intel"
3057 fi
3058 fi
3059fi
3060
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003061
Matthias Kloseb9621712010-04-24 17:59:49 +00003062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3063$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064
3065# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003066if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003067 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068 UNIVERSAL_ARCHS="$withval"
3069
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070fi
3071
Ned Deily87adb6e2013-10-18 21:09:56 -07003072if test -n "${UNIVERSALSDK}"
3073then
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3075$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3076else
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
3079fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003081
3082# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003083if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003084 withval=$with_framework_name;
3085 PYTHONFRAMEWORK=${withval}
3086 PYTHONFRAMEWORKDIR=${withval}.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3088
3089else
3090
3091 PYTHONFRAMEWORK=Python
3092 PYTHONFRAMEWORKDIR=Python.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3094
3095fi
3096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003098if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003099 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003100 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003102 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003103 esac
3104 case $enableval in
3105 no)
3106 PYTHONFRAMEWORK=
3107 PYTHONFRAMEWORKDIR=no-framework
3108 PYTHONFRAMEWORKPREFIX=
3109 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110 FRAMEWORKINSTALLFIRST=
3111 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003112 FRAMEWORKALTINSTALLFIRST=
3113 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003114 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003115 if test "x${prefix}" = "xNONE"; then
3116 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3117 else
3118 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3119 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003120 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003121 ;;
3122 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003123 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003124 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003126 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003127 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3128 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003129 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003132 if test "x${prefix}" = "xNONE" ; then
3133 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003135 else
3136 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3137 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138
3139 case "${enableval}" in
3140 /System*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 if test "${prefix}" = "NONE" ; then
3143 # See below
3144 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3145 fi
3146 ;;
3147
3148 /Library*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 ;;
3151
3152 */Library/Frameworks)
3153 MDIR="`dirname "${enableval}"`"
3154 MDIR="`dirname "${MDIR}"`"
3155 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3156
3157 if test "${prefix}" = "NONE"; then
3158 # User hasn't specified the
3159 # --prefix option, but wants to install
3160 # the framework in a non-default location,
3161 # ensure that the compatibility links get
3162 # installed relative to that prefix as well
3163 # instead of in /usr/local.
3164 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3165 fi
3166 ;;
3167
3168 *)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 ;;
3171 esac
3172
Jack Jansen127e56e2001-09-11 14:41:54 +00003173 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003175 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3182
3183 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3184
Jack Jansene578a632001-08-15 01:27:14 +00003185 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003186
Guido van Rossum563e7081996-09-10 18:20:48 +00003187else
Martin v. Löwis11437992002-04-12 09:54:03 +00003188
Jack Jansene578a632001-08-15 01:27:14 +00003189 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003191 PYTHONFRAMEWORKPREFIX=
3192 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193 FRAMEWORKINSTALLFIRST=
3194 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003195 FRAMEWORKALTINSTALLFIRST=
3196 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003197 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE" ; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3200 else
3201 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3202 fi
Jack Jansene578a632001-08-15 01:27:14 +00003203 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003204
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206fi
3207
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208
3209
Michael W. Hudson54241132001-12-07 15:38:26 +00003210
3211
3212
3213
Jack Jansene578a632001-08-15 01:27:14 +00003214
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215
3216
3217
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003218
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003219
Ned Deilyb8f944f2013-11-21 22:42:25 -08003220
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003221
3222cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003223#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003224_ACEOF
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003228## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003229## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003230##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231# Set name for machine-dependent library files
3232
Matthias Kloseb9621712010-04-24 17:59:49 +00003233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3234$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235if test -z "$MACHDEP"
3236then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003237 # avoid using uname for cross builds
3238 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003239 # ac_sys_system and ac_sys_release are used for setting
3240 # a lot of different things including 'define_xopen_source'
3241 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003242 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003243 *-*-linux-android*)
3244 ac_sys_system=Linux-android
3245 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 *-*-linux*)
3247 ac_sys_system=Linux
3248 ;;
3249 *-*-cygwin*)
3250 ac_sys_system=Cygwin
3251 ;;
3252 *)
3253 # for now, limit cross builds to known configurations
3254 MACHDEP="unknown"
3255 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3256 esac
3257 ac_sys_release=
3258 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003259 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003260 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003261 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003262 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003264 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003265 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 fi
3267 ac_md_system=`echo $ac_sys_system |
3268 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3269 ac_md_release=`echo $ac_sys_release |
3270 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3271 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003272
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003274 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003275 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003276 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003277 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279fi
Guido van Rossum91922671997-10-09 20:24:13 +00003280
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003281
3282if test "$cross_compiling" = yes; then
3283 case "$host" in
3284 *-*-linux*)
3285 case "$host_cpu" in
3286 arm*)
3287 _host_cpu=arm
3288 ;;
3289 *)
3290 _host_cpu=$host_cpu
3291 esac
3292 ;;
3293 *-*-cygwin*)
3294 _host_cpu=
3295 ;;
3296 *)
3297 # for now, limit cross builds to known configurations
3298 MACHDEP="unknown"
3299 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3300 esac
3301 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3302fi
3303
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003304# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3305# disable features if it is defined, without any means to access these
3306# features as extensions. For these systems, we skip the definition of
3307# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3308# some feature, make sure there is no alternative way to access this
3309# feature. Also, when using wildcards, make sure you have verified the
3310# need for not defining _XOPEN_SOURCE on all systems matching the
3311# wildcard, and that the wildcard does not include future systems
3312# (which may remove their limitations).
3313case $ac_sys_system/$ac_sys_release in
3314 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3315 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003316 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003317 # In addition, Stefan Krah confirms that issue #1244610 exists through
3318 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003319 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003320 define_xopen_source=no
3321 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3322 # also defined. This can be overridden by defining _BSD_SOURCE
3323 # As this has a different meaning on Linux, only define it on OpenBSD
3324
Matthias Kloseb9621712010-04-24 17:59:49 +00003325$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326
3327 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003328 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003334
3335 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003336 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3337 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3338 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003339 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 +00003340 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003341 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3342 # request to enable features supported by the standard as a request
3343 # to disable features not supported by the standard. The best way
3344 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3345 # entirely and define __EXTENSIONS__ instead.
3346 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003347 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003348 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3349 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003350 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003351 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003352 define_xopen_source=no;;
3353 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003354 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003355 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003356 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003357 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3358 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3359 # identifies itself as Darwin/7.*
3360 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3361 # disables platform specific features beyond repair.
3362 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3363 # has no effect, don't bother defining them
3364 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003365 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003366 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003367 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003368 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3369 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3370 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003371 AIX/4)
3372 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003373 AIX/5)
3374 if test `uname -r` -eq 1; then
3375 define_xopen_source=no
3376 fi
3377 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003378 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3379 # defining NI_NUMERICHOST.
3380 QNX/6.3.2)
3381 define_xopen_source=no
3382 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003383
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003384esac
3385
3386if test $define_xopen_source = yes
3387then
Victor Stinner14d098d2011-09-07 22:29:43 +02003388 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003389
Victor Stinner14d098d2011-09-07 22:29:43 +02003390$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003391
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003392
3393 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3394 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3395 # several APIs are not declared. Since this is also needed in some
3396 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
Matthias Kloseb9621712010-04-24 17:59:49 +00003398$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
3400
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003401
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003402$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404fi
3405
Christian Heimes647cd872013-12-07 23:39:33 +01003406# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3407case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003408 hp*|HP*)
3409 define_stdc_a1=yes;;
3410 *)
3411 define_stdc_a1=no;;
3412esac
3413
3414if test $define_stdc_a1 = yes
3415then
Christian Heimes647cd872013-12-07 23:39:33 +01003416
3417$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3418
Christian Heimesb02bcae2013-12-08 15:21:08 +01003419fi
Christian Heimes647cd872013-12-07 23:39:33 +01003420
Jack Jansen6b08a402004-06-03 12:41:45 +00003421# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3422# it may influence the way we can build extensions, so distutils
3423# needs to check it
3424
Thomas Wouters477c8d52006-05-27 19:21:47 +00003425
Jack Jansen6b08a402004-06-03 12:41:45 +00003426CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003427EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003428
Guido van Rossum627b2d71993-12-24 10:39:16 +00003429# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003430
3431# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3432# for debug/optimization stuff. BASECFLAGS is for flags that are required
3433# just to get things to compile and link. Users are free to override OPT
3434# when running configure or make. The build should not break if they do.
3435# BASECFLAGS should generally not be messed with, however.
3436
Guido van Rossum8b131c51995-03-09 14:10:13 +00003437# If the user switches compilers, we can't believe the cache
3438if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3439then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003440 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003441(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003442fi
3443
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003444# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3445# when the compiler supports them, but we don't always want -O2, and
3446# we set -g later.
3447if test -z "$CFLAGS"; then
3448 CFLAGS=
3449fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003450
3451if test "$ac_sys_system" = "Darwin"
3452then
3453 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003454 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003455 # information
3456 if test -z "${CC}"
3457 then
3458 found_gcc=
3459 found_clang=
3460 as_save_IFS=$IFS; IFS=:
3461 for as_dir in $PATH
3462 do
3463 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003464 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003465 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003466 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003467 fi
3468 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003469 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003470 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003471 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003472 fi
3473 fi
3474 done
3475 IFS=$as_save_IFS
3476
3477 if test -n "$found_gcc" -a -n "$found_clang"
3478 then
3479 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3480 then
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3482$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3483 CC="$found_clang"
3484 CXX="$found_clang++"
3485 fi
3486
3487
3488 elif test -z "$found_gcc" -a -n "$found_clang"
3489 then
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3491$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3492 CC="$found_clang"
3493 CXX="$found_clang++"
3494
3495 elif test -z "$found_gcc" -a -z "$found_clang"
3496 then
3497 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3498 if test -n "${found_clang}"
3499 then
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3501$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3502 CC="${found_clang}"
3503 CXX="`/usr/bin/xcrun -find clang++`"
3504
3505 # else: use default behaviour
3506 fi
3507 fi
3508 fi
3509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003510ac_ext=c
3511ac_cpp='$CPP $CPPFLAGS'
3512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3514ac_compiler_gnu=$ac_cv_c_compiler_gnu
3515if test -n "$ac_tool_prefix"; then
3516 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3517set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3519$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003520if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003521 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003522else
3523 if test -n "$CC"; then
3524 ac_cv_prog_CC="$CC" # Let the user override the test.
3525else
Martin v. Löwis11437992002-04-12 09:54:03 +00003526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3527for as_dir in $PATH
3528do
3529 IFS=$as_save_IFS
3530 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003534 $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 +00003535 break 2
3536 fi
3537done
Matthias Kloseb9621712010-04-24 17:59:49 +00003538 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003540
Jack Jansendd19cf82001-12-06 22:36:17 +00003541fi
3542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003544if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3546$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003547else
Matthias Kloseb9621712010-04-24 17:59:49 +00003548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3549$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003550fi
3551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552
Martin v. Löwis11437992002-04-12 09:54:03 +00003553fi
3554if test -z "$ac_cv_prog_CC"; then
3555 ac_ct_CC=$CC
3556 # Extract the first word of "gcc", so it can be a program name with args.
3557set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3559$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003560if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003562else
3563 if test -n "$ac_ct_CC"; then
3564 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3565else
3566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3567for as_dir in $PATH
3568do
3569 IFS=$as_save_IFS
3570 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 $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 +00003575 break 2
3576 fi
3577done
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003580
3581fi
3582fi
3583ac_ct_CC=$ac_cv_prog_ac_ct_CC
3584if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3586$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003587else
Matthias Kloseb9621712010-04-24 17:59:49 +00003588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3589$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003590fi
3591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592 if test "x$ac_ct_CC" = x; then
3593 CC=""
3594 else
3595 case $cross_compiling:$ac_tool_warned in
3596yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599ac_tool_warned=yes ;;
3600esac
3601 CC=$ac_ct_CC
3602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603else
3604 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003605fi
3606
Jack Jansendd19cf82001-12-06 22:36:17 +00003607if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608 if test -n "$ac_tool_prefix"; then
3609 # 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 +00003610set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
3634fi
3635fi
3636CC=$ac_cv_prog_CC
3637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648if test -z "$CC"; then
3649 # Extract the first word of "cc", so it can be a program name with args.
3650set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$CC"; then
3657 ac_cv_prog_CC="$CC" # Let the user override the test.
3658else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003659 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3668 ac_prog_rejected=yes
3669 continue
3670 fi
3671 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $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 +00003673 break 2
3674 fi
3675done
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003678
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003679if test $ac_prog_rejected = yes; then
3680 # We found a bogon in the path, so make sure we never use it.
3681 set dummy $ac_cv_prog_CC
3682 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003684 # We chose a different compiler from the bogus one.
3685 # However, it has the same basename, so the bogon will be chosen
3686 # first if we set CC to just the basename; use the full file name.
3687 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003688 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003689 fi
3690fi
3691fi
3692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003694if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3696$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697else
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3699$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700fi
3701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704if test -z "$CC"; then
3705 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 do
3708 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3709set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003712if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003714else
3715 if test -n "$CC"; then
3716 ac_cv_prog_CC="$CC" # Let the user override the test.
3717else
Martin v. Löwis11437992002-04-12 09:54:03 +00003718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $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 +00003727 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729done
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003732
3733fi
3734fi
3735CC=$ac_cv_prog_CC
3736if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3738$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739else
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3741$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003742fi
3743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 test -n "$CC" && break
3746 done
3747fi
3748if test -z "$CC"; then
3749 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003751do
3752 # Extract the first word of "$ac_prog", so it can be a program name with args.
3753set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003756if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
3759 if test -n "$ac_ct_CC"; then
3760 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3761else
3762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH
3764do
3765 IFS=$as_save_IFS
3766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $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 +00003771 break 2
3772 fi
3773done
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
3778fi
3779ac_ct_CC=$ac_cv_prog_ac_ct_CC
3780if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3782$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003783else
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003786fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 test -n "$ac_ct_CC" && break
3790done
Michael W. Hudson54241132001-12-07 15:38:26 +00003791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 if test "x$ac_ct_CC" = x; then
3793 CC=""
3794 else
3795 case $cross_compiling:$ac_tool_warned in
3796yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799ac_tool_warned=yes ;;
3800esac
3801 CC=$ac_ct_CC
3802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804
3805fi
3806
3807
Matthias Kloseb9621712010-04-24 17:59:49 +00003808test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003810as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003811See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003814$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3815set X $ac_compile
3816ac_compiler=$2
3817for ac_option in --version -v -V -qversion; do
3818 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819case "(($ac_try" in
3820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3821 *) ac_try_echo=$ac_try;;
3822esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3824$as_echo "$ac_try_echo"; } >&5
3825 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 if test -s conftest.err; then
3828 sed '10a\
3829... rest of stderr output deleted ...
3830 10q' conftest.err >conftest.er1
3831 cat conftest.er1 >&5
3832 fi
3833 rm -f conftest.er1 conftest.err
3834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3835 test $ac_status = 0; }
3836done
Martin v. Löwis11437992002-04-12 09:54:03 +00003837
Matthias Kloseb9621712010-04-24 17:59:49 +00003838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003839/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841int
3842main ()
3843{
3844
3845 ;
3846 return 0;
3847}
3848_ACEOF
3849ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003850ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003851# Try to create an executable without -o first, disregard a.out.
3852# It will help us diagnose broken compilers, and finding out an intuition
3853# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3855$as_echo_n "checking whether the C compiler works... " >&6; }
3856ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3857
3858# The possible output files:
3859ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861ac_rmfiles=
3862for ac_file in $ac_files
3863do
3864 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003865 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3867 esac
3868done
3869rm -f $ac_rmfiles
3870
Matthias Kloseb9621712010-04-24 17:59:49 +00003871if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872case "(($ac_try" in
3873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3874 *) ac_try_echo=$ac_try;;
3875esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3877$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3883# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3884# in a Makefile. We should not override ac_cv_exeext if it was cached,
3885# so that the user can short-circuit this test for compilers unknown to
3886# Autoconf.
3887for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003888do
3889 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003892 ;;
3893 [ab].out )
3894 # We found the default executable, but exeext='' is most
3895 # certainly right.
3896 break;;
3897 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 then :; else
3900 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3901 fi
3902 # We set ac_cv_exeext here because the later test for it is not
3903 # safe: cross compilers may not add the suffix if given an `-o'
3904 # argument, so we may need to know it at that point already.
3905 # Even if this section looks crufty: it has the advantage of
3906 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003907 break;;
3908 * )
3909 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003910 esac
3911done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912test "$ac_cv_exeext" = no && ac_cv_exeext=
3913
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003914else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 ac_file=''
3916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if test -z "$ac_file"; then :
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919$as_echo "no" >&6; }
3920$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003921sed 's/^/| /' conftest.$ac_ext >&5
3922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003925as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003926See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003927else
3928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3929$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3932$as_echo_n "checking for C compiler default output file name... " >&6; }
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3934$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003935ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936
Matthias Kloseb9621712010-04-24 17:59:49 +00003937rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3940$as_echo_n "checking for suffix of executables... " >&6; }
3941if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942case "(($ac_try" in
3943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944 *) ac_try_echo=$ac_try;;
3945esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3947$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003952 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3953# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3954# work properly (i.e., refer to `conftest.exe'), while it won't with
3955# `rm'.
3956for ac_file in conftest.exe conftest conftest.*; do
3957 test -f "$ac_file" || continue
3958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3961 break;;
3962 * ) break;;
3963 esac
3964done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965else
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003968as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003969See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003971rm -f conftest conftest$ac_cv_exeext
3972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3973$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974
3975rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003976EXEEXT=$ac_cv_exeext
3977ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3979/* end confdefs.h. */
3980#include <stdio.h>
3981int
3982main ()
3983{
3984FILE *f = fopen ("conftest.out", "w");
3985 return ferror (f) || fclose (f) != 0;
3986
3987 ;
3988 return 0;
3989}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003991ac_clean_files="$ac_clean_files conftest.out"
3992# Check that the compiler produces executables we can run. If not, either
3993# the compiler is broken, or we cross compile.
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3995$as_echo_n "checking whether we are cross compiling... " >&6; }
3996if test "$cross_compiling" != yes; then
3997 { { ac_try="$ac_link"
3998case "(($ac_try" in
3999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4000 *) ac_try_echo=$ac_try;;
4001esac
4002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4003$as_echo "$ac_try_echo"; } >&5
4004 (eval "$ac_link") 2>&5
4005 ac_status=$?
4006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4007 test $ac_status = 0; }
4008 if { ac_try='./conftest$ac_cv_exeext'
4009 { { case "(($ac_try" in
4010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4011 *) ac_try_echo=$ac_try;;
4012esac
4013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4014$as_echo "$ac_try_echo"; } >&5
4015 (eval "$ac_try") 2>&5
4016 ac_status=$?
4017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4018 test $ac_status = 0; }; }; then
4019 cross_compiling=no
4020 else
4021 if test "$cross_compiling" = maybe; then
4022 cross_compiling=yes
4023 else
4024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004026as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004027If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004028See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 fi
4030 fi
4031fi
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4033$as_echo "$cross_compiling" >&6; }
4034
4035rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4036ac_clean_files=$ac_clean_files_save
4037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4038$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004039if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 $as_echo_n "(cached) " >&6
4041else
4042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043/* end confdefs.h. */
4044
4045int
4046main ()
4047{
4048
4049 ;
4050 return 0;
4051}
4052_ACEOF
4053rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004054if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004062 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065 for ac_file in conftest.o conftest.obj conftest.*; do
4066 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004067 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004069 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4070 break;;
4071 esac
4072done
4073else
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004075sed 's/^/| /' conftest.$ac_ext >&5
4076
Matthias Kloseb9621712010-04-24 17:59:49 +00004077{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004079as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004081fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004082rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4085$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004086OBJEXT=$ac_cv_objext
4087ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4089$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004090if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004095
Martin v. Löwis11437992002-04-12 09:54:03 +00004096int
4097main ()
4098{
4099#ifndef __GNUC__
4100 choke me
4101#endif
4102
4103 ;
4104 return 0;
4105}
4106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_compiler_gnu=yes
4109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004113ac_cv_c_compiler_gnu=$ac_compiler_gnu
4114
4115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4117$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4118if test $ac_compiler_gnu = yes; then
4119 GCC=yes
4120else
4121 GCC=
4122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004123ac_test_CFLAGS=${CFLAGS+set}
4124ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4126$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004127if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004129else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 ac_save_c_werror_flag=$ac_c_werror_flag
4131 ac_c_werror_flag=yes
4132 ac_cv_prog_cc_g=no
4133 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004136
Martin v. Löwis11437992002-04-12 09:54:03 +00004137int
4138main ()
4139{
4140
4141 ;
4142 return 0;
4143}
4144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004145if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004146 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 CFLAGS=""
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004160if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162else
4163 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166/* end confdefs.h. */
4167
4168int
4169main ()
4170{
4171
4172 ;
4173 return 0;
4174}
4175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004176if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184 ac_c_werror_flag=$ac_save_c_werror_flag
4185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4187$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004188if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004190elif test $ac_cv_prog_cc_g = yes; then
4191 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 CFLAGS="-g -O2"
4193 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004194 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195 fi
4196else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004197 if test "$GCC" = yes; then
4198 CFLAGS="-O2"
4199 else
4200 CFLAGS=
4201 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4204$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004205if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004207else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004209ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
4212#include <stdarg.h>
4213#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004214struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4216struct buf { int x; };
4217FILE * (*rcsopen) (struct buf *, struct stat *, int);
4218static char *e (p, i)
4219 char **p;
4220 int i;
4221{
4222 return p[i];
4223}
4224static char *f (char * (*g) (char **, int), char **p, ...)
4225{
4226 char *s;
4227 va_list v;
4228 va_start (v,p);
4229 s = g (p, va_arg (v,int));
4230 va_end (v);
4231 return s;
4232}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004233
4234/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4235 function prototypes and stuff, but not '\xHH' hex character constants.
4236 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004238 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4239 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004241int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4244 inside strings and character constants. */
4245#define FOO(x) 'x'
4246int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4247
Skip Montanaro6dead952003-09-25 14:50:04 +00004248int test (int i, double x);
4249struct s1 {int (*f) (int a);};
4250struct s2 {int (*f) (double a);};
4251int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4252int argc;
4253char **argv;
4254int
4255main ()
4256{
4257return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4258 ;
4259 return 0;
4260}
4261_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4263 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004264do
4265 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269rm -f core conftest.err conftest.$ac_objext
4270 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004271done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273CC=$ac_save_CC
4274
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276# AC_CACHE_VAL
4277case "x$ac_cv_prog_cc_c89" in
4278 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4280$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4283$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004284 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4287$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004289if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004290
Matthias Kloseb9621712010-04-24 17:59:49 +00004291fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293ac_ext=c
4294ac_cpp='$CPP $CPPFLAGS'
4295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4297ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004299ac_ext=c
4300ac_cpp='$CPP $CPPFLAGS'
4301ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4302ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4303ac_compiler_gnu=$ac_cv_c_compiler_gnu
4304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4305$as_echo_n "checking how to run the C preprocessor... " >&6; }
4306# On Suns, sometimes $CPP names a directory.
4307if test -n "$CPP" && test -d "$CPP"; then
4308 CPP=
4309fi
4310if test -z "$CPP"; then
4311 if ${ac_cv_prog_CPP+:} false; then :
4312 $as_echo_n "(cached) " >&6
4313else
4314 # Double quotes because CPP needs to be expanded
4315 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4316 do
4317 ac_preproc_ok=false
4318for ac_c_preproc_warn_flag in '' yes
4319do
4320 # Use a header file that comes with gcc, so configuring glibc
4321 # with a fresh cross-compiler works.
4322 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4323 # <limits.h> exists even on freestanding compilers.
4324 # On the NeXT, cc -E runs the code through the compiler's parser,
4325 # not just through cpp. "Syntax error" is here to catch this case.
4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327/* end confdefs.h. */
4328#ifdef __STDC__
4329# include <limits.h>
4330#else
4331# include <assert.h>
4332#endif
4333 Syntax error
4334_ACEOF
4335if ac_fn_c_try_cpp "$LINENO"; then :
4336
4337else
4338 # Broken: fails on valid input.
4339continue
4340fi
4341rm -f conftest.err conftest.i conftest.$ac_ext
4342
4343 # OK, works on sane cases. Now check whether nonexistent headers
4344 # can be detected and how.
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346/* end confdefs.h. */
4347#include <ac_nonexistent.h>
4348_ACEOF
4349if ac_fn_c_try_cpp "$LINENO"; then :
4350 # Broken: success on invalid input.
4351continue
4352else
4353 # Passes both tests.
4354ac_preproc_ok=:
4355break
4356fi
4357rm -f conftest.err conftest.i conftest.$ac_ext
4358
4359done
4360# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4361rm -f conftest.i conftest.err conftest.$ac_ext
4362if $ac_preproc_ok; then :
4363 break
4364fi
4365
4366 done
4367 ac_cv_prog_CPP=$CPP
4368
4369fi
4370 CPP=$ac_cv_prog_CPP
4371else
4372 ac_cv_prog_CPP=$CPP
4373fi
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4375$as_echo "$CPP" >&6; }
4376ac_preproc_ok=false
4377for ac_c_preproc_warn_flag in '' yes
4378do
4379 # Use a header file that comes with gcc, so configuring glibc
4380 # with a fresh cross-compiler works.
4381 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4382 # <limits.h> exists even on freestanding compilers.
4383 # On the NeXT, cc -E runs the code through the compiler's parser,
4384 # not just through cpp. "Syntax error" is here to catch this case.
4385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4386/* end confdefs.h. */
4387#ifdef __STDC__
4388# include <limits.h>
4389#else
4390# include <assert.h>
4391#endif
4392 Syntax error
4393_ACEOF
4394if ac_fn_c_try_cpp "$LINENO"; then :
4395
4396else
4397 # Broken: fails on valid input.
4398continue
4399fi
4400rm -f conftest.err conftest.i conftest.$ac_ext
4401
4402 # OK, works on sane cases. Now check whether nonexistent headers
4403 # can be detected and how.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#include <ac_nonexistent.h>
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409 # Broken: success on invalid input.
4410continue
4411else
4412 # Passes both tests.
4413ac_preproc_ok=:
4414break
4415fi
4416rm -f conftest.err conftest.i conftest.$ac_ext
4417
4418done
4419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4420rm -f conftest.i conftest.err conftest.$ac_ext
4421if $ac_preproc_ok; then :
4422
4423else
4424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4426as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4427See \`config.log' for more details" "$LINENO" 5; }
4428fi
4429
4430ac_ext=c
4431ac_cpp='$CPP $CPPFLAGS'
4432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4434ac_compiler_gnu=$ac_cv_c_compiler_gnu
4435
4436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4437$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4438if ${ac_cv_path_GREP+:} false; then :
4439 $as_echo_n "(cached) " >&6
4440else
4441 if test -z "$GREP"; then
4442 ac_path_GREP_found=false
4443 # Loop through the user's path and test for each of PROGNAME-LIST
4444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4446do
4447 IFS=$as_save_IFS
4448 test -z "$as_dir" && as_dir=.
4449 for ac_prog in grep ggrep; do
4450 for ac_exec_ext in '' $ac_executable_extensions; do
4451 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4452 as_fn_executable_p "$ac_path_GREP" || continue
4453# Check for GNU ac_path_GREP and select it if it is found.
4454 # Check for GNU $ac_path_GREP
4455case `"$ac_path_GREP" --version 2>&1` in
4456*GNU*)
4457 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4458*)
4459 ac_count=0
4460 $as_echo_n 0123456789 >"conftest.in"
4461 while :
4462 do
4463 cat "conftest.in" "conftest.in" >"conftest.tmp"
4464 mv "conftest.tmp" "conftest.in"
4465 cp "conftest.in" "conftest.nl"
4466 $as_echo 'GREP' >> "conftest.nl"
4467 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4468 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4469 as_fn_arith $ac_count + 1 && ac_count=$as_val
4470 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4471 # Best one so far, save it but keep looking for a better one
4472 ac_cv_path_GREP="$ac_path_GREP"
4473 ac_path_GREP_max=$ac_count
4474 fi
4475 # 10*(2^10) chars as input seems more than enough
4476 test $ac_count -gt 10 && break
4477 done
4478 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4479esac
4480
4481 $ac_path_GREP_found && break 3
4482 done
4483 done
4484 done
4485IFS=$as_save_IFS
4486 if test -z "$ac_cv_path_GREP"; then
4487 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4488 fi
4489else
4490 ac_cv_path_GREP=$GREP
4491fi
4492
4493fi
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4495$as_echo "$ac_cv_path_GREP" >&6; }
4496 GREP="$ac_cv_path_GREP"
4497
4498
Łukasz Langaa785c872016-09-09 17:37:37 -07004499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4500$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4501if ${ac_cv_path_SED+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4505 for ac_i in 1 2 3 4 5 6 7; do
4506 ac_script="$ac_script$as_nl$ac_script"
4507 done
4508 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4509 { ac_script=; unset ac_script;}
4510 if test -z "$SED"; then
4511 ac_path_SED_found=false
4512 # Loop through the user's path and test for each of PROGNAME-LIST
4513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH
4515do
4516 IFS=$as_save_IFS
4517 test -z "$as_dir" && as_dir=.
4518 for ac_prog in sed gsed; do
4519 for ac_exec_ext in '' $ac_executable_extensions; do
4520 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4521 as_fn_executable_p "$ac_path_SED" || continue
4522# Check for GNU ac_path_SED and select it if it is found.
4523 # Check for GNU $ac_path_SED
4524case `"$ac_path_SED" --version 2>&1` in
4525*GNU*)
4526 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4527*)
4528 ac_count=0
4529 $as_echo_n 0123456789 >"conftest.in"
4530 while :
4531 do
4532 cat "conftest.in" "conftest.in" >"conftest.tmp"
4533 mv "conftest.tmp" "conftest.in"
4534 cp "conftest.in" "conftest.nl"
4535 $as_echo '' >> "conftest.nl"
4536 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4537 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4538 as_fn_arith $ac_count + 1 && ac_count=$as_val
4539 if test $ac_count -gt ${ac_path_SED_max-0}; then
4540 # Best one so far, save it but keep looking for a better one
4541 ac_cv_path_SED="$ac_path_SED"
4542 ac_path_SED_max=$ac_count
4543 fi
4544 # 10*(2^10) chars as input seems more than enough
4545 test $ac_count -gt 10 && break
4546 done
4547 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4548esac
4549
4550 $ac_path_SED_found && break 3
4551 done
4552 done
4553 done
4554IFS=$as_save_IFS
4555 if test -z "$ac_cv_path_SED"; then
4556 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4557 fi
4558else
4559 ac_cv_path_SED=$SED
4560fi
4561
4562fi
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4564$as_echo "$ac_cv_path_SED" >&6; }
4565 SED="$ac_cv_path_SED"
4566 rm -f conftest.sed
4567
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004568
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004569
4570
Matthias Kloseb9621712010-04-24 17:59:49 +00004571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4572$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004574# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004575if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004576 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577
4578 case $withval in
4579 no) with_cxx_main=no
4580 MAINCC='$(CC)';;
4581 yes) with_cxx_main=yes
4582 MAINCC='$(CXX)';;
4583 *) with_cxx_main=yes
4584 MAINCC=$withval
4585 if test -z "$CXX"
4586 then
4587 CXX=$withval
4588 fi;;
4589 esac
4590else
4591
4592 with_cxx_main=no
4593 MAINCC='$(CC)'
4594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595fi
4596
Matthias Kloseb9621712010-04-24 17:59:49 +00004597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4598$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004599
4600preset_cxx="$CXX"
4601if test -z "$CXX"
4602then
4603 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004604 gcc) if test -n "$ac_tool_prefix"; then
4605 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4606set dummy ${ac_tool_prefix}g++; ac_word=$2
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; }
4609if ${ac_cv_path_CXX+:} false; then :
4610 $as_echo_n "(cached) " >&6
4611else
4612 case $CXX in
4613 [\\/]* | ?:[\\/]*)
4614 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4615 ;;
4616 *)
4617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4618for as_dir in notfound
4619do
4620 IFS=$as_save_IFS
4621 test -z "$as_dir" && as_dir=.
4622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4626 break 2
4627 fi
4628done
4629 done
4630IFS=$as_save_IFS
4631
4632 ;;
4633esac
4634fi
4635CXX=$ac_cv_path_CXX
4636if test -n "$CXX"; then
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4638$as_echo "$CXX" >&6; }
4639else
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
4642fi
4643
4644
4645fi
4646if test -z "$ac_cv_path_CXX"; then
4647 ac_pt_CXX=$CXX
4648 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4651$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004652if ${ac_cv_path_ac_pt_CXX+:} false; then :
4653 $as_echo_n "(cached) " >&6
4654else
4655 case $ac_pt_CXX in
4656 [\\/]* | ?:[\\/]*)
4657 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4658 ;;
4659 *)
4660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661for as_dir in notfound
4662do
4663 IFS=$as_save_IFS
4664 test -z "$as_dir" && as_dir=.
4665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004667 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669 break 2
4670 fi
4671done
4672 done
4673IFS=$as_save_IFS
4674
4675 ;;
4676esac
4677fi
4678ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4679if test -n "$ac_pt_CXX"; then
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4681$as_echo "$ac_pt_CXX" >&6; }
4682else
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4684$as_echo "no" >&6; }
4685fi
4686
4687 if test "x$ac_pt_CXX" = x; then
4688 CXX="g++"
4689 else
4690 case $cross_compiling:$ac_tool_warned in
4691yes:)
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4694ac_tool_warned=yes ;;
4695esac
4696 CXX=$ac_pt_CXX
4697 fi
4698else
4699 CXX="$ac_cv_path_CXX"
4700fi
4701 ;;
4702 cc) if test -n "$ac_tool_prefix"; then
4703 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4704set dummy ${ac_tool_prefix}c++; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004707if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004708 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004709else
4710 case $CXX in
4711 [\\/]* | ?:[\\/]*)
4712 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4713 ;;
4714 *)
4715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in notfound
4717do
4718 IFS=$as_save_IFS
4719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724 break 2
4725 fi
4726done
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004728IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004730 ;;
4731esac
4732fi
4733CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004734if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4736$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004737else
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004741
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742
4743fi
4744if test -z "$ac_cv_path_CXX"; then
4745 ac_pt_CXX=$CXX
4746 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 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 +00004756 ;;
4757 *)
4758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in notfound
4760do
4761 IFS=$as_save_IFS
4762 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767 break 2
4768 fi
4769done
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004771IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 ;;
4774esac
4775fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4777if test -n "$ac_pt_CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4779$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780else
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004784
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004785 if test "x$ac_pt_CXX" = x; then
4786 CXX="c++"
4787 else
4788 case $cross_compiling:$ac_tool_warned in
4789yes:)
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4792ac_tool_warned=yes ;;
4793esac
4794 CXX=$ac_pt_CXX
4795 fi
4796else
4797 CXX="$ac_cv_path_CXX"
4798fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800 clang|*/clang) if test -n "$ac_tool_prefix"; then
4801 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4802set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804$as_echo_n "checking for $ac_word... " >&6; }
4805if ${ac_cv_path_CXX+:} false; then :
4806 $as_echo_n "(cached) " >&6
4807else
4808 case $CXX in
4809 [\\/]* | ?:[\\/]*)
4810 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4811 ;;
4812 *)
4813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814for as_dir in notfound
4815do
4816 IFS=$as_save_IFS
4817 test -z "$as_dir" && as_dir=.
4818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004820 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4822 break 2
4823 fi
4824done
4825 done
4826IFS=$as_save_IFS
4827
Ned Deilycbfb9a52012-06-23 16:02:19 -07004828 ;;
4829esac
4830fi
4831CXX=$ac_cv_path_CXX
4832if test -n "$CXX"; then
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4834$as_echo "$CXX" >&6; }
4835else
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4837$as_echo "no" >&6; }
4838fi
4839
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840
4841fi
4842if test -z "$ac_cv_path_CXX"; then
4843 ac_pt_CXX=$CXX
4844 # Extract the first word of "clang++", so it can be a program name with args.
4845set dummy clang++; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
4848if ${ac_cv_path_ac_pt_CXX+:} false; then :
4849 $as_echo_n "(cached) " >&6
4850else
4851 case $ac_pt_CXX in
4852 [\\/]* | ?:[\\/]*)
4853 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4854 ;;
4855 *)
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in notfound
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
4861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865 break 2
4866 fi
4867done
4868 done
4869IFS=$as_save_IFS
4870
4871 ;;
4872esac
4873fi
4874ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4875if test -n "$ac_pt_CXX"; then
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4877$as_echo "$ac_pt_CXX" >&6; }
4878else
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
4881fi
4882
4883 if test "x$ac_pt_CXX" = x; then
4884 CXX="clang++"
4885 else
4886 case $cross_compiling:$ac_tool_warned in
4887yes:)
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4889$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4890ac_tool_warned=yes ;;
4891esac
4892 CXX=$ac_pt_CXX
4893 fi
4894else
4895 CXX="$ac_cv_path_CXX"
4896fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004898 icc|*/icc) if test -n "$ac_tool_prefix"; then
4899 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4900set dummy ${ac_tool_prefix}icpc; ac_word=$2
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4902$as_echo_n "checking for $ac_word... " >&6; }
4903if ${ac_cv_path_CXX+:} false; then :
4904 $as_echo_n "(cached) " >&6
4905else
4906 case $CXX in
4907 [\\/]* | ?:[\\/]*)
4908 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4909 ;;
4910 *)
4911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4912for as_dir in notfound
4913do
4914 IFS=$as_save_IFS
4915 test -z "$as_dir" && as_dir=.
4916 for ac_exec_ext in '' $ac_executable_extensions; do
4917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4918 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4920 break 2
4921 fi
4922done
4923 done
4924IFS=$as_save_IFS
4925
4926 ;;
4927esac
4928fi
4929CXX=$ac_cv_path_CXX
4930if test -n "$CXX"; then
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4932$as_echo "$CXX" >&6; }
4933else
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4935$as_echo "no" >&6; }
4936fi
4937
4938
4939fi
4940if test -z "$ac_cv_path_CXX"; then
4941 ac_pt_CXX=$CXX
4942 # Extract the first word of "icpc", so it can be a program name with args.
4943set dummy icpc; ac_word=$2
4944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if ${ac_cv_path_ac_pt_CXX+:} false; then :
4947 $as_echo_n "(cached) " >&6
4948else
4949 case $ac_pt_CXX in
4950 [\\/]* | ?:[\\/]*)
4951 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4952 ;;
4953 *)
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in notfound
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4961 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966 done
4967IFS=$as_save_IFS
4968
4969 ;;
4970esac
4971fi
4972ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4973if test -n "$ac_pt_CXX"; then
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4975$as_echo "$ac_pt_CXX" >&6; }
4976else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
4981 if test "x$ac_pt_CXX" = x; then
4982 CXX="icpc"
4983 else
4984 case $cross_compiling:$ac_tool_warned in
4985yes:)
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4987$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4988ac_tool_warned=yes ;;
4989esac
4990 CXX=$ac_pt_CXX
4991 fi
4992else
4993 CXX="$ac_cv_path_CXX"
4994fi
4995 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004996 esac
4997 if test "$CXX" = "notfound"
4998 then
4999 CXX=""
5000 fi
5001fi
5002if test -z "$CXX"
5003then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005004 if test -n "$ac_tool_prefix"; then
5005 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5006 do
5007 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005011if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005013else
5014 if test -n "$CXX"; then
5015 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5016else
5017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020 IFS=$as_save_IFS
5021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005024 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005026 break 2
5027 fi
5028done
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005031
5032fi
5033fi
5034CXX=$ac_cv_prog_CXX
5035if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5037$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005038else
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005041fi
5042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005044 test -n "$CXX" && break
5045 done
5046fi
5047if test -z "$CXX"; then
5048 ac_ct_CXX=$CXX
5049 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5050do
5051 # Extract the first word of "$ac_prog", so it can be a program name with args.
5052set dummy $ac_prog; ac_word=$2
5053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054$as_echo_n "checking for $ac_word... " >&6; }
5055if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5056 $as_echo_n "(cached) " >&6
5057else
5058 if test -n "$ac_ct_CXX"; then
5059 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5060else
5061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062for as_dir in $PATH
5063do
5064 IFS=$as_save_IFS
5065 test -z "$as_dir" && as_dir=.
5066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 ac_cv_prog_ac_ct_CXX="$ac_prog"
5069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5070 break 2
5071 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005073 done
5074IFS=$as_save_IFS
5075
5076fi
5077fi
5078ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5079if test -n "$ac_ct_CXX"; then
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5081$as_echo "$ac_ct_CXX" >&6; }
5082else
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084$as_echo "no" >&6; }
5085fi
5086
5087
5088 test -n "$ac_ct_CXX" && break
5089done
5090
5091 if test "x$ac_ct_CXX" = x; then
5092 CXX="notfound"
5093 else
5094 case $cross_compiling:$ac_tool_warned in
5095yes:)
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5098ac_tool_warned=yes ;;
5099esac
5100 CXX=$ac_ct_CXX
5101 fi
5102fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005103
5104 if test "$CXX" = "notfound"
5105 then
5106 CXX=""
5107 fi
5108fi
5109if test "$preset_cxx" != "$CXX"
5110then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005111 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112
5113 By default, distutils will build C++ extension modules with \"$CXX\".
5114 If this is not intended, then set CXX on the configure command line.
5115 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005116$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117
5118 By default, distutils will build C++ extension modules with \"$CXX\".
5119 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005120 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121fi
5122
5123
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005124MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5125
5126
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5128$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5129cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005130#undef bfin
5131#undef cris
5132#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005133#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005134#undef hppa
5135#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005136#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005137#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005138#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005139#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005141#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005142 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005143#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144# if defined(__x86_64__) && defined(__LP64__)
5145 x86_64-linux-gnu
5146# elif defined(__x86_64__) && defined(__ILP32__)
5147 x86_64-linux-gnux32
5148# elif defined(__i386__)
5149 i386-linux-gnu
5150# elif defined(__aarch64__) && defined(__AARCH64EL__)
5151# if defined(__ILP32__)
5152 aarch64_ilp32-linux-gnu
5153# else
5154 aarch64-linux-gnu
5155# endif
5156# elif defined(__aarch64__) && defined(__AARCH64EB__)
5157# if defined(__ILP32__)
5158 aarch64_be_ilp32-linux-gnu
5159# else
5160 aarch64_be-linux-gnu
5161# endif
5162# elif defined(__alpha__)
5163 alpha-linux-gnu
5164# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5165# if defined(__ARMEL__)
5166 arm-linux-gnueabihf
5167# else
5168 armeb-linux-gnueabihf
5169# endif
5170# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5171# if defined(__ARMEL__)
5172 arm-linux-gnueabi
5173# else
5174 armeb-linux-gnueabi
5175# endif
5176# elif defined(__hppa__)
5177 hppa-linux-gnu
5178# elif defined(__ia64__)
5179 ia64-linux-gnu
5180# elif defined(__m68k__) && !defined(__mcoldfire__)
5181 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005182# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5183# if _MIPS_SIM == _ABIO32
5184 mipsisa32r6el-linux-gnu
5185# elif _MIPS_SIM == _ABIN32
5186 mipsisa64r6el-linux-gnuabin32
5187# elif _MIPS_SIM == _ABI64
5188 mipsisa64r6el-linux-gnuabi64
5189# else
5190# error unknown platform triplet
5191# endif
5192# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5193# if _MIPS_SIM == _ABIO32
5194 mipsisa32r6-linux-gnu
5195# elif _MIPS_SIM == _ABIN32
5196 mipsisa64r6-linux-gnuabin32
5197# elif _MIPS_SIM == _ABI64
5198 mipsisa64r6-linux-gnuabi64
5199# else
5200# error unknown platform triplet
5201# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005202# elif defined(__mips_hard_float) && defined(_MIPSEL)
5203# if _MIPS_SIM == _ABIO32
5204 mipsel-linux-gnu
5205# elif _MIPS_SIM == _ABIN32
5206 mips64el-linux-gnuabin32
5207# elif _MIPS_SIM == _ABI64
5208 mips64el-linux-gnuabi64
5209# else
5210# error unknown platform triplet
5211# endif
5212# elif defined(__mips_hard_float)
5213# if _MIPS_SIM == _ABIO32
5214 mips-linux-gnu
5215# elif _MIPS_SIM == _ABIN32
5216 mips64-linux-gnuabin32
5217# elif _MIPS_SIM == _ABI64
5218 mips64-linux-gnuabi64
5219# else
5220# error unknown platform triplet
5221# endif
5222# elif defined(__or1k__)
5223 or1k-linux-gnu
5224# elif defined(__powerpc__) && defined(__SPE__)
5225 powerpc-linux-gnuspe
5226# elif defined(__powerpc64__)
5227# if defined(__LITTLE_ENDIAN__)
5228 powerpc64le-linux-gnu
5229# else
5230 powerpc64-linux-gnu
5231# endif
5232# elif defined(__powerpc__)
5233 powerpc-linux-gnu
5234# elif defined(__s390x__)
5235 s390x-linux-gnu
5236# elif defined(__s390__)
5237 s390-linux-gnu
5238# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5239 sh4-linux-gnu
5240# elif defined(__sparc__) && defined(__arch64__)
5241 sparc64-linux-gnu
5242# elif defined(__sparc__)
5243 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005244# elif defined(__riscv)
5245# if __riscv_xlen == 32
5246 riscv32-linux-gnu
5247# elif __riscv_xlen == 64
5248 riscv64-linux-gnu
5249# else
5250# error unknown platform triplet
5251# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005252# else
5253# error unknown platform triplet
5254# endif
5255#elif defined(__FreeBSD_kernel__)
5256# if defined(__LP64__)
5257 x86_64-kfreebsd-gnu
5258# elif defined(__i386__)
5259 i386-kfreebsd-gnu
5260# else
5261# error unknown platform triplet
5262# endif
5263#elif defined(__gnu_hurd__)
5264 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005265#elif defined(__APPLE__)
5266 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005267#else
5268# error unknown platform triplet
5269#endif
5270
5271EOF
5272
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005273if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5276$as_echo "$PLATFORM_TRIPLET" >&6; }
5277else
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5279$as_echo "none" >&6; }
5280fi
5281rm -f conftest.c conftest.out
5282
5283if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5284 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5285 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5286 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005287elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5288 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005289fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005290
doko@ubuntu.com55532312016-06-14 08:55:19 +02005291if test x$MULTIARCH != x; then
5292 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5293fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294
5295
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5297$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5298save_LDFLAGS="$LDFLAGS"
5299LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005300
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5302/* end confdefs.h. */
5303
5304int
5305main ()
5306{
5307
5308 ;
5309 return 0;
5310}
5311_ACEOF
5312if ac_fn_c_try_link "$LINENO"; then :
5313 NO_AS_NEEDED="-Wl,--no-as-needed"
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5315$as_echo "yes" >&6; }
5316else
5317 NO_AS_NEEDED=""
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5319$as_echo "no" >&6; }
5320fi
5321rm -f core conftest.err conftest.$ac_objext \
5322 conftest$ac_exeext conftest.$ac_ext
5323LDFLAGS="$save_LDFLAGS"
5324
5325
5326
5327# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005328
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5330$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005331if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005332 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005333else
5334 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5335 then ac_cv_path_EGREP="$GREP -E"
5336 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005337 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005338 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005339 # Loop through the user's path and test for each of PROGNAME-LIST
5340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005341for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5342do
5343 IFS=$as_save_IFS
5344 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005345 for ac_prog in egrep; do
5346 for ac_exec_ext in '' $ac_executable_extensions; do
5347 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005348 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005349# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005350 # Check for GNU $ac_path_EGREP
5351case `"$ac_path_EGREP" --version 2>&1` in
5352*GNU*)
5353 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5354*)
5355 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357 while :
5358 do
5359 cat "conftest.in" "conftest.in" >"conftest.tmp"
5360 mv "conftest.tmp" "conftest.in"
5361 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5364 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5367 # Best one so far, save it but keep looking for a better one
5368 ac_cv_path_EGREP="$ac_path_EGREP"
5369 ac_path_EGREP_max=$ac_count
5370 fi
5371 # 10*(2^10) chars as input seems more than enough
5372 test $ac_count -gt 10 && break
5373 done
5374 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5375esac
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 $ac_path_EGREP_found && break 3
5378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005383 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 +00005384 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385else
5386 ac_cv_path_EGREP=$EGREP
5387fi
5388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 fi
5390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5392$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005394
5395
Matthias Kloseb9621712010-04-24 17:59:49 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5397$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005398if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 $as_echo_n "(cached) " >&6
5400else
5401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005402/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005403#include <stdlib.h>
5404#include <stdarg.h>
5405#include <string.h>
5406#include <float.h>
5407
5408int
5409main ()
5410{
5411
5412 ;
5413 return 0;
5414}
5415_ACEOF
5416if ac_fn_c_try_compile "$LINENO"; then :
5417 ac_cv_header_stdc=yes
5418else
5419 ac_cv_header_stdc=no
5420fi
5421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5422
5423if test $ac_cv_header_stdc = yes; then
5424 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426/* end confdefs.h. */
5427#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005428
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005429_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005433else
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005436rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005437
Matthias Kloseb9621712010-04-24 17:59:49 +00005438fi
5439
5440if test $ac_cv_header_stdc = yes; then
5441 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5443/* end confdefs.h. */
5444#include <stdlib.h>
5445
5446_ACEOF
5447if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5448 $EGREP "free" >/dev/null 2>&1; then :
5449
5450else
5451 ac_cv_header_stdc=no
5452fi
5453rm -f conftest*
5454
5455fi
5456
5457if test $ac_cv_header_stdc = yes; then
5458 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5459 if test "$cross_compiling" = yes; then :
5460 :
5461else
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h. */
5464#include <ctype.h>
5465#include <stdlib.h>
5466#if ((' ' & 0x0FF) == 0x020)
5467# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5468# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5469#else
5470# define ISLOWER(c) \
5471 (('a' <= (c) && (c) <= 'i') \
5472 || ('j' <= (c) && (c) <= 'r') \
5473 || ('s' <= (c) && (c) <= 'z'))
5474# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5475#endif
5476
5477#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5478int
5479main ()
5480{
5481 int i;
5482 for (i = 0; i < 256; i++)
5483 if (XOR (islower (i), ISLOWER (i))
5484 || toupper (i) != TOUPPER (i))
5485 return 2;
5486 return 0;
5487}
5488_ACEOF
5489if ac_fn_c_try_run "$LINENO"; then :
5490
5491else
5492 ac_cv_header_stdc=no
5493fi
5494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5495 conftest.$ac_objext conftest.beam conftest.$ac_ext
5496fi
5497
5498fi
5499fi
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5501$as_echo "$ac_cv_header_stdc" >&6; }
5502if test $ac_cv_header_stdc = yes; then
5503
5504$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5505
5506fi
5507
5508# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5509for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5510 inttypes.h stdint.h unistd.h
5511do :
5512 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5513ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5514"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005515if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005516 cat >>confdefs.h <<_ACEOF
5517#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5518_ACEOF
5519
5520fi
5521
5522done
5523
5524
5525
5526 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 +02005527if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 MINIX=yes
5529else
5530 MINIX=
5531fi
5532
5533
5534 if test "$MINIX" = yes; then
5535
5536$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5537
5538
5539$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5540
5541
5542$as_echo "#define _MINIX 1" >>confdefs.h
5543
5544 fi
5545
5546
5547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5548$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005549if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005550 $as_echo_n "(cached) " >&6
5551else
5552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5553/* end confdefs.h. */
5554
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005555# define __EXTENSIONS__ 1
5556 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005557int
5558main ()
5559{
5560
5561 ;
5562 return 0;
5563}
5564_ACEOF
5565if ac_fn_c_try_compile "$LINENO"; then :
5566 ac_cv_safe_to_define___extensions__=yes
5567else
5568 ac_cv_safe_to_define___extensions__=no
5569fi
5570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5571fi
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5573$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5574 test $ac_cv_safe_to_define___extensions__ = yes &&
5575 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5576
5577 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5578
5579 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5580
5581 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5582
5583 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5584
5585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586
Xavier de Gaye95750b12016-07-09 11:05:42 +02005587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5588$as_echo_n "checking for the Android API level... " >&6; }
5589cat >> conftest.c <<EOF
5590#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005591android_api = __ANDROID_API__
5592arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005593#else
5594#error not Android
5595#endif
5596EOF
5597
5598if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005599 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5600 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5602$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005603 if test -z "$ANDROID_API_LEVEL"; then
5604 echo 'Fatal: you must define __ANDROID_API__'
5605 exit 1
5606 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005607
5608cat >>confdefs.h <<_ACEOF
5609#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5610_ACEOF
5611
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5614$as_echo_n "checking for the Android arm ABI... " >&6; }
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5616$as_echo "$_arm_arch" >&6; }
5617 if test "$_arm_arch" = 7; then
5618 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5619 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5620 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005621else
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5623$as_echo "not Android" >&6; }
5624fi
5625rm -f conftest.c conftest.out
5626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627# Check for unsupported systems
5628case $ac_sys_system/$ac_sys_release in
5629atheos*|Linux*/1*)
5630 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5631 echo See README for details.
5632 exit 1;;
5633esac
5634
5635
Matthias Kloseb9621712010-04-24 17:59:49 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5637$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
5639# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005640if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641 withval=$with_suffix;
5642 case $withval in
5643 no) EXEEXT=;;
5644 yes) EXEEXT=.exe;;
5645 *) EXEEXT=$withval;;
5646 esac
5647fi
5648
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5650$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652# Test whether we're running on a non-case-sensitive system, in which
5653# case we give a warning if no ext is given
5654
Matthias Kloseb9621712010-04-24 17:59:49 +00005655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5656$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657if test ! -d CaseSensitiveTestDir; then
5658mkdir CaseSensitiveTestDir
5659fi
5660
5661if test -d casesensitivetestdir
5662then
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5664$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 BUILDEXEEXT=.exe
5666else
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 BUILDEXEEXT=$EXEEXT
5670fi
5671rmdir CaseSensitiveTestDir
5672
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673case $ac_sys_system in
5674hp*|HP*)
5675 case $CC in
5676 cc|*/cc) CC="$CC -Ae";;
5677 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678esac
5679
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5682$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683if test -z "$LIBRARY"
5684then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005685 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5688$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# LDLIBRARY is the name of the library to link against (as opposed to the
5691# name of the library into which to insert object files). BLDLIBRARY is also
5692# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5693# is blank as the main program is not linked directly against LDLIBRARY.
5694# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5695# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5696# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5697# DLLLIBRARY is the shared (i.e., DLL) library.
5698#
5699# RUNSHARED is used to run shared python without installed libraries
5700#
5701# INSTSONAME is the name of the shared library that will be use to install
5702# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005703#
5704# LDVERSION is the shared library version number, normally the Python version
5705# with the ABI build flags appended.
5706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708
5709
5710
5711
5712
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714LDLIBRARY="$LIBRARY"
5715BLDLIBRARY='$(LDLIBRARY)'
5716INSTSONAME='$(LDLIBRARY)'
5717DLLLIBRARY=''
5718LDLIBRARYDIR=''
5719RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005720LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# LINKCC is the command that links the python executable -- default is $(CC).
5723# If CXX is set, and if it is needed to link a main function that was
5724# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5725# python might then depend on the C++ runtime
5726# This is altered for AIX in order to build the export list before
5727# linking.
5728
Matthias Kloseb9621712010-04-24 17:59:49 +00005729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5730$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731if test -z "$LINKCC"
5732then
5733 LINKCC='$(PURIFY) $(MAINCC)'
5734 case $ac_sys_system in
5735 AIX*)
5736 exp_extra="\"\""
5737 if test $ac_sys_release -ge 5 -o \
5738 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5739 exp_extra="."
5740 fi
5741 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 QNX*)
5743 # qcc must be used because the other compilers do not
5744 # support -N.
5745 LINKCC=qcc;;
5746 esac
5747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5749$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5752# make sure we default having it set to "no": this is used by
5753# distutils.unixccompiler to know if it should add --enable-new-dtags
5754# to linker command lines, and failing to detect GNU ld simply results
5755# in the same bahaviour as before.
5756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5758$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759ac_prog=ld
5760if test "$GCC" = yes; then
5761 ac_prog=`$CC -print-prog-name=ld`
5762fi
5763case `"$ac_prog" -V 2>&1 < /dev/null` in
5764 *GNU*)
5765 GNULD=yes;;
5766 *)
5767 GNULD=no;;
5768esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5770$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5773$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005775if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776 enableval=$enable_shared;
5777fi
5778
5779
5780if test -z "$enable_shared"
5781then
5782 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005783 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784 enable_shared="yes";;
5785 *)
5786 enable_shared="no";;
5787 esac
5788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5790$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5793$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005795if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005796 enableval=$enable_profiling;
5797fi
5798
5799if test "x$enable_profiling" = xyes; then
5800 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005801 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803/* end confdefs.h. */
5804int main() { return 0; }
5805_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005806if ac_fn_c_try_link "$LINENO"; then :
5807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005809 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005811rm -f core conftest.err conftest.$ac_objext \
5812 conftest$ac_exeext conftest.$ac_ext
5813 CC="$ac_save_cc"
5814else
5815 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5818$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
doko@ubuntu.comba015832012-06-30 16:52:05 +02005820if test "x$enable_profiling" = xyes; then
5821 BASECFLAGS="-pg $BASECFLAGS"
5822 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823fi
5824
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5826$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827
5828# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5829# library that we build, but we do not want to link against it (we
5830# will find it with a -framework option). For this reason there is an
5831# extra variable BLDLIBRARY against which Python and the extension
5832# modules are linked, BLDLIBRARY. This is normally the same as
5833# LDLIBRARY, but empty for MacOSX framework builds.
5834if test "$enable_framework"
5835then
5836 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005837 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 BLDLIBRARY=''
5839else
5840 BLDLIBRARY='$(LDLIBRARY)'
5841fi
5842
5843# Other platforms follow
5844if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005845 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
Matthias Kloseb9621712010-04-24 17:59:49 +00005847$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848
5849 case $ac_sys_system in
5850 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005851 LDLIBRARY='libpython$(LDVERSION).dll.a'
5852 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 ;;
5854 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005855 LDLIBRARY='libpython$(LDVERSION).so'
5856 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005857 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005859 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005860 then
5861 PY3LIBRARY=libpython3.so
5862 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005864 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005865 LDLIBRARY='libpython$(LDVERSION).so'
5866 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005867 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005869 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005870 then
5871 PY3LIBRARY=libpython3.so
5872 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ;;
5874 hp*|HP*)
5875 case `uname -m` in
5876 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ;;
5879 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005880 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 ;;
5882 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005884 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005887 LDLIBRARY='libpython$(LDVERSION).dylib'
5888 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005889 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005891 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005893 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005894 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
5896 esac
5897else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005898 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 case $ac_sys_system in
5900 CYGWIN*)
5901 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 esac
5905fi
5906
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005907if test "$cross_compiling" = yes; then
5908 RUNSHARED=
5909fi
5910
Matthias Kloseb9621712010-04-24 17:59:49 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5912$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005915if test -n "$ac_tool_prefix"; then
5916 for ac_prog in ar aal
5917 do
5918 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005922if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924else
5925 if test -n "$AR"; then
5926 ac_cv_prog_AR="$AR" # Let the user override the test.
5927else
5928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929for as_dir in $PATH
5930do
5931 IFS=$as_save_IFS
5932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005935 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 break 2
5938 fi
5939done
Matthias Kloseb9621712010-04-24 17:59:49 +00005940 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941IFS=$as_save_IFS
5942
5943fi
5944fi
5945AR=$ac_cv_prog_AR
5946if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5948$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
Matthias Kloseb9621712010-04-24 17:59:49 +00005950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952fi
5953
5954
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005955 test -n "$AR" && break
5956 done
5957fi
5958if test -z "$AR"; then
5959 ac_ct_AR=$AR
5960 for ac_prog in ar aal
5961do
5962 # Extract the first word of "$ac_prog", so it can be a program name with args.
5963set dummy $ac_prog; ac_word=$2
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5965$as_echo_n "checking for $ac_word... " >&6; }
5966if ${ac_cv_prog_ac_ct_AR+:} false; then :
5967 $as_echo_n "(cached) " >&6
5968else
5969 if test -n "$ac_ct_AR"; then
5970 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5971else
5972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5973for as_dir in $PATH
5974do
5975 IFS=$as_save_IFS
5976 test -z "$as_dir" && as_dir=.
5977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005979 ac_cv_prog_ac_ct_AR="$ac_prog"
5980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5981 break 2
5982 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005984 done
5985IFS=$as_save_IFS
5986
5987fi
5988fi
5989ac_ct_AR=$ac_cv_prog_ac_ct_AR
5990if test -n "$ac_ct_AR"; then
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5992$as_echo "$ac_ct_AR" >&6; }
5993else
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
5996fi
5997
5998
5999 test -n "$ac_ct_AR" && break
6000done
6001
6002 if test "x$ac_ct_AR" = x; then
6003 AR="ar"
6004 else
6005 case $cross_compiling:$ac_tool_warned in
6006yes:)
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6009ac_tool_warned=yes ;;
6010esac
6011 AR=$ac_ct_AR
6012 fi
6013fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014
6015
6016# tweak ARFLAGS only if the user didn't set it on the command line
6017
6018if test -z "$ARFLAGS"
6019then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006020 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021fi
6022
doko@ubuntu.com58844492012-06-30 18:25:32 +02006023if test -n "$ac_tool_prefix"; then
6024 for ac_prog in readelf
6025 do
6026 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6029$as_echo_n "checking for $ac_word... " >&6; }
6030if ${ac_cv_prog_READELF+:} false; then :
6031 $as_echo_n "(cached) " >&6
6032else
6033 if test -n "$READELF"; then
6034 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6035else
6036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6037for as_dir in $PATH
6038do
6039 IFS=$as_save_IFS
6040 test -z "$as_dir" && as_dir=.
6041 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006043 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6045 break 2
6046 fi
6047done
6048 done
6049IFS=$as_save_IFS
6050
6051fi
6052fi
6053READELF=$ac_cv_prog_READELF
6054if test -n "$READELF"; then
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6056$as_echo "$READELF" >&6; }
6057else
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063 test -n "$READELF" && break
6064 done
6065fi
6066if test -z "$READELF"; then
6067 ac_ct_READELF=$READELF
6068 for ac_prog in readelf
6069do
6070 # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6075 $as_echo_n "(cached) " >&6
6076else
6077 if test -n "$ac_ct_READELF"; then
6078 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
6085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006087 ac_cv_prog_ac_ct_READELF="$ac_prog"
6088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089 break 2
6090 fi
6091done
6092 done
6093IFS=$as_save_IFS
6094
6095fi
6096fi
6097ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6098if test -n "$ac_ct_READELF"; then
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6100$as_echo "$ac_ct_READELF" >&6; }
6101else
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107 test -n "$ac_ct_READELF" && break
6108done
6109
6110 if test "x$ac_ct_READELF" = x; then
6111 READELF=":"
6112 else
6113 case $cross_compiling:$ac_tool_warned in
6114yes:)
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6117ac_tool_warned=yes ;;
6118esac
6119 READELF=$ac_ct_READELF
6120 fi
6121fi
6122
6123if test "$cross_compiling" = yes; then
6124 case "$READELF" in
6125 readelf|:)
6126 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6127 ;;
6128 esac
6129fi
6130
6131
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006134hp*|HP*)
6135 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136 if test -z "$INSTALL"
6137 then
6138 INSTALL="${srcdir}/install-sh -c"
6139 fi
6140esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141# Find a good install program. We prefer a C program (faster),
6142# so one script is as good as another. But avoid the broken or
6143# incompatible versions:
6144# SysV /etc/install, /usr/sbin/install
6145# SunOS /usr/etc/install
6146# IRIX /sbin/install
6147# AIX /bin/install
6148# AmigaOS /C/install, which installs bootblocks on floppy discs
6149# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6150# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6151# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6152# OS/2's system install, which has a completely different semantic
6153# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006154# Reject install programs that cannot install multiple files.
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6156$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006158if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006159 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160else
6161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH
6163do
6164 IFS=$as_save_IFS
6165 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 # Account for people who put trailing slashes in PATH elements.
6167case $as_dir/ in #((
6168 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171 /usr/ucb/* ) ;;
6172 *)
6173 # OSF1 and SCO ODT 3.0 have their own names for install.
6174 # Don't use installbsd from OSF since it installs stuff as root
6175 # by default.
6176 for ac_prog in ginstall scoinst install; do
6177 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006178 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179 if test $ac_prog = install &&
6180 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6181 # AIX install. It has an incompatible calling convention.
6182 :
6183 elif test $ac_prog = install &&
6184 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6185 # program-specific install script used by HP pwplus--don't use.
6186 :
6187 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006188 rm -rf conftest.one conftest.two conftest.dir
6189 echo one > conftest.one
6190 echo two > conftest.two
6191 mkdir conftest.dir
6192 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6193 test -s conftest.one && test -s conftest.two &&
6194 test -s conftest.dir/conftest.one &&
6195 test -s conftest.dir/conftest.two
6196 then
6197 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6198 break 3
6199 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 fi
6201 fi
6202 done
6203 done
6204 ;;
6205esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006206
6207 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208IFS=$as_save_IFS
6209
Matthias Kloseb9621712010-04-24 17:59:49 +00006210rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
6212fi
6213 if test "${ac_cv_path_install+set}" = set; then
6214 INSTALL=$ac_cv_path_install
6215 else
6216 # As a last resort, use the slow shell script. Don't cache a
6217 # value for INSTALL within a source directory, because that will
6218 # break other packages using the cache if that directory is
6219 # removed, or if the value is a relative name.
6220 INSTALL=$ac_install_sh
6221 fi
6222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6224$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225
6226# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6227# It thinks the first close brace ends the variable substitution.
6228test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6229
6230test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6231
6232test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6233
Matthias Klose93a0ef12012-03-15 18:08:34 +01006234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6235$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6236if test -z "$MKDIR_P"; then
6237 if ${ac_cv_path_mkdir+:} false; then :
6238 $as_echo_n "(cached) " >&6
6239else
6240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6241for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6242do
6243 IFS=$as_save_IFS
6244 test -z "$as_dir" && as_dir=.
6245 for ac_prog in mkdir gmkdir; do
6246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006247 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006248 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6249 'mkdir (GNU coreutils) '* | \
6250 'mkdir (coreutils) '* | \
6251 'mkdir (fileutils) '4.1*)
6252 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6253 break 3;;
6254 esac
6255 done
6256 done
6257 done
6258IFS=$as_save_IFS
6259
6260fi
6261
6262 test -d ./--version && rmdir ./--version
6263 if test "${ac_cv_path_mkdir+set}" = set; then
6264 MKDIR_P="$ac_cv_path_mkdir -p"
6265 else
6266 # As a last resort, use the slow shell script. Don't cache a
6267 # value for MKDIR_P within a source directory, because that will
6268 # break other packages using the cache if that directory is
6269 # removed, or if the value is a relative name.
6270 MKDIR_P="$ac_install_sh -d"
6271 fi
6272fi
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6274$as_echo "$MKDIR_P" >&6; }
6275
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276
6277# Not every filesystem supports hard links
6278
6279if test -z "$LN" ; then
6280 case $ac_sys_system in
6281 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282 *) LN=ln;;
6283 esac
6284fi
6285
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006286# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006287
6288ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6292$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293
6294# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006295if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296 withval=$with_pydebug;
6297if test "$withval" != no
6298then
6299
Matthias Kloseb9621712010-04-24 17:59:49 +00006300$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301
Matthias Kloseb9621712010-04-24 17:59:49 +00006302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6303$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006305 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006306else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308fi
6309else
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312fi
6313
6314
T. Woutersddbfa2c2017-05-23 01:30:49 +02006315# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6316# the ABI. This allows enabling assertions without changing the ABI.
6317assertions='false'
6318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6319$as_echo_n "checking for --with-assertions... " >&6; }
6320
6321# Check whether --with-assertions was given.
6322if test "${with_assertions+set}" = set; then :
6323 withval=$with_assertions;
6324if test "$withval" != no
6325then
6326 assertions='true'
6327fi
6328fi
6329
6330if test "$assertions" = 'true'; then
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6332$as_echo "yes" >&6; }
6333elif test "$Py_DEBUG" = 'true'; then
6334 assertions='true'
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6336$as_echo "implied by --with-pydebug" >&6; }
6337else
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }
6340fi
6341
Brett Cannon63d98bc2016-09-06 17:12:40 -07006342# Enable optimization flags
6343
6344
6345Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6347$as_echo_n "checking for --enable-optimizations... " >&6; }
6348# Check whether --enable-optimizations was given.
6349if test "${enable_optimizations+set}" = set; then :
6350 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006351if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006352then
6353 Py_OPT='true'
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6355$as_echo "yes" >&6; };
6356else
6357 Py_OPT='false'
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; };
6360fi
6361else
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
6364fi
6365
6366if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006367 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6368 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006369 # 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 +00006370 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006371 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006372 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006373 DEF_MAKE_RULE="build_all"
6374else
6375 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006376 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006377 DEF_MAKE_RULE="all"
6378fi
6379
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006380# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6382$as_echo_n "checking for --with-lto... " >&6; }
6383
6384# Check whether --with-lto was given.
6385if test "${with_lto+set}" = set; then :
6386 withval=$with_lto;
6387if test "$withval" != no
6388then
6389 Py_LTO='true'
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6391$as_echo "yes" >&6; };
6392else
6393 Py_LTO='false'
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; };
6396fi
6397else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
6402if test "$Py_LTO" = 'true' ; then
6403 case $CC in
6404 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006405 case $ac_sys_system in
6406 Darwin*)
6407 # Any changes made here should be reflected in the GCC+Darwin case below
6408 LTOFLAGS="-flto -Wl,-export_dynamic"
6409 ;;
6410 *)
6411 LTOFLAGS="-flto"
6412 ;;
6413 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006414 ;;
6415 *gcc*)
6416 case $ac_sys_system in
6417 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006418 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006419 ;;
6420 *)
6421 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6422 ;;
6423 esac
6424 ;;
6425 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006426
6427 if test "$ac_cv_prog_cc_g" = "yes"
6428 then
6429 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6430 # to get debug symbols.
6431 LTOFLAGS="$LTOFLAGS -g"
6432 fi
6433
octaviansoldea4c814012017-09-08 12:14:33 -07006434 CFLAGS="$CFLAGS $LTOFLAGS"
6435 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006436fi
6437
Brett Cannon7188a3e2015-09-18 15:13:44 -07006438# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006439
6440
6441
6442
6443
Gregory P. Smith799520c2016-09-07 16:10:00 -07006444# Make this work on systems where llvm tools are not installed with their
6445# normal names in the default $PATH (ie: Ubuntu). They exist under the
6446# non-suffixed name in their versioned llvm directory.
6447llvm_bin_dir=''
6448llvm_path="${PATH}"
6449if test "${CC}" = "clang"
6450then
6451 clang_bin=`which clang`
6452 # Some systems install clang elsewhere as a symlink to the real path
6453 # which is where the related llvm tools are located.
6454 if test -L "${clang_bin}"
6455 then
6456 clang_dir=`dirname "${clang_bin}"`
6457 clang_bin=`readlink "${clang_bin}"`
6458 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6459 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6460 fi
6461fi
Zachary Ware5af85642015-12-21 12:09:17 -06006462
Gregory P. Smith799520c2016-09-07 16:10:00 -07006463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6464$as_echo_n "checking target system type... " >&6; }
6465if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006466 $as_echo_n "(cached) " >&6
6467else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006468 if test "x$target_alias" = x; then
6469 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006470else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006471 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6472 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6473fi
6474
6475fi
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6477$as_echo "$ac_cv_target" >&6; }
6478case $ac_cv_target in
6479*-*-*) ;;
6480*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6481esac
6482target=$ac_cv_target
6483ac_save_IFS=$IFS; IFS='-'
6484set x $ac_cv_target
6485shift
6486target_cpu=$1
6487target_vendor=$2
6488shift; shift
6489# Remember, the first character of IFS is used to create $*,
6490# except with old shells:
6491target_os=$*
6492IFS=$ac_save_IFS
6493case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6494
6495
6496# The aliases save the names the user supplied, while $host etc.
6497# will get canonicalized.
6498test -n "$target_alias" &&
6499 test "$program_prefix$program_suffix$program_transform_name" = \
6500 NONENONEs,x,x, &&
6501 program_prefix=${target_alias}-
6502# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6503set dummy $target_alias-llvm-profdata; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6507 $as_echo_n "(cached) " >&6
6508else
6509 case $LLVM_PROFDATA in
6510 [\\/]* | ?:[\\/]*)
6511 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6512 ;;
6513 *)
6514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006516do
6517 IFS=$as_save_IFS
6518 test -z "$as_dir" && as_dir=.
6519 for ac_exec_ext in '' $ac_executable_extensions; do
6520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006521 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523 break 2
6524 fi
6525done
6526 done
6527IFS=$as_save_IFS
6528
Gregory P. Smith799520c2016-09-07 16:10:00 -07006529 ;;
6530esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006531fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006532LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6533if test -n "$LLVM_PROFDATA"; then
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6535$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006536else
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
Gregory P. Smith799520c2016-09-07 16:10:00 -07006542if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6543 if test "$build" = "$target"; then
6544 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6545 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6546set dummy llvm-profdata; ac_word=$2
6547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6548$as_echo_n "checking for $ac_word... " >&6; }
6549if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6550 $as_echo_n "(cached) " >&6
6551else
6552 case $ac_pt_LLVM_PROFDATA in
6553 [\\/]* | ?:[\\/]*)
6554 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6555 ;;
6556 *)
6557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6558for as_dir in ${llvm_path}
6559do
6560 IFS=$as_save_IFS
6561 test -z "$as_dir" && as_dir=.
6562 for ac_exec_ext in '' $ac_executable_extensions; do
6563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6564 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6566 break 2
6567 fi
6568done
6569 done
6570IFS=$as_save_IFS
6571
6572 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6573 ;;
6574esac
6575fi
6576ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6577if test -n "$ac_pt_LLVM_PROFDATA"; then
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6579$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6580else
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6582$as_echo "no" >&6; }
6583fi
6584
6585 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6586 else
6587 LLVM_PROFDATA="''"
6588 fi
6589else
6590 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6591fi
6592
6593
6594if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6595then
6596 LLVM_PROF_FOUND="found"
6597else
6598 LLVM_PROF_FOUND="not-found"
6599fi
6600if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6601then
6602 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6603 if test -n "${found_llvm_profdata}"
6604 then
6605 # llvm-profdata isn't directly in $PATH in some cases.
6606 # https://apple.stackexchange.com/questions/197053/
6607 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6608 LLVM_PROF_FOUND=found
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6610$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6611 fi
6612fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006613LLVM_PROF_ERR=no
6614case $CC in
6615 *clang*)
6616 # Any changes made here should be reflected in the GCC+Darwin case below
6617 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6618 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006619 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006620 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6621 if test $LLVM_PROF_FOUND = not-found
6622 then
6623 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006624 if test "${REQUIRE_PGO}" = "yes"
6625 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006626 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 -07006627 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006628 fi
6629 ;;
6630 *gcc*)
6631 case $ac_sys_system in
6632 Darwin*)
6633 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6634 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006637 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638 then
6639 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006640 if test "${REQUIRE_PGO}" = "yes"
6641 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006642 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 -07006643 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006644 fi
6645 ;;
6646 *)
6647 PGO_PROF_GEN_FLAG="-fprofile-generate"
6648 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6649 LLVM_PROF_MERGER="true"
6650 LLVM_PROF_FILE=""
6651 ;;
6652 esac
6653 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006654 *icc*)
6655 PGO_PROF_GEN_FLAG="-prof-gen"
6656 PGO_PROF_USE_FLAG="-prof-use"
6657 LLVM_PROF_MERGER="true"
6658 LLVM_PROF_FILE=""
6659 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660esac
6661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6663# merged with this chunk of code?
6664
6665# Optimizer/debugger flags
6666# ------------------------
6667# (The following bit of code is complicated enough - please keep things
6668# indented properly. Just pretend you're editing Python code. ;-)
6669
6670# There are two parallel sets of case statements below, one that checks to
6671# see if OPT was set and one that does BASECFLAGS setting based upon
6672# compiler and platform. BASECFLAGS tweaks need to be made even if the
6673# user set OPT.
6674
6675# tweak OPT based on compiler and platform, only if the user didn't set
6676# it on the command line
6677
Victor Stinner9ed34a82017-05-02 22:35:58 +02006678
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006679if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680then
6681 case $GCC in
6682 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6684 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6685 WRAP="-fwrapv"
6686 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006687
Stefan Krahaf04ff22011-12-08 22:20:31 +01006688 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006689 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006690 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006691 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006692 *)
6693 if $CC --version 2>&1 | grep -q clang
6694 then
6695 cc_is_clang=1
6696 else
6697 cc_is_clang=
6698 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006699 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006700
Victor Stinner35f3d242017-04-21 12:35:24 +02006701 if test -n "${cc_is_clang}"
6702 then
6703 # Clang also needs -fwrapv
6704 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006705 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6706 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006707 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006708 fi
6709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710 case $ac_cv_prog_cc_g in
6711 yes)
6712 if test "$Py_DEBUG" = 'true' ; then
6713 # Optimization messes up debuggers, so turn it off for
6714 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006715 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006716 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006717 else
Victor Stinner28205b22017-04-21 11:24:34 +02006718 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006719 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720 else
Victor Stinner28205b22017-04-21 11:24:34 +02006721 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722 fi
6723 ;;
6724 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006725 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 ;;
6727 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 case $ac_sys_system in
6730 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6731 ;;
6732 esac
6733 ;;
6734
6735 *)
6736 OPT="-O"
6737 ;;
6738 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739fi
6740
6741
6742
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744# The -arch flags for universal builds on OSX
6745UNIVERSAL_ARCH_FLAGS=
6746
6747
6748# tweak BASECFLAGS based on compiler and platform
6749case $GCC in
6750yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006751 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006752
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6754$as_echo_n "checking for -Wextra... " >&6; }
6755 ac_save_cc="$CC"
6756 CC="$CC -Wextra -Werror"
6757 if ${ac_cv_extra_warnings+:} false; then :
6758 $as_echo_n "(cached) " >&6
6759else
6760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761/* end confdefs.h. */
6762
6763
6764int
6765main ()
6766{
6767
6768 ;
6769 return 0;
6770}
6771
6772_ACEOF
6773if ac_fn_c_try_compile "$LINENO"; then :
6774
6775 ac_cv_extra_warnings=yes
6776
6777else
6778
6779 ac_cv_extra_warnings=no
6780
6781fi
6782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6783fi
6784
6785 CC="$ac_save_cc"
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6787$as_echo "$ac_cv_extra_warnings" >&6; }
6788
6789 if test $ac_cv_extra_warnings = yes
6790 then
6791 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6792 fi
6793
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006794 # Python doesn't violate C99 aliasing rules, but older versions of
6795 # GCC produce warnings for legal Python code. Enable
6796 # -fno-strict-aliasing on versions of GCC that support but produce
6797 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6799$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800 ac_save_cc="$CC"
6801 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006802 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006803 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006804 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006808
Matthias Kloseb159a552010-04-25 21:00:44 +00006809
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006810int
6811main ()
6812{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006813
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006814 ;
6815 return 0;
6816}
Matthias Kloseb159a552010-04-25 21:00:44 +00006817
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006819if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006820
6821 CC="$ac_save_cc -fstrict-aliasing"
6822 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824/* end confdefs.h. */
6825
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006826 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006827int
6828main ()
6829{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006830double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831 ;
6832 return 0;
6833}
Matthias Kloseb159a552010-04-25 21:00:44 +00006834
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006836if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
6838 ac_cv_no_strict_aliasing=no
6839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840else
Matthias Kloseb159a552010-04-25 21:00:44 +00006841
6842 ac_cv_no_strict_aliasing=yes
6843
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847else
Matthias Kloseb159a552010-04-25 21:00:44 +00006848
6849 ac_cv_no_strict_aliasing=no
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006853fi
6854
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006855 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6858$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 then
6861 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6862 fi
6863
Zachary Ware5af85642015-12-21 12:09:17 -06006864 # ICC doesn't recognize the option, but only emits a warning
6865 ## XXX does it emit an unused result warning and can it be disabled?
6866 case "$CC" in
6867 *icc*)
6868 ac_cv_disable_unused_result_warning=no
6869 ;;
6870 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6872$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6873 ac_save_cc="$CC"
6874 CC="$CC -Wunused-result -Werror"
6875 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006876 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006877 $as_echo_n "(cached) " >&6
6878else
6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880/* end confdefs.h. */
6881
6882
6883int
6884main ()
6885{
6886
6887 ;
6888 return 0;
6889}
6890
6891_ACEOF
6892if ac_fn_c_try_compile "$LINENO"; then :
6893
6894 ac_cv_disable_unused_result_warning=yes
6895
6896else
6897
6898 ac_cv_disable_unused_result_warning=no
6899
6900fi
6901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6902fi
6903
6904 CFLAGS="$save_CFLAGS"
6905 CC="$ac_save_cc"
6906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6907$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006908 ;;
6909 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006910
6911 if test $ac_cv_disable_unused_result_warning = yes
6912 then
6913 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006914 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6915 fi
6916
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6918$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6919 ac_save_cc="$CC"
6920 CC="$CC -Wunused-parameter -Werror"
6921 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6922 $as_echo_n "(cached) " >&6
6923else
6924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6925/* end confdefs.h. */
6926
6927
6928int
6929main ()
6930{
6931
6932 ;
6933 return 0;
6934}
6935
6936_ACEOF
6937if ac_fn_c_try_compile "$LINENO"; then :
6938
6939 ac_cv_disable_unused_parameter_warning=yes
6940
6941else
6942
6943 ac_cv_disable_unused_parameter_warning=no
6944
6945fi
6946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6947fi
6948
6949 CC="$ac_save_cc"
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6951$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6952
6953 if test $ac_cv_disable_unused_parameter_warning = yes
6954 then
6955 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6956 fi
6957
6958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6959$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6960 ac_save_cc="$CC"
6961 CC="$CC -Wmissing-field-initializers -Werror"
6962 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6963 $as_echo_n "(cached) " >&6
6964else
6965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6966/* end confdefs.h. */
6967
6968
6969int
6970main ()
6971{
6972
6973 ;
6974 return 0;
6975}
6976
6977_ACEOF
6978if ac_fn_c_try_compile "$LINENO"; then :
6979
6980 ac_cv_disable_missing_field_initializers=yes
6981
6982else
6983
6984 ac_cv_disable_missing_field_initializers=no
6985
6986fi
6987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6988fi
6989
6990 CC="$ac_save_cc"
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
6992$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
6993
6994 if test $ac_cv_disable_missing_field_initializers = yes
6995 then
6996 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006997 fi
6998
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7000$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7001 ac_save_cc="$CC"
7002 CC="$CC -Wsign-compare"
7003 save_CFLAGS="$CFLAGS"
7004 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7005 $as_echo_n "(cached) " >&6
7006else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008/* end confdefs.h. */
7009
7010
7011int
7012main ()
7013{
7014
7015 ;
7016 return 0;
7017}
7018
7019_ACEOF
7020if ac_fn_c_try_compile "$LINENO"; then :
7021
7022 ac_cv_enable_sign_compare_warning=yes
7023
7024else
7025
7026 ac_cv_enable_sign_compare_warning=no
7027
7028fi
7029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7030fi
7031
7032 CFLAGS="$save_CFLAGS"
7033 CC="$ac_save_cc"
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7035$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7036
7037 if test $ac_cv_enable_sign_compare_warning = yes
7038 then
7039 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7040 fi
7041
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7043$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7044 ac_save_cc="$CC"
7045 CC="$CC -Wunreachable-code"
7046 save_CFLAGS="$CFLAGS"
7047 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7048 $as_echo_n "(cached) " >&6
7049else
7050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051/* end confdefs.h. */
7052
7053
7054int
7055main ()
7056{
7057
7058 ;
7059 return 0;
7060}
7061
7062_ACEOF
7063if ac_fn_c_try_compile "$LINENO"; then :
7064
7065 ac_cv_enable_unreachable_code_warning=yes
7066
7067else
7068
7069 ac_cv_enable_unreachable_code_warning=no
7070
7071fi
7072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7073fi
7074
7075 CFLAGS="$save_CFLAGS"
7076 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007077
7078 # Don't enable unreachable code warning in debug mode, since it usually
7079 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007080 # Issue #24324: Unfortunately, the unreachable code warning does not work
7081 # correctly on gcc and has been silently removed from the compiler.
7082 # It is supported on clang but on OS X systems gcc may be an alias
7083 # for clang. Try to determine if the compiler is not really gcc and,
7084 # if so, only then enable the warning.
7085 if test $ac_cv_enable_unreachable_code_warning = yes && \
7086 test "$Py_DEBUG" != "true" && \
7087 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007088 then
7089 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007090 else
7091 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007092 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7094$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007095
INADA Naokie3364842018-06-05 20:40:53 +09007096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7097$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7098 ac_save_cc="$CC"
7099 CC="$CC -Werror -Wstrict-prototypes"
7100 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7101 $as_echo_n "(cached) " >&6
7102else
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7104/* end confdefs.h. */
7105
7106
7107int
7108main ()
7109{
7110
7111 ;
7112 return 0;
7113}
7114
7115_ACEOF
7116if ac_fn_c_try_compile "$LINENO"; then :
7117
7118 ac_cv_enable_strict_prototypes_warning=yes
7119
7120else
7121
7122 ac_cv_enable_strict_prototypes_warning=no
7123
7124fi
7125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7126fi
7127
7128 CC="$ac_save_cc"
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7130$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7131
7132 if test $ac_cv_enable_strict_prototypes_warning = yes
7133 then
7134 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7135 fi
7136
Victor Stinner193ee0a2017-02-06 14:24:00 +01007137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7138$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7139 ac_save_cc="$CC"
7140 CC="$CC -Werror=implicit-function-declaration"
7141 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7142 $as_echo_n "(cached) " >&6
7143else
7144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7145/* end confdefs.h. */
7146
7147
7148int
7149main ()
7150{
7151
7152 ;
7153 return 0;
7154}
7155
7156_ACEOF
7157if ac_fn_c_try_compile "$LINENO"; then :
7158
7159 ac_cv_enable_implicit_function_declaration_error=yes
7160
7161else
7162
7163 ac_cv_enable_implicit_function_declaration_error=no
7164
7165fi
7166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7167fi
7168
7169 CC="$ac_save_cc"
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7171$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7172
7173 if test $ac_cv_enable_implicit_function_declaration_error = yes
7174 then
7175 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7176 fi
7177
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007178 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7179 # support. Without this, treatment of subnormals doesn't follow
7180 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007181 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 alpha*)
7183 BASECFLAGS="$BASECFLAGS -mieee"
7184 ;;
7185 esac
7186
7187 case $ac_sys_system in
7188 SCO_SV*)
7189 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7190 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007191
Ned Deily87adb6e2013-10-18 21:09:56 -07007192 Darwin*)
7193 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7194 # used to be here, but non-Apple gcc doesn't accept them.
7195 if test "${CC}" = gcc
7196 then
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007198$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007199 case "${UNIVERSALSDK}" in
7200 */MacOSX10.4u.sdk)
7201 # Build using 10.4 SDK, force usage of gcc when the
7202 # compiler is gcc, otherwise the user will get very
7203 # confusing error messages when building on OSX 10.6
7204 CC=gcc-4.0
7205 CPP=cpp-4.0
7206 ;;
7207 esac
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007210 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007211
Ned Deily87adb6e2013-10-18 21:09:56 -07007212 if test "${enable_universalsdk}"
7213 then
7214 case "$UNIVERSAL_ARCHS" in
7215 32-bit)
7216 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7217 LIPO_32BIT_FLAGS=""
7218 ARCH_RUN_32BIT=""
7219 ;;
7220 64-bit)
7221 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7222 LIPO_32BIT_FLAGS=""
7223 ARCH_RUN_32BIT="true"
7224 ;;
7225 all)
7226 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7227 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7228 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7229 ;;
7230 intel)
7231 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7232 LIPO_32BIT_FLAGS="-extract i386"
7233 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7234 ;;
7235 intel-32)
7236 UNIVERSAL_ARCH_FLAGS="-arch i386"
7237 LIPO_32BIT_FLAGS=""
7238 ARCH_RUN_32BIT=""
7239 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007240 intel-64)
7241 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7242 LIPO_32BIT_FLAGS=""
7243 ARCH_RUN_32BIT="true"
7244 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007245 3-way)
7246 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7247 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7248 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7249 ;;
7250 *)
7251 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7252 ;;
7253 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254
Ned Deily87adb6e2013-10-18 21:09:56 -07007255 if test "${UNIVERSALSDK}" != "/"
7256 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007257 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7258 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007259 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007260 else
7261 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7262 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007263 fi
7264 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265
Ned Deily87adb6e2013-10-18 21:09:56 -07007266 # Calculate an appropriate deployment target for this build:
7267 # The deployment target value is used explicitly to enable certain
7268 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007269 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 # component of the string returned by distutils.get_platform().
7271 #
7272 # Use the value from:
7273 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7274 # 2. the operating system version of the build machine if >= 10.6
7275 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7276 # below to pick either 10.3, 10.4, or 10.5 as the target.
7277 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278
Ned Deily87adb6e2013-10-18 21:09:56 -07007279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7280$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007281 cur_target_major=`sw_vers -productVersion | \
7282 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7283 cur_target_minor=`sw_vers -productVersion | \
7284 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7285 cur_target="${cur_target_major}.${cur_target_minor}"
7286 if test ${cur_target_major} -eq 10 && \
7287 test ${cur_target_minor} -ge 3 && \
7288 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007289 then
Ned Deily36820b62014-06-25 13:44:22 -07007290 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 cur_target=10.3
7292 if test ${enable_universalsdk}
7293 then
7294 case "$UNIVERSAL_ARCHS" in
7295 all|3-way|intel|64-bit)
7296 # These configurations were first supported in 10.5
7297 cur_target='10.5'
7298 ;;
7299 esac
7300 else
7301 if test `/usr/bin/arch` = "i386"
7302 then
7303 # 10.4 was the first release to support Intel archs
7304 cur_target="10.4"
7305 fi
7306 fi
7307 fi
7308 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007309
Ned Deily87adb6e2013-10-18 21:09:56 -07007310 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7311 # environment with a value that is the same as what we'll use
7312 # in the Makefile to ensure that we'll get the same compiler
7313 # environment during configure and build time.
7314 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7315 export MACOSX_DEPLOYMENT_TARGET
7316 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7318$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007319
Ned Deily87adb6e2013-10-18 21:09:56 -07007320 # end of Darwin* tests
7321 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 esac
7323 ;;
7324
7325*)
7326 case $ac_sys_system in
7327 OpenUNIX*|UnixWare*)
7328 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7329 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330 SCO_SV*)
7331 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7332 ;;
7333 esac
7334 ;;
7335esac
7336
Zachary Ware5af85642015-12-21 12:09:17 -06007337# ICC needs -fp-model strict or floats behave badly
7338case "$CC" in
7339*icc*)
7340 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7341 ;;
7342esac
7343
T. Woutersddbfa2c2017-05-23 01:30:49 +02007344if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345 :
7346else
7347 OPT="-DNDEBUG $OPT"
7348fi
7349
7350if test "$ac_arch_flags"
7351then
7352 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7353fi
7354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355# On some compilers, pthreads are available without further options
7356# (e.g. MacOS X). On some of these systems, the compiler will not
7357# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7358# So we have to see first whether pthreads are available without
7359# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7361$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007362if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 ac_cv_pthread_is_default=no
7367else
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369/* end confdefs.h. */
7370
Stefan Krah7dba5942012-11-22 22:49:11 +01007371#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372#include <pthread.h>
7373
7374void* routine(void* p){return NULL;}
7375
7376int main(){
7377 pthread_t p;
7378 if(pthread_create(&p,NULL,routine,NULL)!=0)
7379 return 1;
7380 (void)pthread_detach(p);
7381 return 0;
7382}
7383
7384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007385if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386
7387 ac_cv_pthread_is_default=yes
7388 ac_cv_kthread=no
7389 ac_cv_pthread=no
7390
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396fi
7397
7398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399fi
7400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7402$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403
7404
7405if test $ac_cv_pthread_is_default = yes
7406then
7407 ac_cv_kpthread=no
7408else
7409# -Kpthread, if available, provides the right #defines
7410# and linker options to make pthread_create available
7411# Some compilers won't report that they do not support -Kpthread,
7412# so we need to run a program to see whether it really made the
7413# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7415$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007416if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418else
7419 ac_save_cc="$CC"
7420CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007421if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 ac_cv_kpthread=no
7423else
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425/* end confdefs.h. */
7426
Stefan Krah7dba5942012-11-22 22:49:11 +01007427#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428#include <pthread.h>
7429
7430void* routine(void* p){return NULL;}
7431
7432int main(){
7433 pthread_t p;
7434 if(pthread_create(&p,NULL,routine,NULL)!=0)
7435 return 1;
7436 (void)pthread_detach(p);
7437 return 0;
7438}
7439
7440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007441if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442 ac_cv_kpthread=yes
7443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7447 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448fi
7449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450CC="$ac_save_cc"
7451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7454$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455fi
7456
7457if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7458then
7459# -Kthread, if available, provides the right #defines
7460# and linker options to make pthread_create available
7461# Some compilers won't report that they do not support -Kthread,
7462# so we need to run a program to see whether it really made the
7463# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7465$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007466if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468else
7469 ac_save_cc="$CC"
7470CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007471if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472 ac_cv_kthread=no
7473else
Matthias Kloseb9621712010-04-24 17:59:49 +00007474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475/* end confdefs.h. */
7476
Stefan Krah7dba5942012-11-22 22:49:11 +01007477#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478#include <pthread.h>
7479
7480void* routine(void* p){return NULL;}
7481
7482int main(){
7483 pthread_t p;
7484 if(pthread_create(&p,NULL,routine,NULL)!=0)
7485 return 1;
7486 (void)pthread_detach(p);
7487 return 0;
7488}
7489
7490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007491if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492 ac_cv_kthread=yes
7493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498fi
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500CC="$ac_save_cc"
7501fi
7502
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7504$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505fi
7506
7507if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7508then
7509# -pthread, if available, provides the right #defines
7510# and linker options to make pthread_create available
7511# Some compilers won't report that they do not support -pthread,
7512# so we need to run a program to see whether it really made the
7513# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7515$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007516if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518else
7519 ac_save_cc="$CC"
7520CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007521if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522 ac_cv_pthread=no
7523else
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525/* end confdefs.h. */
7526
Stefan Krah7dba5942012-11-22 22:49:11 +01007527#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528#include <pthread.h>
7529
7530void* routine(void* p){return NULL;}
7531
7532int main(){
7533 pthread_t p;
7534 if(pthread_create(&p,NULL,routine,NULL)!=0)
7535 return 1;
7536 (void)pthread_detach(p);
7537 return 0;
7538}
7539
7540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007541if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542 ac_cv_pthread=yes
7543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548fi
7549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550CC="$ac_save_cc"
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7554$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555fi
7556
7557# If we have set a CC compiler flag for thread support then
7558# check if it works for CXX, too.
7559ac_cv_cxx_thread=no
7560if test ! -z "$CXX"
7561then
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7563$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564ac_save_cxx="$CXX"
7565
7566if test "$ac_cv_kpthread" = "yes"
7567then
7568 CXX="$CXX -Kpthread"
7569 ac_cv_cxx_thread=yes
7570elif test "$ac_cv_kthread" = "yes"
7571then
7572 CXX="$CXX -Kthread"
7573 ac_cv_cxx_thread=yes
7574elif test "$ac_cv_pthread" = "yes"
7575then
7576 CXX="$CXX -pthread"
7577 ac_cv_cxx_thread=yes
7578fi
7579
7580if test $ac_cv_cxx_thread = yes
7581then
7582 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7583 $CXX -c conftest.$ac_ext 2>&5
7584 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7585 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7586 then
7587 ac_cv_cxx_thread=yes
7588 else
7589 ac_cv_cxx_thread=no
7590 fi
7591 rm -fr conftest*
7592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7594$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596CXX="$ac_save_cxx"
7597
7598
7599# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7601$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007602if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606/* end confdefs.h. */
7607#include <stdlib.h>
7608#include <stdarg.h>
7609#include <string.h>
7610#include <float.h>
7611
7612int
7613main ()
7614{
7615
7616 ;
7617 return 0;
7618}
7619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007620if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621 ac_cv_header_stdc=yes
7622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7626
7627if test $ac_cv_header_stdc = yes; then
7628 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630/* end confdefs.h. */
7631#include <string.h>
7632
7633_ACEOF
7634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 $EGREP "memchr" >/dev/null 2>&1; then :
7636
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637else
7638 ac_cv_header_stdc=no
7639fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007640rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641
7642fi
7643
7644if test $ac_cv_header_stdc = yes; then
7645 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647/* end confdefs.h. */
7648#include <stdlib.h>
7649
7650_ACEOF
7651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007652 $EGREP "free" >/dev/null 2>&1; then :
7653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654else
7655 ac_cv_header_stdc=no
7656fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007657rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658
7659fi
7660
7661if test $ac_cv_header_stdc = yes; then
7662 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664 :
7665else
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667/* end confdefs.h. */
7668#include <ctype.h>
7669#include <stdlib.h>
7670#if ((' ' & 0x0FF) == 0x020)
7671# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7672# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7673#else
7674# define ISLOWER(c) \
7675 (('a' <= (c) && (c) <= 'i') \
7676 || ('j' <= (c) && (c) <= 'r') \
7677 || ('s' <= (c) && (c) <= 'z'))
7678# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7679#endif
7680
7681#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7682int
7683main ()
7684{
7685 int i;
7686 for (i = 0; i < 256; i++)
7687 if (XOR (islower (i), ISLOWER (i))
7688 || toupper (i) != TOUPPER (i))
7689 return 2;
7690 return 0;
7691}
7692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007693if ac_fn_c_try_run "$LINENO"; then :
7694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700fi
7701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
7703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7705$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706if test $ac_cv_header_stdc = yes; then
7707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709
7710fi
7711
stratakise768c862018-01-23 16:11:24 +01007712for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007713fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007714ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007715sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007716unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007717poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007718sys/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 +01007719sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007720sys/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 +01007721sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007722sys/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 -07007723libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007724linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007725sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007726do :
7727 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7728ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007729if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007731#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007732_ACEOF
7733
7734fi
7735
Guido van Rossum627b2d71993-12-24 10:39:16 +00007736done
7737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007739for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7742$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007743if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007747/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007748#include <sys/types.h>
7749#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
7753{
7754if ((DIR *) 0)
7755return 0;
7756 ;
7757 return 0;
7758}
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767eval ac_res=\$$as_ac_Header
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7769$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007770if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
7774
7775ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007776fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778done
7779# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7780if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7782$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007783if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785else
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790/* Override any GCC internal prototype to avoid an error.
7791 Use char because int might match the return type of a GCC
7792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793#ifdef __cplusplus
7794extern "C"
7795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007796char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007797int
7798main ()
7799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ;
7802 return 0;
7803}
7804_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805for ac_lib in '' dir; do
7806 if test -z "$ac_lib"; then
7807 ac_res="none required"
7808 else
7809 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815rm -f core conftest.err conftest.$ac_objext \
7816 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007817 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820done
Victor Stinnere0be4232011-10-25 13:06:09 +02007821if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823else
7824 ac_cv_search_opendir=no
7825fi
7826rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007827LIBS=$ac_func_search_save_LIBS
7828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7830$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007832if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007834
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007836
Michael W. Hudson54241132001-12-07 15:38:26 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7839$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007840if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007842else
7843 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847/* Override any GCC internal prototype to avoid an error.
7848 Use char because int might match the return type of a GCC
7849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850#ifdef __cplusplus
7851extern "C"
7852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007853char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007854int
7855main ()
7856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ;
7859 return 0;
7860}
7861_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862for ac_lib in '' x; do
7863 if test -z "$ac_lib"; then
7864 ac_res="none required"
7865 else
7866 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007867 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872rm -f core conftest.err conftest.$ac_objext \
7873 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007874 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877done
Victor Stinnere0be4232011-10-25 13:06:09 +02007878if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880else
7881 ac_cv_search_opendir=no
7882fi
7883rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007884LIBS=$ac_func_search_save_LIBS
7885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7887$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007892fi
7893
7894fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007895
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7897$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007902/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007903#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007904int
7905main ()
7906{
7907return makedev(0, 0);
7908 ;
7909 return 0;
7910}
7911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007913 ac_cv_header_sys_types_h_makedev=yes
7914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917rm -f core conftest.err conftest.$ac_objext \
7918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007919
7920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7922$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007923
7924if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007925ac_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 +02007926if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007929
7930fi
7931
7932
7933
7934 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 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 +02007936if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007939
7940fi
7941
7942
7943 fi
7944fi
7945
Michael W. Hudson54241132001-12-07 15:38:26 +00007946
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007947# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7948# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7949SAVE_CFLAGS=$CFLAGS
7950CFLAGS="-std=c99 $CFLAGS"
7951for ac_header in bluetooth/bluetooth.h
7952do :
7953 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7954if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7955 cat >>confdefs.h <<_ACEOF
7956#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7957_ACEOF
7958
7959fi
7960
7961done
7962
7963CFLAGS=$SAVE_CFLAGS
7964
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007965# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7966for ac_header in net/if.h
7967do :
7968 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7969#ifdef STDC_HEADERS
7970# include <stdlib.h>
7971# include <stddef.h>
7972#else
7973# ifdef HAVE_STDLIB_H
7974# include <stdlib.h>
7975# endif
7976#endif
7977#ifdef HAVE_SYS_SOCKET_H
7978# include <sys/socket.h>
7979#endif
7980
7981"
Victor Stinnere0be4232011-10-25 13:06:09 +02007982if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007983 cat >>confdefs.h <<_ACEOF
7984#define HAVE_NET_IF_H 1
7985_ACEOF
7986
7987fi
7988
7989done
7990
7991
Martin v. Löwis11017b12006-01-14 18:12:57 +00007992# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007993for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007994do :
7995 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 +00007996#ifdef HAVE_ASM_TYPES_H
7997#include <asm/types.h>
7998#endif
7999#ifdef HAVE_SYS_SOCKET_H
8000#include <sys/socket.h>
8001#endif
8002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003"
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008005 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008006#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008007_ACEOF
8008
8009fi
8010
8011done
8012
8013
caaveryeffc12f2017-09-06 18:18:10 -04008014for ac_header in linux/vm_sockets.h
8015do :
8016 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8017#ifdef HAVE_SYS_SOCKET_H
8018#include <sys/socket.h>
8019#endif
8020
8021"
8022if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8023 cat >>confdefs.h <<_ACEOF
8024#define HAVE_LINUX_VM_SOCKETS_H 1
8025_ACEOF
8026
8027fi
8028
8029done
8030
8031
Charles-François Natali47413c12011-10-06 19:47:44 +02008032# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008033for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008034do :
8035 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8036ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8037#ifdef HAVE_SYS_SOCKET_H
8038#include <sys/socket.h>
8039#endif
8040
8041"
8042if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8043 cat >>confdefs.h <<_ACEOF
8044#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8045_ACEOF
8046
8047fi
8048
8049done
8050
8051
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008053was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8055$as_echo_n "checking for clock_t in time.h... " >&6; }
8056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008057/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008058#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008059
8060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008063 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008064else
Martin v. Löwis11437992002-04-12 09:54:03 +00008065
8066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008068
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008069
Guido van Rossum627b2d71993-12-24 10:39:16 +00008070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008071rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8074$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8077$as_echo_n "checking for makedev... " >&6; }
8078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008080
Jesus Cea740f53a2010-04-28 11:35:30 +00008081#if defined(MAJOR_IN_MKDEV)
8082#include <sys/mkdev.h>
8083#elif defined(MAJOR_IN_SYSMACROS)
8084#include <sys/sysmacros.h>
8085#else
8086#include <sys/types.h>
8087#endif
8088
Neal Norwitz11690112002-07-30 01:08:28 +00008089int
8090main ()
8091{
Jesus Cea740f53a2010-04-28 11:35:30 +00008092
8093 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008094 ;
8095 return 0;
8096}
Matthias Kloseb159a552010-04-25 21:00:44 +00008097
Neal Norwitz11690112002-07-30 01:08:28 +00008098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008099if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008100 ac_cv_has_makedev=yes
8101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104rm -f core conftest.err conftest.$ac_objext \
8105 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8107$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008108if test "$ac_cv_has_makedev" = "yes"; then
8109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008111
8112fi
8113
Christian Heimes985ecdc2013-11-20 11:46:18 +01008114# byte swapping
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8116$as_echo_n "checking for le64toh... " >&6; }
8117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8118/* end confdefs.h. */
8119
8120#ifdef HAVE_ENDIAN_H
8121#include <endian.h>
8122#elif defined(HAVE_SYS_ENDIAN_H)
8123#include <sys/endian.h>
8124#endif
8125
8126int
8127main ()
8128{
8129
8130 le64toh(1)
8131 ;
8132 return 0;
8133}
8134
8135_ACEOF
8136if ac_fn_c_try_link "$LINENO"; then :
8137 ac_cv_has_le64toh=yes
8138else
8139 ac_cv_has_le64toh=no
8140fi
8141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext conftest.$ac_ext
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8144$as_echo "$ac_cv_has_le64toh" >&6; }
8145if test "$ac_cv_has_le64toh" = "yes"; then
8146
8147$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8148
8149fi
8150
Martin v. Löwis399a6892002-10-04 10:22:02 +00008151use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008152# Don't use largefile support for GNU/Hurd
8153case $ac_sys_system in GNU*)
8154 use_lfs=no
8155esac
8156
Martin v. Löwis399a6892002-10-04 10:22:02 +00008157if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008158# Two defines needed to enable largefile support on various platforms
8159# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008160case $ac_sys_system/$ac_sys_release in
8161AIX*)
8162
8163$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8164
8165 ;;
8166esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008169
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008172
Martin v. Löwis399a6892002-10-04 10:22:02 +00008173fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008174
Guido van Rossum84e7b241996-08-19 21:59:00 +00008175# Add some code to confdefs.h so that the test for off_t works on SCO
8176cat >> confdefs.h <<\EOF
8177#if defined(SCO_DS)
8178#undef _OFF_T
8179#endif
8180EOF
8181
Guido van Rossumef2255b2000-03-10 22:30:29 +00008182# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008183ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008184if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
8188cat >>confdefs.h <<_ACEOF
8189#define mode_t int
8190_ACEOF
8191
8192fi
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008195if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008196
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008197else
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
8199cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
8202
8203fi
8204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008206if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008208else
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210cat >>confdefs.h <<_ACEOF
8211#define pid_t int
8212_ACEOF
8213
8214fi
8215
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008216
Martin v. Löwis11437992002-04-12 09:54:03 +00008217cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008218#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008219_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008220
Matthias Kloseb9621712010-04-24 17:59:49 +00008221ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008222if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008224else
Martin v. Löwis11437992002-04-12 09:54:03 +00008225
8226cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008228_ACEOF
8229
8230fi
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8233$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008238/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008239#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008243 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008244 ac_cv_type_uid_t=yes
8245else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246 ac_cv_type_uid_t=no
8247fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008248rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008249
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8252$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008253if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008256
8257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008259
8260fi
8261
Mark Dickinson983bc162012-12-02 12:11:38 +00008262
Matthias Kloseb9621712010-04-24 17:59:49 +00008263ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008264if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265
Matthias Kloseb9621712010-04-24 17:59:49 +00008266$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008267
8268fi
8269
Stefan Krah1919b7e2012-03-21 18:25:23 +01008270ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8271if test "x$ac_cv_type___uint128_t" = xyes; then :
8272
8273$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8274
8275fi
8276
Jack Jansendd19cf82001-12-06 22:36:17 +00008277
Michael W. Hudson54241132001-12-07 15:38:26 +00008278# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008279# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280# The cast to long int works around a bug in the HP C Compiler
8281# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8282# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8283# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8285$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008286if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008287 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 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 +00008290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291else
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 if test "$ac_cv_type_int" = yes; then
8293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008295as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008296See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297 else
8298 ac_cv_sizeof_int=0
8299 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8304$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305
8306
8307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008309#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008310_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008311
8312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313# The cast to long int works around a bug in the HP C Compiler
8314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8316# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8318$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008319if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008321else
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 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 +00008323
Martin v. Löwis11437992002-04-12 09:54:03 +00008324else
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 if test "$ac_cv_type_long" = yes; then
8326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008328as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008329See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330 else
8331 ac_cv_sizeof_long=0
8332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334
Martin v. Löwis11437992002-04-12 09:54:03 +00008335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8337$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338
8339
8340
Martin v. Löwis11437992002-04-12 09:54:03 +00008341cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008342#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008343_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008344
8345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346# The cast to long int works around a bug in the HP C Compiler
8347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8349# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8351$as_echo_n "checking size of long long... " >&6; }
8352if ${ac_cv_sizeof_long_long+:} false; then :
8353 $as_echo_n "(cached) " >&6
8354else
8355 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8356
8357else
8358 if test "$ac_cv_type_long_long" = yes; then
8359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8361as_fn_error 77 "cannot compute sizeof (long long)
8362See \`config.log' for more details" "$LINENO" 5; }
8363 else
8364 ac_cv_sizeof_long_long=0
8365 fi
8366fi
8367
8368fi
8369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8370$as_echo "$ac_cv_sizeof_long_long" >&6; }
8371
8372
8373
8374cat >>confdefs.h <<_ACEOF
8375#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8376_ACEOF
8377
8378
8379# The cast to long int works around a bug in the HP C Compiler
8380# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8381# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8382# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8384$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008385if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 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 +00008389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 if test "$ac_cv_type_void_p" = yes; then
8392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008394as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008395See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 else
8397 ac_cv_sizeof_void_p=0
8398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8403$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404
8405
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008408#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008410
8411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412# The cast to long int works around a bug in the HP C Compiler
8413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8415# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8417$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008418if ${ac_cv_sizeof_short+:} 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 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 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 if test "$ac_cv_type_short" = yes; then
8425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008427as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008428See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429 else
8430 ac_cv_sizeof_short=0
8431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8436$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437
8438
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008441#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008442_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008443
8444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445# The cast to long int works around a bug in the HP C Compiler
8446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8448# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8450$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 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 +00008455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456else
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 if test "$ac_cv_type_float" = yes; then
8458 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008460as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008461See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462 else
8463 ac_cv_sizeof_float=0
8464 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8469$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470
8471
8472
Martin v. Löwis11437992002-04-12 09:54:03 +00008473cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008474#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008475_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008476
8477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478# The cast to long int works around a bug in the HP C Compiler
8479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8481# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8483$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008484if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 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 +00008488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 if test "$ac_cv_type_double" = yes; then
8491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008493as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008494See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 else
8496 ac_cv_sizeof_double=0
8497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8502$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504
8505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008507#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008508_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008509
8510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511# The cast to long int works around a bug in the HP C Compiler
8512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8514# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8516$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 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 +00008521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if test "$ac_cv_type_fpos_t" = yes; then
8524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008526as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008527See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 else
8529 ac_cv_sizeof_fpos_t=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8535$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536
8537
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008540#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008541_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008542
Michael W. Hudson54241132001-12-07 15:38:26 +00008543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544# The cast to long int works around a bug in the HP C Compiler
8545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8549$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008550if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 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 +00008554
Martin v. Löwis18e16552006-02-15 17:27:45 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 if test "$ac_cv_type_size_t" = yes; then
8557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008559as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008560See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561 else
8562 ac_cv_sizeof_size_t=0
8563 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565
Martin v. Löwis18e16552006-02-15 17:27:45 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8568$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569
8570
8571
Martin v. Löwis18e16552006-02-15 17:27:45 +00008572cat >>confdefs.h <<_ACEOF
8573#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8574_ACEOF
8575
8576
Christian Heimes400adb02008-02-01 08:12:03 +00008577# The cast to long int works around a bug in the HP C Compiler
8578# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8579# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8580# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8582$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008583if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 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 +00008587
Christian Heimes400adb02008-02-01 08:12:03 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 if test "$ac_cv_type_pid_t" = yes; then
8590 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008592as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008593See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008594 else
8595 ac_cv_sizeof_pid_t=0
8596 fi
8597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598
Christian Heimes400adb02008-02-01 08:12:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8601$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008602
8603
8604
8605cat >>confdefs.h <<_ACEOF
8606#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8607_ACEOF
8608
8609
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008610# The cast to long int works around a bug in the HP C Compiler
8611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613# This bug is HP SR number 8606223364.
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8615$as_echo_n "checking size of uintptr_t... " >&6; }
8616if ${ac_cv_sizeof_uintptr_t+:} false; then :
8617 $as_echo_n "(cached) " >&6
8618else
8619 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8620
8621else
8622 if test "$ac_cv_type_uintptr_t" = yes; then
8623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8625as_fn_error 77 "cannot compute sizeof (uintptr_t)
8626See \`config.log' for more details" "$LINENO" 5; }
8627 else
8628 ac_cv_sizeof_uintptr_t=0
8629 fi
8630fi
8631
8632fi
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8634$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8635
8636
8637
8638cat >>confdefs.h <<_ACEOF
8639#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8640_ACEOF
8641
8642
Michael W. Hudson54241132001-12-07 15:38:26 +00008643
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644
Eitan Adler3055c942018-05-15 22:58:09 -07008645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8646$as_echo_n "checking for long double... " >&6; }
8647if ${ac_cv_type_long_double+:} false; then :
8648 $as_echo_n "(cached) " >&6
8649else
8650 if test "$GCC" = yes; then
8651 ac_cv_type_long_double=yes
8652 else
8653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8654/* end confdefs.h. */
8655/* The Stardent Vistra knows sizeof (long double), but does
8656 not support it. */
8657 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008658int
8659main ()
8660{
Eitan Adler3055c942018-05-15 22:58:09 -07008661static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8662 sizeof (double) <= sizeof (long double))];
8663test_array [0] = 0;
8664return test_array [0];
8665
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008666 ;
8667 return 0;
8668}
8669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008670if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008671 ac_cv_type_long_double=yes
8672else
8673 ac_cv_type_long_double=no
8674fi
8675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8676 fi
8677fi
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8679$as_echo "$ac_cv_type_long_double" >&6; }
8680 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008681
Matthias Kloseb9621712010-04-24 17:59:49 +00008682$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008683
Eitan Adler3055c942018-05-15 22:58:09 -07008684 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008685
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8691$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type_long_double" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008703 else
8704 ac_cv_sizeof_long_double=0
8705 fi
8706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8710$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008711
8712
8713
8714cat >>confdefs.h <<_ACEOF
8715#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8716_ACEOF
8717
8718
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8725$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 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 +00008730
Thomas Woutersb2137042007-02-01 18:02:27 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 if test "$ac_cv_type__Bool" = yes; then
8733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008735as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737 else
8738 ac_cv_sizeof__Bool=0
8739 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741
Thomas Woutersb2137042007-02-01 18:02:27 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8744$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745
8746
8747
Thomas Woutersb2137042007-02-01 18:02:27 +00008748cat >>confdefs.h <<_ACEOF
8749#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8750_ACEOF
8751
8752
Thomas Woutersb2137042007-02-01 18:02:27 +00008753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8759$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764#ifdef HAVE_SYS_TYPES_H
8765#include <sys/types.h>
8766#endif
8767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008769
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 if test "$ac_cv_type_off_t" = yes; then
8772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008774as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008775See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776 else
8777 ac_cv_sizeof_off_t=0
8778 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8783$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008785
8786
Martin v. Löwis11437992002-04-12 09:54:03 +00008787cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008788#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008789_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008790
Michael W. Hudson54241132001-12-07 15:38:26 +00008791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008792
Matthias Kloseb9621712010-04-24 17:59:49 +00008793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8794$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008795if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008796 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008799
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8801$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802else
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008805fi
8806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008807# The cast to long int works around a bug in the HP C Compiler
8808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8812$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817#ifdef HAVE_SYS_TYPES_H
8818#include <sys/types.h>
8819#endif
8820#ifdef HAVE_TIME_H
8821#include <time.h>
8822#endif
8823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826else
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 if test "$ac_cv_type_time_t" = yes; then
8828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008830as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008831See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832 else
8833 ac_cv_sizeof_time_t=0
8834 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8839$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841
8842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008844#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008845_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008846
Michael W. Hudson54241132001-12-07 15:38:26 +00008847
8848
Trent Mick635f6fb2000-08-23 21:33:05 +00008849# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008850ac_save_cc="$CC"
8851if test "$ac_cv_kpthread" = "yes"
8852then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008853elif test "$ac_cv_kthread" = "yes"
8854then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008855elif test "$ac_cv_pthread" = "yes"
8856then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008857fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8860$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008861have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008863/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008864
8865 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
Guido van Rossum12580492000-09-24 16:47:19 +00008869pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ;
8871 return 0;
8872}
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
Martin v. Löwis11437992002-04-12 09:54:03 +00008874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008875if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008876 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8880$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008881if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8887$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892#ifdef HAVE_PTHREAD_H
8893#include <pthread.h>
8894#endif
8895
Matthias Kloseb9621712010-04-24 17:59:49 +00008896"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$ac_cv_type_pthread_t" = yes; then
8900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008902as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008903See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904 else
8905 ac_cv_sizeof_pthread_t=0
8906 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008908
Trent Mick635f6fb2000-08-23 21:33:05 +00008909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8911$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008913
8914
Martin v. Löwis11437992002-04-12 09:54:03 +00008915cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008916#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008917_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008918
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919
Trent Mick635f6fb2000-08-23 21:33:05 +00008920fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008921
8922# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8923# This checking will be unnecessary after removing deprecated TLS API.
8924# The cast to long int works around a bug in the HP C Compiler
8925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8927# This bug is HP SR number 8606223364.
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8929$as_echo_n "checking size of pthread_key_t... " >&6; }
8930if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8931 $as_echo_n "(cached) " >&6
8932else
8933 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8934"; then :
8935
8936else
8937 if test "$ac_cv_type_pthread_key_t" = yes; then
8938 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8939$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8940as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8941See \`config.log' for more details" "$LINENO" 5; }
8942 else
8943 ac_cv_sizeof_pthread_key_t=0
8944 fi
8945fi
8946
8947fi
8948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8949$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8950
8951
8952
8953cat >>confdefs.h <<_ACEOF
8954#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8955_ACEOF
8956
8957
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8959$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8960if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8962/* end confdefs.h. */
8963#include <pthread.h>
8964int
8965main ()
8966{
8967pthread_key_t k; k * 1;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972if ac_fn_c_try_compile "$LINENO"; then :
8973 ac_pthread_key_t_is_arithmetic_type=yes
8974else
8975 ac_pthread_key_t_is_arithmetic_type=no
8976
8977fi
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8980$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8981 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8982
8983$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8984
8985 fi
8986else
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008990CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008991
Michael W. Hudson54241132001-12-07 15:38:26 +00008992
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008993case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008994 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008995 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8996 ;;
8997 Darwin/*)
8998 OTHER_LIBTOOL_OPT=""
8999 ;;
9000esac
9001
9002
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009003
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009004case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009005 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009006 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9007 if test "${enable_universalsdk}"; then
9008 :
9009 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009010 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009011 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009012 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009013 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009014 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009015 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009016 if test ${gcc_version} '<' 4.0
9017 then
9018 LIBTOOL_CRUFT="-lcc_dynamic"
9019 else
9020 LIBTOOL_CRUFT=""
9021 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009023 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024else
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009026/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009027
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028 #include <unistd.h>
9029 int main(int argc, char*argv[])
9030 {
9031 if (sizeof(long) == 4) {
9032 return 0;
9033 } else {
9034 return 1;
9035 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009036 }
9037
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009039if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040 ac_osx_32bit=yes
9041else
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046fi
9047
9048
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009049 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009050 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009051 i386)
9052 MACOSX_DEFAULT_ARCH="i386"
9053 ;;
9054 ppc)
9055 MACOSX_DEFAULT_ARCH="ppc"
9056 ;;
9057 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009058 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059 ;;
9060 esac
9061 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009062 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 i386)
9064 MACOSX_DEFAULT_ARCH="x86_64"
9065 ;;
9066 ppc)
9067 MACOSX_DEFAULT_ARCH="ppc64"
9068 ;;
9069 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009070 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071 ;;
9072 esac
9073
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074 fi
9075
9076 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009077 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009079esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9081$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009082if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009083then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009084 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009086 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9091$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009092 if test $enable_shared = "yes"
9093 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009094 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 +00009095 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096else
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099fi
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9102$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009103case $ac_sys_system/$ac_sys_release in
9104 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9109$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009110 ;;
9111 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009114 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009115esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009116
Guido van Rossum0a516c91994-09-12 10:58:40 +00009117# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009118
Michael W. Hudson54241132001-12-07 15:38:26 +00009119
9120
9121
9122
Benjamin Peterson99f03762010-04-11 22:15:28 +00009123
Thomas Wouters477c8d52006-05-27 19:21:47 +00009124
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009125# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9126# -- usually .so, .sl on HP-UX, .dll on Cygwin
9127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9128$as_echo_n "checking the extension of shared libraries... " >&6; }
9129if test -z "$SHLIB_SUFFIX"; then
9130 case $ac_sys_system in
9131 hp*|HP*)
9132 case `uname -m` in
9133 ia64) SHLIB_SUFFIX=.so;;
9134 *) SHLIB_SUFFIX=.sl;;
9135 esac
9136 ;;
9137 CYGWIN*) SHLIB_SUFFIX=.dll;;
9138 *) SHLIB_SUFFIX=.so;;
9139 esac
9140fi
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9142$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009143
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009145# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009146# (Shared libraries in this instance are shared modules to be loaded into
9147# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9149$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009150if test -z "$LDSHARED"
9151then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009152 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009153 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009154 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009155 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009156 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009157 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158 if test "$GCC" = "yes" ; then
9159 LDSHARED='$(CC) -shared'
9160 LDCXXSHARED='$(CXX) -shared'
9161 else
9162 LDSHARED='$(CC) -G'
9163 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009164 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009165 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 if test "$GCC" = "yes" ; then
9167 LDSHARED='$(CC) -shared'
9168 LDCXXSHARED='$(CXX) -shared'
9169 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009170 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009171 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009172 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009173 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009174 LDSHARED='$(CC) -bundle'
9175 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 if test "$enable_framework" ; then
9177 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009178 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9179 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009180 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009181 else
9182 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009183 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009185 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009186 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009187 LDSHARED='$(CC) -bundle'
9188 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009189 if test "$enable_framework" ; then
9190 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009191 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9192 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009194 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009195 # No framework, use the Python app as bundle-loader
9196 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009197 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009198 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009200 Darwin/*)
9201 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9202 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009203
Ned Deily36820b62014-06-25 13:44:22 -07009204 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9205 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9206 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9207 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9208 if test ${dep_target_major} -eq 10 && \
9209 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009210 then
Ned Deily36820b62014-06-25 13:44:22 -07009211 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009212 LDSHARED='$(CC) -bundle'
9213 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 if test "$enable_framework" ; then
9215 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009216 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9217 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 else
9220 # No framework, use the Python app as bundle-loader
9221 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9222 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009223 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009224 fi
Ned Deily36820b62014-06-25 13:44:22 -07009225 else
9226 # building for OS X 10.3 and later
9227 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9228 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9229 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009230 fi
9231 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 Linux*|GNU*|QNX*)
9233 LDSHARED='$(CC) -shared'
9234 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009235 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009236 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009237 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009238 LDSHARED='$(CC) -shared'
9239 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009240 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009241 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009242 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009243 OpenBSD*)
9244 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9245 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009246 LDSHARED='$(CC) -shared $(CCSHARED)'
9247 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009248 else
9249 case `uname -r` in
9250 [01].* | 2.[0-7] | 2.[0-7].*)
9251 LDSHARED="ld -Bshareable ${LDFLAGS}"
9252 ;;
9253 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009254 LDSHARED='$(CC) -shared $(CCSHARED)'
9255 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009256 ;;
9257 esac
9258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009259 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009260 LDSHARED='$(CC) -shared'
9261 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009262 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009263 if test "$GCC" = "yes" ; then
9264 LDSHARED='$(CC) -shared'
9265 LDCXXSHARED='$(CXX) -shared'
9266 else
9267 LDSHARED='$(CC) -G'
9268 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009269 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 SCO_SV*)
9271 LDSHARED='$(CC) -Wl,-G,-Bexport'
9272 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9273 CYGWIN*)
9274 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9275 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276 *) LDSHARED="ld";;
9277 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9280$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009281LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009282BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009283# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9286$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009287if test -z "$CCSHARED"
9288then
Guido van Rossum07397971997-04-29 21:49:50 +00009289 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009290 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009291 then CCSHARED="-fPIC";
9292 elif test `uname -p` = sparc;
9293 then CCSHARED="-xcode=pic32";
9294 else CCSHARED="-Kpic";
9295 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009296 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009297 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009298 else CCSHARED="+z";
9299 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009300 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009301 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009302 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009303 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009304 if test "$GCC" = "yes"
9305 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009306 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009307 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009308 SCO_SV*)
9309 if test "$GCC" = "yes"
9310 then CCSHARED="-fPIC"
9311 else CCSHARED="-Kpic -belf"
9312 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009313 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9316$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009318# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9320$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321if test -z "$LINKFORSHARED"
9322then
Guido van Rossum07397971997-04-29 21:49:50 +00009323 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009324 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009325 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009326 LINKFORSHARED="-Wl,-E -Wl,+s";;
9327# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009328 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009329 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009330 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009332 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009333
9334 # Issue #18075: the default maximum stack size (8MBytes) is too
9335 # small for the default recursion limit. Increase the stack size
9336 # to ensure that tests don't crash
9337 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9338
Jack Jansene578a632001-08-15 01:27:14 +00009339 if test "$enable_framework"
9340 then
Jack Jansenda49e192005-01-07 13:08:22 +00009341 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009342 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009343 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009344 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009345 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009346 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009347 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009348 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9349 then
9350 LINKFORSHARED="-Wl,--export-dynamic"
9351 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009352 SunOS/5*) case $CC in
9353 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009354 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009355 then
9356 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009357 fi;;
9358 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009359 CYGWIN*)
9360 if test $enable_shared = "no"
9361 then
9362 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9363 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009364 QNX*)
9365 # -Wl,-E causes the symbols to be added to the dynamic
9366 # symbol table so that they can be found when a module
9367 # is loaded. -N 2048K causes the stack size to be set
9368 # to 2048 kilobytes so that the stack doesn't overflow
9369 # when running test_compile.py.
9370 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009371 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9374$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375
Michael W. Hudson54241132001-12-07 15:38:26 +00009376
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009377
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9379$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009380if test ! "$LIBRARY" = "$LDLIBRARY"
9381then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009382 case $ac_sys_system in
9383 CYGWIN*)
9384 # Cygwin needs CCSHARED when building extension DLLs
9385 # but not when building the interpreter DLL.
9386 CFLAGSFORSHARED='';;
9387 *)
9388 CFLAGSFORSHARED='$(CCSHARED)'
9389 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9392$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009393
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009394# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9395# library (with --enable-shared).
9396# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009397# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9398# if it is not required, since it creates a dependency of the shared library
9399# to LIBS. This, in turn, means that applications linking the shared libpython
9400# don't need to link LIBS explicitly. The default should be only changed
9401# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9404$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009405case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009407 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009408esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9410$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009411
9412
Guido van Rossum627b2d71993-12-24 10:39:16 +00009413# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9415$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009416if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009417 $as_echo_n "(cached) " >&6
9418else
9419 ac_check_lib_save_LIBS=$LIBS
9420LIBS="-lsendfile $LIBS"
9421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9422/* end confdefs.h. */
9423
9424/* Override any GCC internal prototype to avoid an error.
9425 Use char because int might match the return type of a GCC
9426 builtin and then its argument prototype would still apply. */
9427#ifdef __cplusplus
9428extern "C"
9429#endif
9430char sendfile ();
9431int
9432main ()
9433{
9434return sendfile ();
9435 ;
9436 return 0;
9437}
9438_ACEOF
9439if ac_fn_c_try_link "$LINENO"; then :
9440 ac_cv_lib_sendfile_sendfile=yes
9441else
9442 ac_cv_lib_sendfile_sendfile=no
9443fi
9444rm -f core conftest.err conftest.$ac_objext \
9445 conftest$ac_exeext conftest.$ac_ext
9446LIBS=$ac_check_lib_save_LIBS
9447fi
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9449$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009451 cat >>confdefs.h <<_ACEOF
9452#define HAVE_LIBSENDFILE 1
9453_ACEOF
9454
9455 LIBS="-lsendfile $LIBS"
9456
9457fi
9458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9460$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009461if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009463else
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009465LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469/* Override any GCC internal prototype to avoid an error.
9470 Use char because int might match the return type of a GCC
9471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472#ifdef __cplusplus
9473extern "C"
9474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009475char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009476int
9477main ()
9478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ;
9481 return 0;
9482}
9483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009486else
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489rm -f core conftest.err conftest.$ac_objext \
9490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9494$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 cat >>confdefs.h <<_ACEOF
9497#define HAVE_LIBDL 1
9498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009500 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009501
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009502fi
9503 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9505$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009506if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508else
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009510LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514/* Override any GCC internal prototype to avoid an error.
9515 Use char because int might match the return type of a GCC
9516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517#ifdef __cplusplus
9518extern "C"
9519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009520char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521int
9522main ()
9523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ;
9526 return 0;
9527}
9528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534rm -f core conftest.err conftest.$ac_objext \
9535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9539$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009540if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 cat >>confdefs.h <<_ACEOF
9542#define HAVE_LIBDLD 1
9543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009545 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547fi
9548 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009549
Michael Felt0d3ccb42017-12-30 22:39:20 +01009550# checks for uuid.h location
9551for ac_header in uuid/uuid.h uuid.h
9552do :
9553 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9554ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9555if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9556 cat >>confdefs.h <<_ACEOF
9557#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9558_ACEOF
9559
9560fi
9561
9562done
9563
9564
Berker Peksag9a10ff42017-11-08 23:09:16 +03009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9566$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9568/* end confdefs.h. */
9569#include <uuid/uuid.h>
9570int
9571main ()
9572{
9573
9574#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009575void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009576#endif
9577
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582if ac_fn_c_try_compile "$LINENO"; then :
9583
9584$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9585
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9587$as_echo "yes" >&6; }
9588else
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590$as_echo "no" >&6; }
9591
9592fi
9593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594
Michael Felt0d3ccb42017-12-30 22:39:20 +01009595# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009596# FreeBSD and OpenBSD provides support as well
9597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9598$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9600/* end confdefs.h. */
9601#include <uuid.h>
9602int
9603main ()
9604{
9605
9606#ifndef uuid_create
9607void *x = uuid_create
9608#endif
9609
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614if ac_fn_c_try_compile "$LINENO"; then :
9615
9616$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9617
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9619$as_echo "yes" >&6; }
9620else
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
9623
9624fi
9625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9626
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009627# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9628# stream in big-endian byte-order
9629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9630$as_echo_n "checking for uuid_enc_be... " >&6; }
9631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9632/* end confdefs.h. */
9633#include <uuid.h>
9634int
9635main ()
9636{
9637
9638#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009639void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009640#endif
9641
9642 ;
9643 return 0;
9644}
9645_ACEOF
9646if ac_fn_c_try_compile "$LINENO"; then :
9647
9648$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9649
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9651$as_echo "yes" >&6; }
9652else
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9654$as_echo "no" >&6; }
9655
9656fi
9657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9658
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009659# 'Real Time' functions on Solaris
9660# posix4 on Solaris 2.6
9661# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009663$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009664if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009666else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009667 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009677char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686for ac_lib in '' pthread rt posix4; do
9687 if test -z "$ac_lib"; then
9688 ac_res="none required"
9689 else
9690 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009691 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009698 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701done
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704else
9705 ac_cv_search_sem_init=no
9706fi
9707rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009708LIBS=$ac_func_search_save_LIBS
9709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9711$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009713if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009715
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009716fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009717
Martin v. Löwis519adae2003-09-20 10:47:47 +00009718
Martin v. Löwis19d17342003-06-14 21:03:05 +00009719# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9721$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009724else
9725 ac_check_lib_save_LIBS=$LIBS
9726LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730/* Override any GCC internal prototype to avoid an error.
9731 Use char because int might match the return type of a GCC
9732 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009733#ifdef __cplusplus
9734extern "C"
9735#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009736char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009737int
9738main ()
9739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009741 ;
9742 return 0;
9743}
9744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009746 ac_cv_lib_intl_textdomain=yes
9747else
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750rm -f core conftest.err conftest.$ac_objext \
9751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009752LIBS=$ac_check_lib_save_LIBS
9753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9755$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009756if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009757
Matthias Kloseb9621712010-04-24 17:59:49 +00009758$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009759
Brett Cannonc6d936e2009-06-07 20:09:53 +00009760 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009761fi
9762
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009763
9764# checks for system dependent C++ extensions support
9765case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9767$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009770
Georg Brandl59e87bd2011-02-15 19:48:59 +00009771 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009775loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ;
9777 return 0;
9778}
Matthias Kloseb159a552010-04-25 21:00:44 +00009779
Martin v. Löwis11437992002-04-12 09:54:03 +00009780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009781if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009782
Matthias Kloseb159a552010-04-25 21:00:44 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009785
Matthias Kloseb159a552010-04-25 21:00:44 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009787$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009788
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009789else
Matthias Kloseb159a552010-04-25 21:00:44 +00009790
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009792$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009793
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795rm -f core conftest.err conftest.$ac_objext \
9796 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009797 *) ;;
9798esac
9799
Christian Heimes985ecdc2013-11-20 11:46:18 +01009800# check for systems that require aligned memory access
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9802$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009803if ${ac_cv_aligned_required+:} false; then :
9804 $as_echo_n "(cached) " >&6
9805else
9806 if test "$cross_compiling" = yes; then :
9807 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009808else
9809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810/* end confdefs.h. */
9811
9812int main()
9813{
9814 char s[16];
9815 int i, *p1, *p2;
9816 for (i=0; i < 16; i++)
9817 s[i] = i;
9818 p1 = (int*)(s+1);
9819 p2 = (int*)(s+2);
9820 if (*p1 == *p2)
9821 return 1;
9822 return 0;
9823}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009824_ACEOF
9825if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009826 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009827else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009828 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009829fi
9830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9831 conftest.$ac_objext conftest.beam conftest.$ac_ext
9832fi
9833
9834
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009835fi
9836
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9838$as_echo "$ac_cv_aligned_required" >&6; }
9839if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009840
9841$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9842
9843fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009844
9845# str, bytes and memoryview hash algorithm
9846
9847
9848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9849$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9850
9851# Check whether --with-hash_algorithm was given.
9852if test "${with_hash_algorithm+set}" = set; then :
9853 withval=$with_hash_algorithm;
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9855$as_echo "$withval" >&6; }
9856case "$withval" in
9857 siphash24)
9858 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9859
9860 ;;
9861 fnv)
9862 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9863
9864 ;;
9865 *)
9866 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9867 ;;
9868esac
9869
9870else
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9872$as_echo "default" >&6; }
9873fi
9874
9875
Charles-François Natalid30b0222014-05-08 23:08:51 +01009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9877$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9878
9879# Check whether --with-address_sanitizer was given.
9880if test "${with_address_sanitizer+set}" = set; then :
9881 withval=$with_address_sanitizer;
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9883$as_echo "$withval" >&6; }
9884BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9885LDFLAGS="-fsanitize=address $LDFLAGS"
9886
9887else
9888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889$as_echo "no" >&6; }
9890fi
9891
9892
Guido van Rossum70c7f481998-03-26 18:44:10 +00009893# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9895$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009896if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009898else
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009900LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904/* Override any GCC internal prototype to avoid an error.
9905 Use char because int might match the return type of a GCC
9906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009907#ifdef __cplusplus
9908extern "C"
9909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009910char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009911int
9912main ()
9913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ;
9916 return 0;
9917}
9918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009921else
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009924rm -f core conftest.err conftest.$ac_objext \
9925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9929$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009930if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009931 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009932fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009933 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9935$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009938else
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009940LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009950char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009951int
9952main ()
9953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964rm -f core conftest.err conftest.$ac_objext \
9965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009966LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9969$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009971 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009972fi
9973 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9976$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009979if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9982$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009983LIBS="$withval $LIBS"
9984
9985else
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988fi
9989
Guido van Rossum7f43da71994-08-01 12:15:30 +00009990
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08009991
9992
9993
9994
9995
9996
9997
9998if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9999 if test -n "$ac_tool_prefix"; then
10000 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10001set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10003$as_echo_n "checking for $ac_word... " >&6; }
10004if ${ac_cv_path_PKG_CONFIG+:} false; then :
10005 $as_echo_n "(cached) " >&6
10006else
10007 case $PKG_CONFIG in
10008 [\\/]* | ?:[\\/]*)
10009 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10010 ;;
10011 *)
10012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10013for as_dir in $PATH
10014do
10015 IFS=$as_save_IFS
10016 test -z "$as_dir" && as_dir=.
10017 for ac_exec_ext in '' $ac_executable_extensions; do
10018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10019 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10021 break 2
10022 fi
10023done
10024 done
10025IFS=$as_save_IFS
10026
10027 ;;
10028esac
10029fi
10030PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10031if test -n "$PKG_CONFIG"; then
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10033$as_echo "$PKG_CONFIG" >&6; }
10034else
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
10037fi
10038
10039
10040fi
10041if test -z "$ac_cv_path_PKG_CONFIG"; then
10042 ac_pt_PKG_CONFIG=$PKG_CONFIG
10043 # Extract the first word of "pkg-config", so it can be a program name with args.
10044set dummy pkg-config; ac_word=$2
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10046$as_echo_n "checking for $ac_word... " >&6; }
10047if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10048 $as_echo_n "(cached) " >&6
10049else
10050 case $ac_pt_PKG_CONFIG in
10051 [\\/]* | ?:[\\/]*)
10052 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10053 ;;
10054 *)
10055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056for as_dir in $PATH
10057do
10058 IFS=$as_save_IFS
10059 test -z "$as_dir" && as_dir=.
10060 for ac_exec_ext in '' $ac_executable_extensions; do
10061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064 break 2
10065 fi
10066done
10067 done
10068IFS=$as_save_IFS
10069
10070 ;;
10071esac
10072fi
10073ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10074if test -n "$ac_pt_PKG_CONFIG"; then
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10076$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10077else
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082 if test "x$ac_pt_PKG_CONFIG" = x; then
10083 PKG_CONFIG=""
10084 else
10085 case $cross_compiling:$ac_tool_warned in
10086yes:)
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10088$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10089ac_tool_warned=yes ;;
10090esac
10091 PKG_CONFIG=$ac_pt_PKG_CONFIG
10092 fi
10093else
10094 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10095fi
10096
10097fi
10098if test -n "$PKG_CONFIG"; then
10099 _pkg_min_version=0.9.0
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10101$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10102 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10104$as_echo "yes" >&6; }
10105 else
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108 PKG_CONFIG=""
10109 fi
10110fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010111
10112# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10114$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010115
10116# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010117if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010118 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010119else
10120 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010121fi
10122
10123
Matthias Kloseb9621712010-04-24 17:59:49 +000010124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10125$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010126
10127# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10129$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010130
10131# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010132if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010133 withval=$with_system_ffi;
10134fi
10135
10136
Zachary Waref40d4dd2016-09-17 01:25:24 -050010137if test "$ac_sys_system" = "Darwin"
10138then
10139 case "$with_system_ffi" in
10140 "")
10141 with_system_ffi="no"
10142 ;;
10143 yes|no)
10144 ;;
10145 *)
10146 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10147 ;;
10148 esac
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10150$as_echo "$with_system_ffi" >&6; }
10151else
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10153$as_echo "yes" >&6; }
10154 if test "$with_system_ffi" != ""
10155 then
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10157$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10158 fi
10159 with_system_ffi="yes"
10160fi
Zachary Ware935043d2016-09-09 17:01:21 -070010161
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010162if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010163 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10164else
10165 LIBFFI_INCLUDEDIR=""
10166fi
10167
10168
Stefan Krah60187b52012-03-23 19:06:27 +010010169# Check for use of the system libmpdec library
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10171$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10172
10173# Check whether --with-system_libmpdec was given.
10174if test "${with_system_libmpdec+set}" = set; then :
10175 withval=$with_system_libmpdec;
10176else
10177 with_system_libmpdec="no"
10178fi
10179
10180
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10182$as_echo "$with_system_libmpdec" >&6; }
10183
Benjamin Peterson076ed002010-10-31 17:11:02 +000010184# Check for support for loadable sqlite extensions
10185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10186$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10187# Check whether --enable-loadable-sqlite-extensions was given.
10188if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10189 enableval=$enable_loadable_sqlite_extensions;
10190else
10191 enable_loadable_sqlite_extensions="no"
10192fi
10193
10194
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10196$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10197
Ned Deilyd819b932013-09-06 01:07:05 -070010198# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10199
10200
10201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10202$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10203
10204# Check whether --with-tcltk-includes was given.
10205if test "${with_tcltk_includes+set}" = set; then :
10206 withval=$with_tcltk_includes;
10207else
10208 with_tcltk_includes="default"
10209fi
10210
10211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10212$as_echo "$with_tcltk_includes" >&6; }
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10214$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10215
10216# Check whether --with-tcltk-libs was given.
10217if test "${with_tcltk_libs+set}" = set; then :
10218 withval=$with_tcltk_libs;
10219else
10220 with_tcltk_libs="default"
10221fi
10222
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10224$as_echo "$with_tcltk_libs" >&6; }
10225if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10226then
10227 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10228 then
10229 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10230 fi
10231 TCLTK_INCLUDES=""
10232 TCLTK_LIBS=""
10233else
10234 TCLTK_INCLUDES="$with_tcltk_includes"
10235 TCLTK_LIBS="$with_tcltk_libs"
10236fi
10237
Matthias Klose55708cc2009-04-30 08:06:49 +000010238# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10240$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010241
10242# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010243if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010244 withval=$with_dbmliborder;
10245if test x$with_dbmliborder = xyes
10246then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010247as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010248else
10249 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10250 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10251 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010252 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010253 fi
10254 done
10255fi
10256fi
10257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10259$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
10263# Templates for things AC_DEFINEd more than once.
10264# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010265
10266
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010267if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010268then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010269 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010271
10272 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010273elif test "$ac_cv_kpthread" = "yes"
10274then
10275 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010276 if test "$ac_cv_cxx_thread" = "yes"; then
10277 CXX="$CXX -Kpthread"
10278 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010279 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010280elif test "$ac_cv_kthread" = "yes"
10281then
10282 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010283 if test "$ac_cv_cxx_thread" = "yes"; then
10284 CXX="$CXX -Kthread"
10285 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010286 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010287elif test "$ac_cv_pthread" = "yes"
10288then
10289 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010290 if test "$ac_cv_cxx_thread" = "yes"; then
10291 CXX="$CXX -pthread"
10292 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010293 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010294else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010295 if test ! -z "$withval" -a -d "$withval"
10296 then LDFLAGS="$LDFLAGS -L$withval"
10297 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010298
10299 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010300 # define _POSIX_THREADS in unistd.h. Some apparently don't
10301 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10303$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010306
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010307#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010308#ifdef _POSIX_THREADS
10309yes
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
10312_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315 unistd_defines_pthreads=yes
10316else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317 unistd_defines_pthreads=no
10318fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010319rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10322$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010325
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010326 # Just looking for pthread_create in libpthread is not enough:
10327 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10328 # So we really have to include pthread.h, and then link.
10329 _libs=$LIBS
10330 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10332$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010334/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010335
10336#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010337#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010338
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010339void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010343
10344pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10352$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010353 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010354
Guido van Rossum02a1c402000-02-25 19:26:31 +000010355else
Martin v. Löwis11437992002-04-12 09:54:03 +000010356
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010357 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010359if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010360
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010361 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010362
Guido van Rossumad678af1998-10-02 14:42:15 +000010363else
Guido van Rossumad678af1998-10-02 14:42:15 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10366$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010367if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010369else
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010371LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375/* Override any GCC internal prototype to avoid an error.
10376 Use char because int might match the return type of a GCC
10377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378#ifdef __cplusplus
10379extern "C"
10380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010381char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010382int
10383main ()
10384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ;
10387 return 0;
10388}
10389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010392else
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010395rm -f core conftest.err conftest.$ac_objext \
10396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010397LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10400$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010401if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010402
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010403 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010404 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010405
Greg Steinadf63d62000-07-05 10:38:09 +000010406else
Greg Steinadf63d62000-07-05 10:38:09 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10409$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010410if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010414LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418/* Override any GCC internal prototype to avoid an error.
10419 Use char because int might match the return type of a GCC
10420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421#ifdef __cplusplus
10422extern "C"
10423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010424char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010425int
10426main ()
10427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 ;
10430 return 0;
10431}
10432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010435else
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010438rm -f core conftest.err conftest.$ac_objext \
10439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010440LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10443$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010444if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010447 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010448
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010449else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10452$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010455else
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010457LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#ifdef __cplusplus
10465extern "C"
10466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010467char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10486$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010487if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010488
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010489 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010490 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010491
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010492else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010493
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10495$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010496if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498else
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010500LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504/* Override any GCC internal prototype to avoid an error.
10505 Use char because int might match the return type of a GCC
10506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010507#ifdef __cplusplus
10508extern "C"
10509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010510char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010511int
10512main ()
10513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ;
10516 return 0;
10517}
10518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010521else
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010524rm -f core conftest.err conftest.$ac_objext \
10525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010526LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10529$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010530if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010533 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010534
Guido van Rossumb93a8621998-05-07 13:27:32 +000010535else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010536
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010537 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10538
Guido van Rossum2d38f911996-06-26 19:47:01 +000010539fi
10540
Guido van Rossum627b2d71993-12-24 10:39:16 +000010541
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010542fi
10543
Guido van Rossum0be3e491997-05-22 20:33:33 +000010544fi
10545
Guido van Rossum49545951997-12-02 19:28:29 +000010546fi
10547
Guido van Rossumb93a8621998-05-07 13:27:32 +000010548fi
10549
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010551rm -f core conftest.err conftest.$ac_objext \
10552 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10555$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010556if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010558else
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010560LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564/* Override any GCC internal prototype to avoid an error.
10565 Use char because int might match the return type of a GCC
10566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010567#ifdef __cplusplus
10568extern "C"
10569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010570char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010571int
10572main ()
10573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core conftest.err conftest.$ac_objext \
10585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010586LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10589$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010591
Martin v. Löwis130fb172001-07-19 11:00:41 +000010592 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010593
Guido van Rossum627b2d71993-12-24 10:39:16 +000010594fi
10595
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010596
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010598
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599if test "$posix_threads" = "yes"; then
10600 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603
10604 fi
10605
10606 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10607 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010608 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611 ;;
10612 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614
10615 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010616 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010617$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010618
10619 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620 esac
10621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10623$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626else
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628 ac_cv_pthread_system_supported=no
10629else
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010632
10633 #include <stdio.h>
10634 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635 void *foo(void *parm) {
10636 return NULL;
10637 }
10638 main() {
10639 pthread_attr_t attr;
10640 pthread_t id;
10641 if (pthread_attr_init(&attr)) exit(-1);
10642 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10643 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10644 exit(0);
10645 }
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648 ac_cv_pthread_system_supported=yes
10649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656
Guido van Rossum627b2d71993-12-24 10:39:16 +000010657fi
10658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10660$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661 if test "$ac_cv_pthread_system_supported" = "yes"; then
10662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664
10665 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 for ac_func in pthread_sigmask
10667do :
10668 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010669if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010673 case $ac_sys_system in
10674 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010677
10678 ;;
10679 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680fi
10681done
10682
pdoxe14679c2017-10-05 00:01:56 -070010683 for ac_func in pthread_getcpuclockid
10684do :
10685 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10686if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10687 cat >>confdefs.h <<_ACEOF
10688#define HAVE_PTHREAD_GETCPUCLOCKID 1
10689_ACEOF
10690
10691fi
10692done
10693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694fi
10695
10696
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10700$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010702if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707 ipv6=no
10708 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10710$as_echo "yes" >&6; }
10711 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712
10713 ipv6=yes
10714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716else
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010719/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720 /* AF_INET6 available check */
10721#include <sys/types.h>
10722#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010723int
10724main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010726int domain = AF_INET6;
10727 ;
10728 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729}
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010731if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10734$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737else
Matthias Kloseb159a552010-04-25 21:00:44 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010746if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10748$as_echo_n "checking if RFC2553 API is available... " >&6; }
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010751
10752 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010753#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010754int
10755main ()
10756{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010758 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ;
10760 return 0;
10761}
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
Martin v. Löwis11437992002-04-12 09:54:03 +000010763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010764if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010767$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010768 ipv6=yes
10769
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010770else
Matthias Kloseb159a552010-04-25 21:00:44 +000010771
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010774 ipv6=no
10775
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010778fi
10779
10780if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782
10783fi
10784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785fi
10786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787
10788ipv6type=unknown
10789ipv6lib=none
10790ipv6trylibc=no
10791
10792if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10794$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010795 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10796 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 case $i in
10798 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include <netinet/in.h>
10803#ifdef IPV6_INRIA_VERSION
10804yes
10805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010809 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812
10813 ;;
10814 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818#include <netinet/in.h>
10819#ifdef __KAME__
10820yes
10821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 ipv6type=$i;
10826 ipv6lib=inet6
10827 ipv6libdir=/usr/local/v6/lib
10828 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831
10832 ;;
10833 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837#include <features.h>
10838#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10839yes
10840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844 ipv6type=$i;
10845 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848
10849 ;;
10850 linux-inet6)
10851 if test -d /usr/inet6; then
10852 ipv6type=$i
10853 ipv6lib=inet6
10854 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010855 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 fi
10857 ;;
10858 solaris)
10859 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010860 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i
10862 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863 fi
10864 fi
10865 ;;
10866 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870#include <sys/param.h>
10871#ifdef _TOSHIBA_INET6
10872yes
10873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 ipv6type=$i;
10878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882
10883 ;;
10884 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include </usr/local/v6/include/sys/v6config.h>
10889#ifdef __V6D__
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i;
10896 ipv6lib=v6;
10897 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010898 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010900rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901
10902 ;;
10903 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907#include <sys/param.h>
10908#ifdef _ZETA_MINAMI_INET6
10909yes
10910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914 ipv6type=$i;
10915 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010916 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919
10920 ;;
10921 esac
10922 if test "$ipv6type" != "unknown"; then
10923 break
10924 fi
10925 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10927$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928fi
10929
10930if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10931 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10932 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10933 echo "using lib$ipv6lib"
10934 else
10935 if test $ipv6trylibc = "yes"; then
10936 echo "using libc"
10937 else
10938 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10939 echo "You need to fetch lib$ipv6lib.a from appropriate"
10940 echo 'ipv6 kit and compile beforehand.'
10941 exit 1
10942 fi
10943 fi
10944fi
10945
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10947$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949/* end confdefs.h. */
10950 /* CAN_RAW_FD_FRAMES available check */
10951#include <linux/can/raw.h>
10952int
10953main ()
10954{
10955int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10956 ;
10957 return 0;
10958}
10959_ACEOF
10960if ac_fn_c_try_compile "$LINENO"; then :
10961
10962
10963$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10964
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10966$as_echo "yes" >&6; }
10967
10968else
10969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972
10973fi
10974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10975
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010976# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10978$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 withval=$with_doc_strings;
10983fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010984
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010985
10986if test -z "$with_doc_strings"
10987then with_doc_strings="yes"
10988fi
10989if test "$with_doc_strings" != "no"
10990then
10991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010993
10994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10996$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010998# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11000$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 withval=$with_pymalloc;
11005fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011006
Neil Schemenauera35c6882001-02-27 04:45:05 +000011007
Neil Schemenauer16c22972002-03-22 15:34:49 +000011008if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011009then
11010 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011011fi
11012if test "$with_pymalloc" != "no"
11013then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011017 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11020$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011021
Nick Coghlan6ea41862017-06-11 13:16:15 +100011022# Check for --with-c-locale-coercion
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11024$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11025
11026# Check whether --with-c-locale-coercion was given.
11027if test "${with_c_locale_coercion+set}" = set; then :
11028 withval=$with_c_locale_coercion;
11029fi
11030
11031
11032if test -z "$with_c_locale_coercion"
11033then
11034 with_c_locale_coercion="yes"
11035fi
11036if test "$with_c_locale_coercion" != "no"
11037then
11038
11039$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11040
11041fi
11042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11043$as_echo "$with_c_locale_coercion" >&6; }
11044
Benjamin Peterson05159c42009-12-03 03:01:27 +000011045# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11047$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048
11049# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011051 withval=$with_valgrind;
11052else
11053 with_valgrind=no
11054fi
11055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11057$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 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 +020011060if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063
11064else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011065 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066
11067fi
11068
11069
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011070 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011071fi
11072
Łukasz Langaa785c872016-09-09 17:37:37 -070011073# Check for DTrace support
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11075$as_echo_n "checking for --with-dtrace... " >&6; }
11076
11077# Check whether --with-dtrace was given.
11078if test "${with_dtrace+set}" = set; then :
11079 withval=$with_dtrace;
11080else
11081 with_dtrace=no
11082fi
11083
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11085$as_echo "$with_dtrace" >&6; }
11086
11087
11088
11089
11090
11091DTRACE=
11092DFLAGS=
11093DTRACE_HEADERS=
11094DTRACE_OBJS=
11095
11096if test "$with_dtrace" = "yes"
11097then
11098 # Extract the first word of "dtrace", so it can be a program name with args.
11099set dummy dtrace; ac_word=$2
11100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11101$as_echo_n "checking for $ac_word... " >&6; }
11102if ${ac_cv_path_DTRACE+:} false; then :
11103 $as_echo_n "(cached) " >&6
11104else
11105 case $DTRACE in
11106 [\\/]* | ?:[\\/]*)
11107 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11108 ;;
11109 *)
11110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11111for as_dir in $PATH
11112do
11113 IFS=$as_save_IFS
11114 test -z "$as_dir" && as_dir=.
11115 for ac_exec_ext in '' $ac_executable_extensions; do
11116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11117 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11119 break 2
11120 fi
11121done
11122 done
11123IFS=$as_save_IFS
11124
11125 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11126 ;;
11127esac
11128fi
11129DTRACE=$ac_cv_path_DTRACE
11130if test -n "$DTRACE"; then
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11132$as_echo "$DTRACE" >&6; }
11133else
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11135$as_echo "no" >&6; }
11136fi
11137
11138
11139 if test "$DTRACE" = "not found"; then
11140 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11141 fi
11142
11143$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11144
11145 DTRACE_HEADERS="Include/pydtrace_probes.h"
11146
11147 # On OS X, DTrace providers do not need to be explicitly compiled and
11148 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11149 # generation flag '-G'. We check for presence of this flag, rather than
11150 # hardcoding support by OS, in the interest of robustness.
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11152$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11153if ${ac_cv_dtrace_link+:} false; then :
11154 $as_echo_n "(cached) " >&6
11155else
11156 ac_cv_dtrace_link=no
11157 echo 'BEGIN' > conftest.d
11158 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11159 ac_cv_dtrace_link=yes
11160
11161fi
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11163$as_echo "$ac_cv_dtrace_link" >&6; }
11164 if test "$ac_cv_dtrace_link" = "yes"; then
11165 DTRACE_OBJS="Python/pydtrace.o"
11166 fi
11167fi
11168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011169# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011170
Guido van Rossum98935bf2001-09-05 19:13:16 +000011171DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011172
Guido van Rossume97ee181999-12-20 21:27:22 +000011173# the dlopen() function means we might want to use dynload_shlib.o. some
11174# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011175for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011176do :
11177 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011178if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011182
Guido van Rossume97ee181999-12-20 21:27:22 +000011183fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011184done
Guido van Rossume97ee181999-12-20 21:27:22 +000011185
Michael W. Hudson54241132001-12-07 15:38:26 +000011186
Guido van Rossume97ee181999-12-20 21:27:22 +000011187# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11188# loading of modules.
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11191$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011192if test -z "$DYNLOADFILE"
11193then
11194 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011195 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11196 if test "$ac_cv_func_dlopen" = yes
11197 then DYNLOADFILE="dynload_shlib.o"
11198 else DYNLOADFILE="dynload_aix.o"
11199 fi
11200 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011201 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011202 *)
11203 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11204 # out any dynamic loading
11205 if test "$ac_cv_func_dlopen" = yes
11206 then DYNLOADFILE="dynload_shlib.o"
11207 else DYNLOADFILE="dynload_stub.o"
11208 fi
11209 ;;
11210 esac
11211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11213$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011214if test "$DYNLOADFILE" != "dynload_stub.o"
11215then
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011218
11219fi
11220
Neil Schemenauer4e425612001-06-19 15:44:15 +000011221# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11222
Michael W. Hudson54241132001-12-07 15:38:26 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11225$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011226if test -z "$MACHDEP_OBJS"
11227then
Jack Jansene578a632001-08-15 01:27:14 +000011228 MACHDEP_OBJS=$extra_machdep_objs
11229else
11230 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011231fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011232if test -z "$MACHDEP_OBJS"; then
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11234$as_echo "none" >&6; }
11235else
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11237$as_echo "$MACHDEP_OBJS" >&6; }
11238fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011239
Guido van Rossum627b2d71993-12-24 10:39:16 +000011240# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011241for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011242 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011243 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011244 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011245 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011246 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011247 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011248 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011249 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011250 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011251 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011252 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011253 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011254 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011255 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011256 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11257 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011258 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011259 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011260 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011261 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011262 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011263do :
11264 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11265ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011266if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011267 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011269_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011271fi
11272done
11273
Michael W. Hudson54241132001-12-07 15:38:26 +000011274
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011275ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11276 #include <dirent.h>
11277"
11278if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11279
11280$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11281
11282fi
11283
11284
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011285# For some functions, having a definition is not sufficient, since
11286# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11288$as_echo_n "checking for chroot... " >&6; }
11289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011292int
11293main ()
11294{
11295void *x=chroot
11296 ;
11297 return 0;
11298}
11299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011301
Matthias Kloseb9621712010-04-24 17:59:49 +000011302$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011303
Matthias Kloseb159a552010-04-25 21:00:44 +000011304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306else
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309
11310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11313$as_echo_n "checking for link... " >&6; }
11314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011315/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011316#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011317int
11318main ()
11319{
11320void *x=link
11321 ;
11322 return 0;
11323}
11324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328
Matthias Kloseb159a552010-04-25 21:00:44 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331else
Matthias Kloseb9621712010-04-24 17:59:49 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334
11335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11338$as_echo_n "checking for symlink... " >&6; }
11339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011340/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011342int
11343main ()
11344{
11345void *x=symlink
11346 ;
11347 return 0;
11348}
11349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353
Matthias Kloseb159a552010-04-25 21:00:44 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356else
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359
11360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11363$as_echo_n "checking for fchdir... " >&6; }
11364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011365/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011366#include <unistd.h>
11367int
11368main ()
11369{
11370void *x=fchdir
11371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011378
Matthias Kloseb159a552010-04-25 21:00:44 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381else
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384
11385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11388$as_echo_n "checking for fsync... " >&6; }
11389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011390/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011391#include <unistd.h>
11392int
11393main ()
11394{
11395void *x=fsync
11396 ;
11397 return 0;
11398}
11399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011401
Matthias Kloseb9621712010-04-24 17:59:49 +000011402$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403
Matthias Kloseb159a552010-04-25 21:00:44 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406else
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409
11410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11413$as_echo_n "checking for fdatasync... " >&6; }
11414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011415/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011416#include <unistd.h>
11417int
11418main ()
11419{
11420void *x=fdatasync
11421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428
Matthias Kloseb159a552010-04-25 21:00:44 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11433$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011434
11435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11438$as_echo_n "checking for epoll... " >&6; }
11439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011440/* end confdefs.h. */
11441#include <sys/epoll.h>
11442int
11443main ()
11444{
11445void *x=epoll_create
11446 ;
11447 return 0;
11448}
11449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011453
Matthias Kloseb159a552010-04-25 21:00:44 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011455$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011456else
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459
11460fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11463$as_echo_n "checking for epoll_create1... " >&6; }
11464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11465/* end confdefs.h. */
11466#include <sys/epoll.h>
11467int
11468main ()
11469{
11470void *x=epoll_create1
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475if ac_fn_c_try_compile "$LINENO"; then :
11476
11477$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11478
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11480$as_echo "yes" >&6; }
11481else
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
11484
11485fi
11486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11488$as_echo_n "checking for kqueue... " >&6; }
11489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011490/* end confdefs.h. */
11491
11492#include <sys/types.h>
11493#include <sys/event.h>
11494
11495int
11496main ()
11497{
11498int x=kqueue()
11499 ;
11500 return 0;
11501}
11502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011506
Matthias Kloseb159a552010-04-25 21:00:44 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011508$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011509else
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011512
11513fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11516$as_echo_n "checking for prlimit... " >&6; }
11517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11518/* end confdefs.h. */
11519
11520#include <sys/time.h>
11521#include <sys/resource.h>
11522
11523int
11524main ()
11525{
11526void *x=prlimit
11527 ;
11528 return 0;
11529}
11530_ACEOF
11531if ac_fn_c_try_compile "$LINENO"; then :
11532
11533$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11534
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11536$as_echo "yes" >&6; }
11537else
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539$as_echo "no" >&6; }
11540
11541fi
11542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11543
Martin v. Löwisd5843682002-11-21 20:41:28 +000011544# On some systems (eg. FreeBSD 5), we would find a definition of the
11545# functions ctermid_r, setgroups in the library, but no prototype
11546# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11547# address to avoid compiler warnings and potential miscompilations
11548# because of the missing prototypes.
11549
Matthias Kloseb9621712010-04-24 17:59:49 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11551$as_echo_n "checking for ctermid_r... " >&6; }
11552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011554
Martin v. Löwisd5843682002-11-21 20:41:28 +000011555#include <stdio.h>
11556
Martin v. Löwisd5843682002-11-21 20:41:28 +000011557int
11558main ()
11559{
11560void* p = ctermid_r
11561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011568
Matthias Kloseb159a552010-04-25 21:00:44 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011574
11575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11577
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11579$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011580if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011581 $as_echo_n "(cached) " >&6
11582else
11583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011584/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011585#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011586int
11587main ()
11588{
11589void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011590
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011596 ac_cv_flock_decl=yes
11597else
11598 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011599
11600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011602
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011603fi
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11605$as_echo "$ac_cv_flock_decl" >&6; }
11606if test "x${ac_cv_flock_decl}" = xyes; then
11607 for ac_func in flock
11608do :
11609 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011610if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611 cat >>confdefs.h <<_ACEOF
11612#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011613_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011614
Antoine Pitroua3000072010-09-07 14:52:42 +000011615else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011617$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011618if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011619 $as_echo_n "(cached) " >&6
11620else
11621 ac_check_lib_save_LIBS=$LIBS
11622LIBS="-lbsd $LIBS"
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11624/* end confdefs.h. */
11625
11626/* Override any GCC internal prototype to avoid an error.
11627 Use char because int might match the return type of a GCC
11628 builtin and then its argument prototype would still apply. */
11629#ifdef __cplusplus
11630extern "C"
11631#endif
11632char flock ();
11633int
11634main ()
11635{
11636return flock ();
11637 ;
11638 return 0;
11639}
11640_ACEOF
11641if ac_fn_c_try_link "$LINENO"; then :
11642 ac_cv_lib_bsd_flock=yes
11643else
11644 ac_cv_lib_bsd_flock=no
11645fi
11646rm -f core conftest.err conftest.$ac_objext \
11647 conftest$ac_exeext conftest.$ac_ext
11648LIBS=$ac_check_lib_save_LIBS
11649fi
11650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11651$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011652if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011653 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011654
11655
11656$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11657
11658
11659fi
11660
11661
11662fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011663done
11664
Antoine Pitroua3000072010-09-07 14:52:42 +000011665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11668$as_echo_n "checking for getpagesize... " >&6; }
11669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011670/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011671
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011672#include <unistd.h>
11673
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011674int
11675main ()
11676{
11677void* p = getpagesize
11678 ;
11679 return 0;
11680}
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011685
Matthias Kloseb159a552010-04-25 21:00:44 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011691
11692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011694
Victor Stinner984890f2011-11-24 13:53:38 +010011695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11696$as_echo_n "checking for broken unsetenv... " >&6; }
11697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11698/* end confdefs.h. */
11699
11700#include <stdlib.h>
11701
11702int
11703main ()
11704{
11705int res = unsetenv("DUMMY")
11706 ;
11707 return 0;
11708}
11709_ACEOF
11710if ac_fn_c_try_compile "$LINENO"; then :
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
11713else
11714
11715$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11716
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11718$as_echo "yes" >&6; }
11719
11720fi
11721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11722
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011723for ac_prog in true
11724do
11725 # Extract the first word of "$ac_prog", so it can be a program name with args.
11726set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011729if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011731else
11732 if test -n "$TRUE"; then
11733 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11734else
11735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11736for as_dir in $PATH
11737do
11738 IFS=$as_save_IFS
11739 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011742 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 $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 +000011744 break 2
11745 fi
11746done
Matthias Kloseb9621712010-04-24 17:59:49 +000011747 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011748IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011749
11750fi
11751fi
11752TRUE=$ac_cv_prog_TRUE
11753if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11755$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011756else
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011759fi
11760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011762 test -n "$TRUE" && break
11763done
11764test -n "$TRUE" || TRUE="/bin/true"
11765
11766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11768$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011771else
11772 ac_check_lib_save_LIBS=$LIBS
11773LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011775/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777/* Override any GCC internal prototype to avoid an error.
11778 Use char because int might match the return type of a GCC
11779 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780#ifdef __cplusplus
11781extern "C"
11782#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784int
11785main ()
11786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011787return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788 ;
11789 return 0;
11790}
11791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793 ac_cv_lib_c_inet_aton=yes
11794else
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797rm -f core conftest.err conftest.$ac_objext \
11798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011799LIBS=$ac_check_lib_save_LIBS
11800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11802$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011803if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011804 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11807$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011808if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810else
11811 ac_check_lib_save_LIBS=$LIBS
11812LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816/* Override any GCC internal prototype to avoid an error.
11817 Use char because int might match the return type of a GCC
11818 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819#ifdef __cplusplus
11820extern "C"
11821#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011822char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823int
11824main ()
11825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827 ;
11828 return 0;
11829}
11830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832 ac_cv_lib_resolv_inet_aton=yes
11833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836rm -f core conftest.err conftest.$ac_objext \
11837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011838LIBS=$ac_check_lib_save_LIBS
11839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11841$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011842if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843 cat >>confdefs.h <<_ACEOF
11844#define HAVE_LIBRESOLV 1
11845_ACEOF
11846
11847 LIBS="-lresolv $LIBS"
11848
11849fi
11850
11851
11852fi
11853
11854
Christian Heimesd0764e22007-12-04 15:00:33 +000011855# On Tru64, chflags seems to be present, but calling it will
11856# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11858$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011859if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861else
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011863 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011864else
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011866/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011867
Christian Heimesd0764e22007-12-04 15:00:33 +000011868#include <sys/stat.h>
11869#include <unistd.h>
11870int main(int argc, char*argv[])
11871{
11872 if(chflags(argv[0], 0) != 0)
11873 return 1;
11874 return 0;
11875}
Ned Deily3eb67d52011-06-28 00:00:28 -070011876
Christian Heimesd0764e22007-12-04 15:00:33 +000011877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011885fi
11886
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11890$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011891if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011893if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011894 ac_cv_have_chflags="yes"
11895else
11896 ac_cv_have_chflags="no"
11897fi
11898
11899fi
11900if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903
11904fi
11905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11907$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011915/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011916
Christian Heimesd0764e22007-12-04 15:00:33 +000011917#include <sys/stat.h>
11918#include <unistd.h>
11919int main(int argc, char*argv[])
11920{
11921 if(lchflags(argv[0], 0) != 0)
11922 return 1;
11923 return 0;
11924}
Ned Deily3eb67d52011-06-28 00:00:28 -070011925
Christian Heimesd0764e22007-12-04 15:00:33 +000011926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011927if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011934fi
11935
11936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11939$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011940if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011942if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011943 ac_cv_have_lchflags="yes"
11944else
11945 ac_cv_have_lchflags="no"
11946fi
11947
11948fi
11949if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011952
11953fi
11954
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011955case $ac_sys_system/$ac_sys_release in
11956Darwin/*)
11957 _CUR_CFLAGS="${CFLAGS}"
11958 _CUR_LDFLAGS="${LDFLAGS}"
11959 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11960 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11961 ;;
11962esac
11963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11965$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011966if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011968else
11969 ac_check_lib_save_LIBS=$LIBS
11970LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011972/* end confdefs.h. */
11973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011974/* Override any GCC internal prototype to avoid an error.
11975 Use char because int might match the return type of a GCC
11976 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011977#ifdef __cplusplus
11978extern "C"
11979#endif
11980char inflateCopy ();
11981int
11982main ()
11983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011985 ;
11986 return 0;
11987}
11988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011989if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990 ac_cv_lib_z_inflateCopy=yes
11991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011994rm -f core conftest.err conftest.$ac_objext \
11995 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011996LIBS=$ac_check_lib_save_LIBS
11997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11999$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012000if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012003
12004fi
12005
12006
12007case $ac_sys_system/$ac_sys_release in
12008Darwin/*)
12009 CFLAGS="${_CUR_CFLAGS}"
12010 LDFLAGS="${_CUR_LDFLAGS}"
12011 ;;
12012esac
12013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12015$as_echo_n "checking for hstrerror... " >&6; }
12016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012017/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012018
Martin v. Löwise9416172003-05-03 10:12:45 +000012019#include <netdb.h>
12020
Martin v. Löwise9416172003-05-03 10:12:45 +000012021int
12022main ()
12023{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012024void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012025 ;
12026 return 0;
12027}
12028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012032
Matthias Kloseb159a552010-04-25 21:00:44 +000012033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012034$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12037$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012038
12039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012040rm -f core conftest.err conftest.$ac_objext \
12041 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12044$as_echo_n "checking for inet_aton... " >&6; }
12045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Martin v. Löwis86d66262006-02-17 08:40:11 +000012048#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012049#include <sys/socket.h>
12050#include <netinet/in.h>
12051#include <arpa/inet.h>
12052
Martin v. Löwise9416172003-05-03 10:12:45 +000012053int
12054main ()
12055{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012057 ;
12058 return 0;
12059}
12060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012064
Matthias Kloseb159a552010-04-25 21:00:44 +000012065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012066$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12069$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012070
12071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012072rm -f core conftest.err conftest.$ac_objext \
12073 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12076$as_echo_n "checking for inet_pton... " >&6; }
12077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012078/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012080#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012081#include <sys/socket.h>
12082#include <netinet/in.h>
12083#include <arpa/inet.h>
12084
Martin v. Löwise9416172003-05-03 10:12:45 +000012085int
12086main ()
12087{
12088void* p = inet_pton
12089 ;
12090 return 0;
12091}
12092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012094
Matthias Kloseb9621712010-04-24 17:59:49 +000012095$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012096
Matthias Kloseb159a552010-04-25 21:00:44 +000012097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012098$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12101$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012102
12103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012105
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012106# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12108$as_echo_n "checking for setgroups... " >&6; }
12109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012110/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012111
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012112#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012113#ifdef HAVE_GRP_H
12114#include <grp.h>
12115#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012116
Martin v. Löwisd5843682002-11-21 20:41:28 +000012117int
12118main ()
12119{
12120void* p = setgroups
12121 ;
12122 return 0;
12123}
12124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012128
Matthias Kloseb159a552010-04-25 21:00:44 +000012129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012130$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12133$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012134
12135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012137
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012138# check for openpty and forkpty
12139
12140for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012141do :
12142 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012146_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012147
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12150$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153else
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159/* Override any GCC internal prototype to avoid an error.
12160 Use char because int might match the return type of a GCC
12161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162#ifdef __cplusplus
12163extern "C"
12164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012165char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012166int
12167main ()
12168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 ;
12171 return 0;
12172}
12173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179rm -f core conftest.err conftest.$ac_objext \
12180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012181LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12184$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12190$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193else
12194 ac_check_lib_save_LIBS=$LIBS
12195LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012197/* end confdefs.h. */
12198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199/* Override any GCC internal prototype to avoid an error.
12200 Use char because int might match the return type of a GCC
12201 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202#ifdef __cplusplus
12203extern "C"
12204#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205char openpty ();
12206int
12207main ()
12208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210 ;
12211 return 0;
12212}
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215 ac_cv_lib_bsd_openpty=yes
12216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221LIBS=$ac_check_lib_save_LIBS
12222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12224$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227 LIBS="$LIBS -lbsd"
12228fi
12229
12230
12231fi
12232
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233
12234fi
12235done
12236
12237for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012238do :
12239 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012243_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012244
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245else
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12247$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012248if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250else
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012252LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256/* Override any GCC internal prototype to avoid an error.
12257 Use char because int might match the return type of a GCC
12258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012259#ifdef __cplusplus
12260extern "C"
12261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012262char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012263int
12264main ()
12265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276rm -f core conftest.err conftest.$ac_objext \
12277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012278LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12281$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012284 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12287$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012288if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012290else
12291 ac_check_lib_save_LIBS=$LIBS
12292LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012294/* end confdefs.h. */
12295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296/* Override any GCC internal prototype to avoid an error.
12297 Use char because int might match the return type of a GCC
12298 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299#ifdef __cplusplus
12300extern "C"
12301#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012302char forkpty ();
12303int
12304main ()
12305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012307 ;
12308 return 0;
12309}
12310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312 ac_cv_lib_bsd_forkpty=yes
12313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012316rm -f core conftest.err conftest.$ac_objext \
12317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012318LIBS=$ac_check_lib_save_LIBS
12319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12321$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012322if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324 LIBS="$LIBS -lbsd"
12325fi
12326
12327
12328fi
12329
Fred Drake8cef4cf2000-06-28 16:40:38 +000012330
12331fi
12332done
12333
Jack Jansendd19cf82001-12-06 22:36:17 +000012334
Michael W. Hudson54241132001-12-07 15:38:26 +000012335# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012336for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012337do :
12338 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12339ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012340if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012341 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012343_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012344
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012345fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346done
12347
Michael W. Hudson54241132001-12-07 15:38:26 +000012348
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012349ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012350if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012351 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012352
Martin v. Löwis1142de32002-03-29 16:28:31 +000012353else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012355 *" dup2.$ac_objext "* ) ;;
12356 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012358esac
12359
Martin v. Löwis1142de32002-03-29 16:28:31 +000012360fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012361
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012362ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012363if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012364 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12365
12366else
12367 case " $LIBOBJS " in
12368 *" strdup.$ac_objext "* ) ;;
12369 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12370 ;;
12371esac
12372
12373fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012374
12375
12376for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012377do :
12378 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012379if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012386int
12387main ()
12388{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ;
12391 return 0;
12392}
12393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012397
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012400
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012402done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403
Jack Jansen150753c2003-03-29 22:07:47 +000012404for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012405do :
12406 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012408 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012413#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012414int
12415main ()
12416{
12417setpgrp(0,0);
12418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012425
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012428
12429fi
12430done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012431
Thomas Wouters3a584202000-08-05 23:28:51 +000012432for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012433do :
12434 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012435if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012437#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012440/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012441#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012442int
12443main ()
12444{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012446 ;
12447 return 0;
12448}
12449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_compile "$LINENO"; then :
12451
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452else
Skip Montanaro6dead952003-09-25 14:50:04 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012455
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Guido van Rossum627b2d71993-12-24 10:39:16 +000012457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012461done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462
Michael W. Hudson54241132001-12-07 15:38:26 +000012463
Victor Stinnere0be4232011-10-25 13:06:09 +020012464for ac_func in clock_gettime
12465do :
12466 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12467if test "x$ac_cv_func_clock_gettime" = xyes; then :
12468 cat >>confdefs.h <<_ACEOF
12469#define HAVE_CLOCK_GETTIME 1
12470_ACEOF
12471
12472else
12473
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12475$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12476if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12477 $as_echo_n "(cached) " >&6
12478else
12479 ac_check_lib_save_LIBS=$LIBS
12480LIBS="-lrt $LIBS"
12481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482/* end confdefs.h. */
12483
12484/* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
12487#ifdef __cplusplus
12488extern "C"
12489#endif
12490char clock_gettime ();
12491int
12492main ()
12493{
12494return clock_gettime ();
12495 ;
12496 return 0;
12497}
12498_ACEOF
12499if ac_fn_c_try_link "$LINENO"; then :
12500 ac_cv_lib_rt_clock_gettime=yes
12501else
12502 ac_cv_lib_rt_clock_gettime=no
12503fi
12504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
12506LIBS=$ac_check_lib_save_LIBS
12507fi
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12509$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12510if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12511
Victor Stinner7efb8332014-08-29 15:41:08 +020012512 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012513 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12514
12515
12516$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12517
12518
12519fi
12520
12521
12522fi
12523done
12524
12525
12526for ac_func in clock_getres
12527do :
12528 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12529if test "x$ac_cv_func_clock_getres" = xyes; then :
12530 cat >>confdefs.h <<_ACEOF
12531#define HAVE_CLOCK_GETRES 1
12532_ACEOF
12533
12534else
12535
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12537$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12538if ${ac_cv_lib_rt_clock_getres+:} false; then :
12539 $as_echo_n "(cached) " >&6
12540else
12541 ac_check_lib_save_LIBS=$LIBS
12542LIBS="-lrt $LIBS"
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12544/* end confdefs.h. */
12545
12546/* Override any GCC internal prototype to avoid an error.
12547 Use char because int might match the return type of a GCC
12548 builtin and then its argument prototype would still apply. */
12549#ifdef __cplusplus
12550extern "C"
12551#endif
12552char clock_getres ();
12553int
12554main ()
12555{
12556return clock_getres ();
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561if ac_fn_c_try_link "$LINENO"; then :
12562 ac_cv_lib_rt_clock_getres=yes
12563else
12564 ac_cv_lib_rt_clock_getres=no
12565fi
12566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
12568LIBS=$ac_check_lib_save_LIBS
12569fi
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12571$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12572if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12573
12574 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12575
12576
12577fi
12578
12579
12580fi
12581done
12582
12583
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012584for ac_func in clock_settime
12585do :
12586 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12587if test "x$ac_cv_func_clock_settime" = xyes; then :
12588 cat >>confdefs.h <<_ACEOF
12589#define HAVE_CLOCK_SETTIME 1
12590_ACEOF
12591
12592else
12593
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12595$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12596if ${ac_cv_lib_rt_clock_settime+:} false; then :
12597 $as_echo_n "(cached) " >&6
12598else
12599 ac_check_lib_save_LIBS=$LIBS
12600LIBS="-lrt $LIBS"
12601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12602/* end confdefs.h. */
12603
12604/* Override any GCC internal prototype to avoid an error.
12605 Use char because int might match the return type of a GCC
12606 builtin and then its argument prototype would still apply. */
12607#ifdef __cplusplus
12608extern "C"
12609#endif
12610char clock_settime ();
12611int
12612main ()
12613{
12614return clock_settime ();
12615 ;
12616 return 0;
12617}
12618_ACEOF
12619if ac_fn_c_try_link "$LINENO"; then :
12620 ac_cv_lib_rt_clock_settime=yes
12621else
12622 ac_cv_lib_rt_clock_settime=no
12623fi
12624rm -f core conftest.err conftest.$ac_objext \
12625 conftest$ac_exeext conftest.$ac_ext
12626LIBS=$ac_check_lib_save_LIBS
12627fi
12628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12629$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12630if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12631
12632 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12633
12634
12635fi
12636
12637
12638fi
12639done
12640
12641
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12643$as_echo_n "checking for major... " >&6; }
12644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012645/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012646
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012647#if defined(MAJOR_IN_MKDEV)
12648#include <sys/mkdev.h>
12649#elif defined(MAJOR_IN_SYSMACROS)
12650#include <sys/sysmacros.h>
12651#else
12652#include <sys/types.h>
12653#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012654
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012655int
12656main ()
12657{
12658
12659 makedev(major(0),minor(0));
12660
12661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012666
12667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12671$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012672
12673else
Skip Montanaro6dead952003-09-25 14:50:04 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12676$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012677
12678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012679rm -f core conftest.err conftest.$ac_objext \
12680 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012681
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012682# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012683# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12685$as_echo_n "checking for getaddrinfo... " >&6; }
12686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012688
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012689#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012690#include <sys/socket.h>
12691#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012692#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012697getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ;
12699 return 0;
12700}
12701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012703 have_getaddrinfo=yes
12704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707rm -f core conftest.err conftest.$ac_objext \
12708 conftest$ac_exeext conftest.$ac_ext
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12710$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012711if test $have_getaddrinfo = yes
12712then
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12714$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012715 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012719
12720if test "${enable_ipv6+set}" = set; then
12721 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12722else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012723 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012724fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012728
Stefan Krah19c21392012-11-22 23:47:32 +010012729#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012730#include <sys/types.h>
12731#include <netdb.h>
12732#include <string.h>
12733#include <sys/socket.h>
12734#include <netinet/in.h>
12735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012736int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012737{
12738 int passive, gaierr, inet4 = 0, inet6 = 0;
12739 struct addrinfo hints, *ai, *aitop;
12740 char straddr[INET6_ADDRSTRLEN], strport[16];
12741
12742 for (passive = 0; passive <= 1; passive++) {
12743 memset(&hints, 0, sizeof(hints));
12744 hints.ai_family = AF_UNSPEC;
12745 hints.ai_flags = passive ? AI_PASSIVE : 0;
12746 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012747 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012748 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12749 (void)gai_strerror(gaierr);
12750 goto bad;
12751 }
12752 for (ai = aitop; ai; ai = ai->ai_next) {
12753 if (ai->ai_addr == NULL ||
12754 ai->ai_addrlen == 0 ||
12755 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12756 straddr, sizeof(straddr), strport, sizeof(strport),
12757 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12758 goto bad;
12759 }
12760 switch (ai->ai_family) {
12761 case AF_INET:
12762 if (strcmp(strport, "54321") != 0) {
12763 goto bad;
12764 }
12765 if (passive) {
12766 if (strcmp(straddr, "0.0.0.0") != 0) {
12767 goto bad;
12768 }
12769 } else {
12770 if (strcmp(straddr, "127.0.0.1") != 0) {
12771 goto bad;
12772 }
12773 }
12774 inet4++;
12775 break;
12776 case AF_INET6:
12777 if (strcmp(strport, "54321") != 0) {
12778 goto bad;
12779 }
12780 if (passive) {
12781 if (strcmp(straddr, "::") != 0) {
12782 goto bad;
12783 }
12784 } else {
12785 if (strcmp(straddr, "::1") != 0) {
12786 goto bad;
12787 }
12788 }
12789 inet6++;
12790 break;
12791 case AF_UNSPEC:
12792 goto bad;
12793 break;
12794 default:
12795 /* another family support? */
12796 break;
12797 }
12798 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012799 freeaddrinfo(aitop);
12800 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801 }
12802
12803 if (!(inet4 == 0 || inet4 == 2))
12804 goto bad;
12805 if (!(inet6 == 0 || inet6 == 2))
12806 goto bad;
12807
12808 if (aitop)
12809 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012810 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811
12812 bad:
12813 if (aitop)
12814 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012815 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816}
12817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012819if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012820 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012828fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12833$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12834
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012835if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012836then
12837 if test $ipv6 = yes
12838 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839 echo 'Fatal: You must get working getaddrinfo() function.'
12840 echo ' or you can specify "--disable-ipv6"'.
12841 exit 1
12842 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012843else
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012846
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012847fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012848
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012849for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012850do :
12851 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012855_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012856
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857fi
12858done
12859
Michael W. Hudson54241132001-12-07 15:38:26 +000012860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12863$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012864if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012869#include <sys/types.h>
12870#include <sys/time.h>
12871#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
12876if ((struct tm *) 0)
12877return 0;
12878 ;
12879 return 0;
12880}
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012883 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12890$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012891if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894
12895fi
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12898$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012899if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904#include <sys/types.h>
12905#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012906
Martin v. Löwis11437992002-04-12 09:54:03 +000012907int
12908main ()
12909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910struct tm tm;
12911 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ;
12914 return 0;
12915}
12916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918 ac_cv_struct_tm=time.h
12919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12925$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012926if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929
12930fi
12931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932ac_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 +000012933#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935"
Victor Stinnere0be4232011-10-25 13:06:09 +020012936if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
12938cat >>confdefs.h <<_ACEOF
12939#define HAVE_STRUCT_TM_TM_ZONE 1
12940_ACEOF
12941
12942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948
12949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12951"
Victor Stinnere0be4232011-10-25 13:06:09 +020012952if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956fi
12957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012959#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960_ACEOF
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12963$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012964if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012968/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012969#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970#if !HAVE_DECL_TZNAME
12971extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Martin v. Löwis11437992002-04-12 09:54:03 +000012974int
12975main ()
12976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ;
12979 return 0;
12980}
12981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983 ac_cv_var_tzname=yes
12984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012987rm -f core conftest.err conftest.$ac_objext \
12988 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12991$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012992 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996 fi
12997fi
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999ac_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 +020013000if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
13002cat >>confdefs.h <<_ACEOF
13003#define HAVE_STRUCT_STAT_ST_RDEV 1
13004_ACEOF
13005
13006
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013007fi
13008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009ac_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 +020013010if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013011
Martin v. Löwis11437992002-04-12 09:54:03 +000013012cat >>confdefs.h <<_ACEOF
13013#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13014_ACEOF
13015
13016
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013017fi
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019ac_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 +020013020if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013021
13022cat >>confdefs.h <<_ACEOF
13023#define HAVE_STRUCT_STAT_ST_FLAGS 1
13024_ACEOF
13025
13026
13027fi
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029ac_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 +020013030if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_STRUCT_STAT_ST_GEN 1
13034_ACEOF
13035
13036
13037fi
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039ac_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 +020013040if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013041
13042cat >>confdefs.h <<_ACEOF
13043#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13044_ACEOF
13045
13046
13047fi
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049ac_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 +020013050if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013051
Martin v. Löwis11437992002-04-12 09:54:03 +000013052cat >>confdefs.h <<_ACEOF
13053#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13054_ACEOF
13055
13056
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013057fi
13058
Stefan Krah267b6392016-04-26 01:09:18 +020013059ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13060 #include <sys/types.h>
13061 #include <pwd.h>
13062
13063"
13064if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13065
13066cat >>confdefs.h <<_ACEOF
13067#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13068_ACEOF
13069
13070
13071fi
13072ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13073 #include <sys/types.h>
13074 #include <pwd.h>
13075
13076"
13077if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13078
13079cat >>confdefs.h <<_ACEOF
13080#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13081_ACEOF
13082
13083
13084fi
13085
Zachary Ware6a6967e2016-10-01 00:47:27 -050013086# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13087ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13088"
13089if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13090
13091cat >>confdefs.h <<_ACEOF
13092#define HAVE_SIGINFO_T_SI_BAND 1
13093_ACEOF
13094
13095
13096fi
13097
Michael W. Hudson54241132001-12-07 15:38:26 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13100$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013101if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013103else
Matthias Kloseb159a552010-04-25 21:00:44 +000013104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013107#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013116if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013117 ac_cv_header_time_altzone=yes
13118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123fi
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13126$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013127if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130
13131fi
13132
Guido van Rossumda88dad1995-01-26 00:46:29 +000013133was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13135$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013138
13139#include <sys/types.h>
13140#include <sys/select.h>
13141#include <sys/time.h>
13142
Martin v. Löwis11437992002-04-12 09:54:03 +000013143int
13144main ()
13145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146;
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 ;
13148 return 0;
13149}
13150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013156 was_it_defined=yes
13157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13161$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13164$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013165if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013169/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013170#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013171int
13172main ()
13173{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 ;
13176 return 0;
13177}
13178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180 ac_cv_struct_addrinfo=yes
13181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13185fi
13186
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13188$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192
13193fi
13194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13196$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013197if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202
13203# include <sys/types.h>
13204# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013205int
13206main ()
13207{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013209 ;
13210 return 0;
13211}
13212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013214 ac_cv_struct_sockaddr_storage=yes
13215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219fi
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13222$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226
13227fi
13228
Christian Heimesdffa3942016-09-05 23:54:41 +020013229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13230$as_echo_n "checking for sockaddr_alg... " >&6; }
13231if ${ac_cv_struct_sockaddr_alg+:} false; then :
13232 $as_echo_n "(cached) " >&6
13233else
13234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13235/* end confdefs.h. */
13236
13237# include <sys/types.h>
13238# include <sys/socket.h>
13239# include <linux/if_alg.h>
13240int
13241main ()
13242{
13243struct sockaddr_alg s
13244 ;
13245 return 0;
13246}
13247_ACEOF
13248if ac_fn_c_try_compile "$LINENO"; then :
13249 ac_cv_struct_sockaddr_alg=yes
13250else
13251 ac_cv_struct_sockaddr_alg=no
13252fi
13253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13254fi
13255
13256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13257$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13258if test $ac_cv_struct_sockaddr_alg = yes; then
13259
13260$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13261
13262fi
13263
Guido van Rossum627b2d71993-12-24 10:39:16 +000013264# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13267$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013268if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013273$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013274int
13275main ()
13276{
13277static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013278test_array [0] = 0;
13279return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013280
13281 ;
13282 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013283}
Martin v. Löwis11437992002-04-12 09:54:03 +000013284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013286 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13293$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296
13297fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13300$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013301if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013305/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306
Martin v. Löwis11437992002-04-12 09:54:03 +000013307int
13308main ()
13309{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013312 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013314 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316 char const *const *pcpcc;
13317 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 /* NEC SVR4.0.2 mips cc rejects this. */
13319 struct point {int x, y;};
13320 static struct point const zero = {0,0};
13321 /* AIX XL C 1.02.0.0 rejects this.
13322 It does not let you subtract one const X* pointer from another in
13323 an arm of an if-expression whose if-part is not a constant
13324 expression */
13325 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328 ++pcpcc;
13329 ppc = (char**) pcpcc;
13330 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013331 { /* SCO 3.2v4 cc rejects this sort of thing. */
13332 char tx;
13333 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 }
13339 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13340 int x[] = {25, 17};
13341 const int *foo = &x[0];
13342 ++foo;
13343 }
13344 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13345 typedef const int *iptr;
13346 iptr p = 0;
13347 ++p;
13348 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013349 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013351 struct s { int j; const int *ap[3]; } bx;
13352 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 }
13354 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13355 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013359#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 ;
13362 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013363}
Martin v. Löwis11437992002-04-12 09:54:03 +000013364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013366 ac_cv_c_const=yes
13367else
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13373$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377
13378fi
13379
Michael W. Hudson54241132001-12-07 15:38:26 +000013380
Guido van Rossumda88dad1995-01-26 00:46:29 +000013381works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13383$as_echo_n "checking for working signed char... " >&6; }
13384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013385/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387int
13388main ()
13389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013396 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013397else
Skip Montanaro6dead952003-09-25 14:50:04 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013401
Guido van Rossum7f43da71994-08-01 12:15:30 +000013402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13405$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013406
Guido van Rossumda88dad1995-01-26 00:46:29 +000013407have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13409$as_echo_n "checking for prototypes... " >&6; }
13410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013411/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013412int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Matthias Kloseb9621712010-04-24 17:59:49 +000013423$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb159a552010-04-25 21:00:44 +000013425 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13429$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013430
Guido van Rossumda88dad1995-01-26 00:46:29 +000013431works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13433$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436
13437#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013438int foo(int x, ...) {
13439 va_list va;
13440 va_start(va, x);
13441 va_arg(va, int);
13442 va_arg(va, char *);
13443 va_arg(va, double);
13444 return 0;
13445}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
Guido van Rossum90eea071996-08-30 20:58:57 +000013450return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013460 works=yes
13461
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13465$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466
Martin v. Löwisd6320502004-08-12 13:45:08 +000013467# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13469$as_echo_n "checking for socketpair... " >&6; }
13470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013471/* end confdefs.h. */
13472
13473#include <sys/types.h>
13474#include <sys/socket.h>
13475
13476int
13477main ()
13478{
13479void *x=socketpair
13480 ;
13481 return 0;
13482}
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013485
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013487
Matthias Kloseb159a552010-04-25 21:00:44 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013490else
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13492$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013493
13494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013497# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13499$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013502#include <sys/types.h>
13503#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013504int
13505main ()
13506{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013507struct sockaddr x;
13508x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 ;
13510 return 0;
13511}
13512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013513if ac_fn_c_try_compile "$LINENO"; then :
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13515$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013518
13519else
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13521$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013526# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013527
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013530if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13535$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536 OLD_CFLAGS=$CFLAGS
13537 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540
13541# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Martin v. Löwis11437992002-04-12 09:54:03 +000013543int
13544main ()
13545{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013546
13547 char *name;
13548 struct hostent *he, *res;
13549 char buffer[2048];
13550 int buflen = 2048;
13551 int h_errnop;
13552
13553 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
13555 ;
13556 return 0;
13557}
13558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013562
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13567$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013569else
Skip Montanaro6dead952003-09-25 14:50:04 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13572$as_echo "no" >&6; }
13573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13574$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013576/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013578# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Martin v. Löwis11437992002-04-12 09:54:03 +000013580int
13581main ()
13582{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013583
13584 char *name;
13585 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013586 char buffer[2048];
13587 int buflen = 2048;
13588 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013589
Matthias Kloseb159a552010-04-25 21:00:44 +000013590 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
13592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013599
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Matthias Kloseb159a552010-04-25 21:00:44 +000013601$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13604$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606else
Skip Montanaro6dead952003-09-25 14:50:04 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13609$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13611$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613/* end confdefs.h. */
13614
13615# include <netdb.h>
13616
13617int
13618main ()
13619{
13620
13621 char *name;
13622 struct hostent *he;
13623 struct hostent_data data;
13624
13625 (void) gethostbyname_r(name, he, &data);
13626
13627 ;
13628 return 0;
13629}
13630_ACEOF
13631if ac_fn_c_try_compile "$LINENO"; then :
13632
13633 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13634
13635
13636$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13637
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13639$as_echo "yes" >&6; }
13640
13641else
13642
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13644$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013654 CFLAGS=$OLD_CFLAGS
13655
13656else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 for ac_func in gethostbyname
13659do :
13660 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013661if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013663#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013664_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013665
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013666fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013667done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013668
Michael W. Hudson54241132001-12-07 15:38:26 +000013669
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670fi
13671
Michael W. Hudson54241132001-12-07 15:38:26 +000013672
13673
13674
13675
13676
13677
Guido van Rossum627b2d71993-12-24 10:39:16 +000013678# checks for system services
13679# (none yet)
13680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013682ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013683if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013684
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013685else
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13687$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690else
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013692LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696/* Override any GCC internal prototype to avoid an error.
13697 Use char because int might match the return type of a GCC
13698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013699#ifdef __cplusplus
13700extern "C"
13701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013702char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013716rm -f core conftest.err conftest.$ac_objext \
13717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013718LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13721$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013722if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 cat >>confdefs.h <<_ACEOF
13724#define HAVE_LIBIEEE 1
13725_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013727 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728
Guido van Rossum627b2d71993-12-24 10:39:16 +000013729fi
13730
Michael W. Hudson54241132001-12-07 15:38:26 +000013731
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013732fi
13733
Michael W. Hudson54241132001-12-07 15:38:26 +000013734
Guido van Rossum7f43da71994-08-01 12:15:30 +000013735# check for --with-libm=...
13736
Guido van Rossum563e7081996-09-10 18:20:48 +000013737case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013738Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013739*) LIBM=-lm
13740esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13742$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013747if test "$withval" = no
13748then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13750$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013751elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013752then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13754$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013755else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013756fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13759$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760fi
13761
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762
13763# check for --with-libc=...
13764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13766$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013769if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013771if test "$withval" = no
13772then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13774$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013775elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013776then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13778$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013779else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013780fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013781else
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13783$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784fi
13785
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786
Stefan Krah1919b7e2012-03-21 18:25:23 +010013787# **************************************
13788# * Check for gcc x64 inline assembler *
13789# **************************************
13790
13791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13792$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794/* end confdefs.h. */
13795
13796int
13797main ()
13798{
13799
13800 __asm__ __volatile__ ("movq %rcx, %rax");
13801
13802 ;
13803 return 0;
13804}
13805_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013806if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013807 have_gcc_asm_for_x64=yes
13808else
13809 have_gcc_asm_for_x64=no
13810fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013811rm -f core conftest.err conftest.$ac_objext \
13812 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13814$as_echo "$have_gcc_asm_for_x64" >&6; }
13815if test "$have_gcc_asm_for_x64" = yes
13816then
13817
13818$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13819
13820fi
13821
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822# **************************************************
13823# * Check for various properties of floating point *
13824# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13827$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013828if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013830else
13831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833 ac_cv_little_endian_double=no
13834else
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836/* end confdefs.h. */
13837
13838#include <string.h>
13839int main() {
13840 double x = 9006104071832581.0;
13841 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13842 return 0;
13843 else
13844 return 1;
13845}
13846
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849 ac_cv_little_endian_double=yes
13850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855fi
13856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857fi
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13860$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861if test "$ac_cv_little_endian_double" = yes
13862then
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013865
13866fi
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13869$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013870if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013872else
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875 ac_cv_big_endian_double=no
13876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878/* end confdefs.h. */
13879
13880#include <string.h>
13881int main() {
13882 double x = 9006104071832581.0;
13883 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13884 return 0;
13885 else
13886 return 1;
13887}
13888
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891 ac_cv_big_endian_double=yes
13892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897fi
13898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899fi
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13902$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903if test "$ac_cv_big_endian_double" = yes
13904then
13905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907
13908fi
13909
13910# Some ARM platforms use a mixed-endian representation for doubles.
13911# While Python doesn't currently have full support for these platforms
13912# (see e.g., issue 1762561), we can at least make sure that float <-> string
13913# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13915$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013916if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918else
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921 ac_cv_mixed_endian_double=no
13922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924/* end confdefs.h. */
13925
13926#include <string.h>
13927int main() {
13928 double x = 9006104071832581.0;
13929 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13930 return 0;
13931 else
13932 return 1;
13933}
13934
13935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013936if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937 ac_cv_mixed_endian_double=yes
13938else
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013943fi
13944
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945fi
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13948$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949if test "$ac_cv_mixed_endian_double" = yes
13950then
13951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013953
13954fi
13955
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013956# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013957# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013958# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013959# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013960# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013961# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013962
13963# This inline assembler syntax may also work for suncc and icc,
13964# so we try it on all platforms.
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13967$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969/* end confdefs.h. */
13970
13971int
13972main ()
13973{
13974
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013975 unsigned short cw;
13976 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13977 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013978
13979 ;
13980 return 0;
13981}
13982_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013983if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 have_gcc_asm_for_x87=yes
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013988rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13991$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013992if test "$have_gcc_asm_for_x87" = yes
13993then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14000$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14002/* end confdefs.h. */
14003
14004int
14005main ()
14006{
14007
14008 unsigned int fpcr;
14009 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14010 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14011
14012 ;
14013 return 0;
14014}
14015_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014016if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014017 have_gcc_asm_for_mc68881=yes
14018else
14019 have_gcc_asm_for_mc68881=no
14020fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014021rm -f core conftest.err conftest.$ac_objext \
14022 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14024$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14025if test "$have_gcc_asm_for_mc68881" = yes
14026then
14027
14028$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14029
14030fi
14031
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014032# Detect whether system arithmetic is subject to x87-style double
14033# rounding issues. The result of this test has little meaning on non
14034# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14035# mode is round-to-nearest and double rounding issues are present, and
14036# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14038$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014039# $BASECFLAGS may affect the result
14040ac_save_cc="$CC"
14041CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014042if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014043 ac_cv_x87_double_rounding=no
14044else
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014046/* end confdefs.h. */
14047
14048#include <stdlib.h>
14049#include <math.h>
14050int main() {
14051 volatile double x, y, z;
14052 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14053 x = 0.99999999999999989; /* 1-2**-53 */
14054 y = 1./x;
14055 if (y != 1.)
14056 exit(0);
14057 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14058 x = 1e16;
14059 y = 2.99999;
14060 z = x + y;
14061 if (z != 1e16+4.)
14062 exit(0);
14063 /* both tests show evidence of double rounding */
14064 exit(1);
14065}
14066
14067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014069 ac_cv_x87_double_rounding=no
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014075fi
14076
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14079$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014080if test "$ac_cv_x87_double_rounding" = yes
14081then
14082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084
14085fi
14086
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087# ************************************
14088# * Check for mathematical functions *
14089# ************************************
14090
14091LIBS_SAVE=$LIBS
14092LIBS="$LIBS $LIBM"
14093
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14095do :
14096 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14097ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014098if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014099 cat >>confdefs.h <<_ACEOF
14100#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14101_ACEOF
14102
14103fi
14104done
14105
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014106for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014107do :
14108 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14109ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014110if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014111 cat >>confdefs.h <<_ACEOF
14112#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14113_ACEOF
14114
14115fi
14116done
14117
14118ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14119"
Victor Stinnere0be4232011-10-25 13:06:09 +020014120if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014121 ac_have_decl=1
14122else
14123 ac_have_decl=0
14124fi
14125
14126cat >>confdefs.h <<_ACEOF
14127#define HAVE_DECL_ISINF $ac_have_decl
14128_ACEOF
14129ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14130"
Victor Stinnere0be4232011-10-25 13:06:09 +020014131if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014132 ac_have_decl=1
14133else
14134 ac_have_decl=0
14135fi
14136
14137cat >>confdefs.h <<_ACEOF
14138#define HAVE_DECL_ISNAN $ac_have_decl
14139_ACEOF
14140ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14141"
Victor Stinnere0be4232011-10-25 13:06:09 +020014142if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014143 ac_have_decl=1
14144else
14145 ac_have_decl=0
14146fi
14147
14148cat >>confdefs.h <<_ACEOF
14149#define HAVE_DECL_ISFINITE $ac_have_decl
14150_ACEOF
14151
14152
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014153# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14154# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14156$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014157if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014159else
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014162 ac_cv_tanh_preserves_zero_sign=no
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165/* end confdefs.h. */
14166
14167#include <math.h>
14168#include <stdlib.h>
14169int main() {
14170 /* return 0 if either negative zeros don't exist
14171 on this platform or if negative zeros exist
14172 and tanh(-0.) == -0. */
14173 if (atan2(0., -1.) == atan2(-0., -1.) ||
14174 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14175 else exit(1);
14176}
14177
14178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014180 ac_cv_tanh_preserves_zero_sign=yes
14181else
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14185 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014186fi
14187
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014188fi
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14191$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192if test "$ac_cv_tanh_preserves_zero_sign" = yes
14193then
14194
Matthias Kloseb9621712010-04-24 17:59:49 +000014195$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014196
14197fi
14198
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014199if test "$ac_cv_func_log1p" = yes
14200then
14201 # On some versions of AIX, log1p(-0.) returns 0. instead of
14202 # -0. See issue #9920.
14203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14204$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014205 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014206 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014207else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014208
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014209 if test "$cross_compiling" = yes; then :
14210 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014214
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014215 #include <math.h>
14216 #include <stdlib.h>
14217 int main() {
14218 /* Fail if the signs of log1p(-0.) and -0. can be
14219 distinguished. */
14220 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14221 return 0;
14222 else
14223 return 1;
14224 }
14225
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014226_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014227if ac_fn_c_try_run "$LINENO"; then :
14228 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014229else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014230 ac_cv_log1p_drops_zero_sign=yes
14231fi
14232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014235
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014237
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14239$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14240fi
14241if test "$ac_cv_log1p_drops_zero_sign" = yes
14242then
14243
14244$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14245
14246fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014247
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014248LIBS=$LIBS_SAVE
14249
Mark Dickinsona614f042009-11-28 12:48:43 +000014250# For multiprocessing module, check that sem_open
14251# actually works. For FreeBSD versions <= 7.2,
14252# the kernel module that provides POSIX semaphores
14253# isn't loaded by default, so an attempt to call
14254# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14256$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014257if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014259else
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014261 ac_cv_posix_semaphores_enabled=yes
14262else
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014264/* end confdefs.h. */
14265
14266#include <unistd.h>
14267#include <fcntl.h>
14268#include <stdio.h>
14269#include <semaphore.h>
14270#include <sys/stat.h>
14271
14272int main(void) {
14273 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14274 if (a == SEM_FAILED) {
14275 perror("sem_open");
14276 return 1;
14277 }
14278 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014279 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014280 return 0;
14281}
14282
14283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014285 ac_cv_posix_semaphores_enabled=yes
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014291fi
14292
14293
Mark Dickinsona614f042009-11-28 12:48:43 +000014294fi
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14297$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014298if test $ac_cv_posix_semaphores_enabled = no
14299then
14300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014302
14303fi
14304
Mark Dickinson10683072009-04-18 21:18:19 +000014305# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14307$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014308if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310else
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014312 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014315/* end confdefs.h. */
14316
14317#include <unistd.h>
14318#include <fcntl.h>
14319#include <stdio.h>
14320#include <semaphore.h>
14321#include <sys/stat.h>
14322
14323int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014324 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014325 int count;
14326 int res;
14327 if(a==SEM_FAILED){
14328 perror("sem_open");
14329 return 1;
14330
14331 }
14332 res = sem_getvalue(a, &count);
14333 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014334 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014335 return res==-1 ? 1 : 0;
14336}
14337
Mark Dickinson10683072009-04-18 21:18:19 +000014338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014339if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014340 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014341else
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014346fi
14347
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014348
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349fi
14350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14352$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353if test $ac_cv_broken_sem_getvalue = yes
14354then
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357
14358fi
14359
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014360ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14361"
14362if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14363 ac_have_decl=1
14364else
14365 ac_have_decl=0
14366fi
14367
14368cat >>confdefs.h <<_ACEOF
14369#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14370_ACEOF
14371ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14372"
14373if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14374 ac_have_decl=1
14375else
14376 ac_have_decl=0
14377fi
14378
14379cat >>confdefs.h <<_ACEOF
14380#define HAVE_DECL_RTLD_NOW $ac_have_decl
14381_ACEOF
14382ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14383"
14384if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14385 ac_have_decl=1
14386else
14387 ac_have_decl=0
14388fi
14389
14390cat >>confdefs.h <<_ACEOF
14391#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14392_ACEOF
14393ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14394"
14395if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14396 ac_have_decl=1
14397else
14398 ac_have_decl=0
14399fi
14400
14401cat >>confdefs.h <<_ACEOF
14402#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14403_ACEOF
14404ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14405"
14406if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14407 ac_have_decl=1
14408else
14409 ac_have_decl=0
14410fi
14411
14412cat >>confdefs.h <<_ACEOF
14413#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14414_ACEOF
14415ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14416"
14417if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14418 ac_have_decl=1
14419else
14420 ac_have_decl=0
14421fi
14422
14423cat >>confdefs.h <<_ACEOF
14424#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14425_ACEOF
14426ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14427"
14428if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14429 ac_have_decl=1
14430else
14431 ac_have_decl=0
14432fi
14433
14434cat >>confdefs.h <<_ACEOF
14435#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14436_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014437ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14438"
14439if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14440 ac_have_decl=1
14441else
14442 ac_have_decl=0
14443fi
14444
14445cat >>confdefs.h <<_ACEOF
14446#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14447_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014448
14449
Mark Dickinsonbd792642009-03-18 20:06:12 +000014450# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14452$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014453# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014454if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014455 enableval=$enable_big_digits; case $enable_big_digits in
14456yes)
14457 enable_big_digits=30 ;;
14458no)
14459 enable_big_digits=15 ;;
1446015|30)
14461 ;;
14462*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014463 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 +000014464esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14466$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014467
14468cat >>confdefs.h <<_ACEOF
14469#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14470_ACEOF
14471
14472
14473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14475$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014476fi
14477
14478
Guido van Rossumef2255b2000-03-10 22:30:29 +000014479# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014480ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014481if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014482
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014486 wchar_h="yes"
14487
Guido van Rossumef2255b2000-03-10 22:30:29 +000014488else
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014490
14491fi
14492
Michael W. Hudson54241132001-12-07 15:38:26 +000014493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014495# determine wchar_t size
14496if test "$wchar_h" = yes
14497then
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14501# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14503$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14508"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
Martin v. Löwis11437992002-04-12 09:54:03 +000014510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 if test "$ac_cv_type_wchar_t" = yes; then
14512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014514as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516 else
14517 ac_cv_sizeof_wchar_t=0
14518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14523$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524
14525
14526
Martin v. Löwis11437992002-04-12 09:54:03 +000014527cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014528#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014529_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014530
Michael W. Hudson54241132001-12-07 15:38:26 +000014531
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014532fi
14533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14535$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014536have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014538/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014539
14540#include <tcl.h>
14541#if TCL_UTF_MAX != 6
14542# error "NOT UCS4_TCL"
14543#endif
14544int
14545main ()
14546{
14547
14548 ;
14549 return 0;
14550}
14551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014553
14554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014556
14557 have_ucs4_tcl=yes
14558
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14562$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014563
Skip Montanaro6dead952003-09-25 14:50:04 +000014564# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014565if test "$wchar_h" = yes
14566then
14567 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14569$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014570 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014572else
14573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014575 ac_cv_wchar_t_signed=yes
14576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014578/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014579
14580 #include <wchar.h>
14581 int main()
14582 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014583 /* Success: exit code 0 */
14584 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014585 }
14586
14587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014588if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014589 ac_cv_wchar_t_signed=yes
14590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014595fi
14596
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014597fi
14598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14600$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601fi
14602
Michael Osipov3738fad2018-08-24 18:17:19 +020014603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14604$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014605# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014606if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014607 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014608then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Michael Osipov3738fad2018-08-24 18:17:19 +020014612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14613$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014614else
Michael Osipov3738fad2018-08-24 18:17:19 +020014615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014617fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014618
14619# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14621$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014622if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014624else
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 ac_cv_c_bigendian=unknown
14626 # See if we're dealing with a universal compiler.
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628/* end confdefs.h. */
14629#ifndef __APPLE_CC__
14630 not a universal capable compiler
14631 #endif
14632 typedef int dummy;
14633
Skip Montanaro6dead952003-09-25 14:50:04 +000014634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014635if ac_fn_c_try_compile "$LINENO"; then :
14636
14637 # Check for potential -arch flags. It is not universal unless
14638 # there are at least two -arch flags with different values.
14639 ac_arch=
14640 ac_prev=
14641 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14642 if test -n "$ac_prev"; then
14643 case $ac_word in
14644 i?86 | x86_64 | ppc | ppc64)
14645 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14646 ac_arch=$ac_word
14647 else
14648 ac_cv_c_bigendian=universal
14649 break
14650 fi
14651 ;;
14652 esac
14653 ac_prev=
14654 elif test "x$ac_word" = "x-arch"; then
14655 ac_prev=arch
14656 fi
14657 done
14658fi
14659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660 if test $ac_cv_c_bigendian = unknown; then
14661 # See if sys/param.h defines the BYTE_ORDER macro.
14662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014666
Martin v. Löwis11437992002-04-12 09:54:03 +000014667int
14668main ()
14669{
Matthias Kloseb9621712010-04-24 17:59:49 +000014670#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14671 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14672 && LITTLE_ENDIAN)
14673 bogus endian macros
14674 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
14676 ;
14677 return 0;
14678}
14679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014680if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014681 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014684#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687int
14688main ()
14689{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014690#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 not big endian
14692 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014693
14694 ;
14695 return 0;
14696}
14697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014698if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014699 ac_cv_c_bigendian=yes
14700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014704fi
14705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14706 fi
14707 if test $ac_cv_c_bigendian = unknown; then
14708 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014710/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014711#include <limits.h>
14712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713int
14714main ()
14715{
Matthias Kloseb9621712010-04-24 17:59:49 +000014716#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14717 bogus endian macros
14718 #endif
14719
Martin v. Löwis11437992002-04-12 09:54:03 +000014720 ;
14721 return 0;
14722}
14723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014724if ac_fn_c_try_compile "$LINENO"; then :
14725 # It does; now see whether it defined to _BIG_ENDIAN or not.
14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14727/* end confdefs.h. */
14728#include <limits.h>
14729
14730int
14731main ()
14732{
14733#ifndef _BIG_ENDIAN
14734 not big endian
14735 #endif
14736
14737 ;
14738 return 0;
14739}
14740_ACEOF
14741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014743else
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747fi
14748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14749 fi
14750 if test $ac_cv_c_bigendian = unknown; then
14751 # Compile a test program.
14752 if test "$cross_compiling" = yes; then :
14753 # Try to guess by grepping values from an object file.
14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14755/* end confdefs.h. */
14756short int ascii_mm[] =
14757 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14758 short int ascii_ii[] =
14759 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14760 int use_ascii (int i) {
14761 return ascii_mm[i] + ascii_ii[i];
14762 }
14763 short int ebcdic_ii[] =
14764 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14765 short int ebcdic_mm[] =
14766 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14767 int use_ebcdic (int i) {
14768 return ebcdic_mm[i] + ebcdic_ii[i];
14769 }
14770 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772int
14773main ()
14774{
14775return use_ascii (foo) == use_ebcdic (foo);
14776 ;
14777 return 0;
14778}
14779_ACEOF
14780if ac_fn_c_try_compile "$LINENO"; then :
14781 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14782 ac_cv_c_bigendian=yes
14783 fi
14784 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14785 if test "$ac_cv_c_bigendian" = unknown; then
14786 ac_cv_c_bigendian=no
14787 else
14788 # finding both strings is unlikely to happen, but who knows?
14789 ac_cv_c_bigendian=unknown
14790 fi
14791 fi
14792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014796/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014798int
14799main ()
14800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 /* Are we little or big endian? From Harbison&Steele. */
14803 union
14804 {
14805 long int l;
14806 char c[sizeof (long int)];
14807 } u;
14808 u.l = 1;
14809 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810
14811 ;
14812 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014813}
Martin v. Löwis11437992002-04-12 09:54:03 +000014814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014815if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014816 ac_cv_c_bigendian=no
14817else
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14827$as_echo "$ac_cv_c_bigendian" >&6; }
14828 case $ac_cv_c_bigendian in #(
14829 yes)
14830 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14831;; #(
14832 no)
14833 ;; #(
14834 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ;; #(
14839 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014840 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014841 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014843
Michael W. Hudson54241132001-12-07 15:38:26 +000014844
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014845# ABI version string for Python extension modules. This appears between the
14846# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14847# from the following attributes which affect the ABI of this Python build (in
14848# this order):
14849#
14850# * The Python implementation (always 'cpython-' for us)
14851# * The major and minor version numbers
14852# * --with-pydebug (adds a 'd')
14853# * --with-pymalloc (adds a 'm')
14854# * --with-wide-unicode (adds a 'u')
14855#
14856# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014857# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14858# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014859
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14861$as_echo_n "checking ABIFLAGS... " >&6; }
14862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14863$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14865$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014866SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14868$as_echo "$SOABI" >&6; }
14869
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014870
14871case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014872 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014873 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14874 *)
14875 EXT_SUFFIX=${SHLIB_SUFFIX};;
14876esac
14877
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14879$as_echo_n "checking LDVERSION... " >&6; }
14880LDVERSION='$(VERSION)$(ABIFLAGS)'
14881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14882$as_echo "$LDVERSION" >&6; }
14883
doko@python.org87421192013-01-26 11:39:31 +010014884
doko@ubuntu.com55532312016-06-14 08:55:19 +020014885if test x$PLATFORM_TRIPLET = x; then
14886 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14887else
14888 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14889fi
doko@python.org87421192013-01-26 11:39:31 +010014890
14891
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014892# Check whether right shifting a negative integer extends the sign bit
14893# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14895$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014896if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014898else
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014901 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014902else
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014905
14906int main()
14907{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014908 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014909}
14910
Martin v. Löwis11437992002-04-12 09:54:03 +000014911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014913 ac_cv_rshift_extends_sign=yes
14914else
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014919fi
14920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921fi
14922
Matthias Kloseb9621712010-04-24 17:59:49 +000014923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14924$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014925if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014926then
Martin v. Löwis11437992002-04-12 09:54:03 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014929
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014930fi
14931
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014932# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14934$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014935if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014937else
Martin v. Löwis11437992002-04-12 09:54:03 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014940/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014942int
14943main ()
14944{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014945
14946 FILE *f = fopen("/dev/null", "r");
14947 flockfile(f);
14948 getc_unlocked(f);
14949 funlockfile(f);
14950
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014955if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014956 ac_cv_have_getc_unlocked=yes
14957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 ac_cv_have_getc_unlocked=no
14959fi
14960rm -f core conftest.err conftest.$ac_objext \
14961 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14965$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014966if test "$ac_cv_have_getc_unlocked" = yes
14967then
Martin v. Löwis11437992002-04-12 09:54:03 +000014968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014970
14971fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014972
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014973# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014974# save the value of LIBS so we don't actually link Python with readline
14975LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014976
Gregory P. Smith18820942008-09-07 06:24:49 +000014977# On some systems we need to link readline to a termcap compatible
14978# library. NOTE: Keep the precedence of listed libraries synchronised
14979# with setup.py.
14980py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14982$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014983for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014984 if test -z "$py_libtermcap"; then
14985 READLINE_LIBS="-lreadline"
14986 else
14987 READLINE_LIBS="-lreadline -l$py_libtermcap"
14988 fi
14989 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014991/* end confdefs.h. */
14992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993/* Override any GCC internal prototype to avoid an error.
14994 Use char because int might match the return type of a GCC
14995 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014996#ifdef __cplusplus
14997extern "C"
14998#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014999char readline ();
15000int
15001main ()
15002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015004 ;
15005 return 0;
15006}
15007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015008if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015009 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015011rm -f core conftest.err conftest.$ac_objext \
15012 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015013 if test $py_cv_lib_readline = yes; then
15014 break
15015 fi
15016done
15017# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15018#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015019if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15021$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015022else
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15024$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015025
Matthias Kloseb9621712010-04-24 17:59:49 +000015026$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015027
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015028fi
15029
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015030# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015032/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015033#include <readline/readline.h>
15034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015035if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015036 have_readline=yes
15037else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015038 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015039
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015040fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015041rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015042if test $have_readline = yes
15043then
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015045/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015046#include <readline/readline.h>
15047
15048_ACEOF
15049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015053
15054fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015055rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015058/* end confdefs.h. */
15059#include <readline/readline.h>
15060
15061_ACEOF
15062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015066
15067fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015068rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015069
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015070fi
15071
Martin v. Löwis0daad592001-09-30 21:09:59 +000015072# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15074$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015075if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015077else
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015079LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083/* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015086#ifdef __cplusplus
15087extern "C"
15088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015089char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015090int
15091main ()
15092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 ;
15095 return 0;
15096}
15097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015103rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015105LIBS=$ac_check_lib_save_LIBS
15106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15108$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015109if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015112
Martin v. Löwis0daad592001-09-30 21:09:59 +000015113fi
15114
Michael W. Hudson54241132001-12-07 15:38:26 +000015115
Thomas Wouters89d996e2007-09-08 17:39:28 +000015116# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15118$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015119if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015121else
15122 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015123LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015125/* end confdefs.h. */
15126
15127/* Override any GCC internal prototype to avoid an error.
15128 Use char because int might match the return type of a GCC
15129 builtin and then its argument prototype would still apply. */
15130#ifdef __cplusplus
15131extern "C"
15132#endif
15133char rl_completion_display_matches_hook ();
15134int
15135main ()
15136{
15137return rl_completion_display_matches_hook ();
15138 ;
15139 return 0;
15140}
15141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015142if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015143 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15144else
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015147rm -f core conftest.err conftest.$ac_objext \
15148 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015149LIBS=$ac_check_lib_save_LIBS
15150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15152$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015153if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015156
15157fi
15158
15159
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015160# also in 4.0, but not in editline
15161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15162$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15163if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15164 $as_echo_n "(cached) " >&6
15165else
15166 ac_check_lib_save_LIBS=$LIBS
15167LIBS="-lreadline $READLINE_LIBS $LIBS"
15168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15169/* end confdefs.h. */
15170
15171/* Override any GCC internal prototype to avoid an error.
15172 Use char because int might match the return type of a GCC
15173 builtin and then its argument prototype would still apply. */
15174#ifdef __cplusplus
15175extern "C"
15176#endif
15177char rl_resize_terminal ();
15178int
15179main ()
15180{
15181return rl_resize_terminal ();
15182 ;
15183 return 0;
15184}
15185_ACEOF
15186if ac_fn_c_try_link "$LINENO"; then :
15187 ac_cv_lib_readline_rl_resize_terminal=yes
15188else
15189 ac_cv_lib_readline_rl_resize_terminal=no
15190fi
15191rm -f core conftest.err conftest.$ac_objext \
15192 conftest$ac_exeext conftest.$ac_ext
15193LIBS=$ac_check_lib_save_LIBS
15194fi
15195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15196$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15197if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15198
15199$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15200
15201fi
15202
15203
Martin v. Löwis0daad592001-09-30 21:09:59 +000015204# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15206$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015207if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015209else
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015211LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215/* Override any GCC internal prototype to avoid an error.
15216 Use char because int might match the return type of a GCC
15217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015218#ifdef __cplusplus
15219extern "C"
15220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015221char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015222int
15223main ()
15224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ;
15227 return 0;
15228}
15229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015232else
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015235rm -f core conftest.err conftest.$ac_objext \
15236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015237LIBS=$ac_check_lib_save_LIBS
15238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15240$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015241if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015242
Matthias Kloseb9621712010-04-24 17:59:49 +000015243$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015244
Guido van Rossum353ae582001-07-10 16:45:32 +000015245fi
15246
Jack Jansendd19cf82001-12-06 22:36:17 +000015247
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015248# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015250/* end confdefs.h. */
15251#include <readline/readline.h>
15252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015253if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015254 have_readline=yes
15255else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015256 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015257
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015258fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015259rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015260if test $have_readline = yes
15261then
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015263/* end confdefs.h. */
15264#include <readline/readline.h>
15265
15266_ACEOF
15267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015268 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015271
15272fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015273rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015274
15275fi
15276
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15278$as_echo_n "checking for append_history in -lreadline... " >&6; }
15279if ${ac_cv_lib_readline_append_history+:} false; then :
15280 $as_echo_n "(cached) " >&6
15281else
15282 ac_check_lib_save_LIBS=$LIBS
15283LIBS="-lreadline $READLINE_LIBS $LIBS"
15284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15285/* end confdefs.h. */
15286
15287/* Override any GCC internal prototype to avoid an error.
15288 Use char because int might match the return type of a GCC
15289 builtin and then its argument prototype would still apply. */
15290#ifdef __cplusplus
15291extern "C"
15292#endif
15293char append_history ();
15294int
15295main ()
15296{
15297return append_history ();
15298 ;
15299 return 0;
15300}
15301_ACEOF
15302if ac_fn_c_try_link "$LINENO"; then :
15303 ac_cv_lib_readline_append_history=yes
15304else
15305 ac_cv_lib_readline_append_history=no
15306fi
15307rm -f core conftest.err conftest.$ac_objext \
15308 conftest$ac_exeext conftest.$ac_ext
15309LIBS=$ac_check_lib_save_LIBS
15310fi
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15312$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15313if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15314
15315$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15316
15317fi
15318
15319
Martin v. Löwis82bca632006-02-10 20:49:30 +000015320# End of readline checks: restore LIBS
15321LIBS=$LIBS_no_readline
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15324$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015325if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015327else
Martin v. Löwis11437992002-04-12 09:54:03 +000015328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015330 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015333/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015334
15335int main()
15336{
15337 int val1 = nice(1);
15338 if (val1 != -1 && val1 == nice(2))
15339 exit(0);
15340 exit(1);
15341}
15342
Martin v. Löwis11437992002-04-12 09:54:03 +000015343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015344if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015345 ac_cv_broken_nice=yes
15346else
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15350 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015351fi
15352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353fi
15354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15356$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015357if test "$ac_cv_broken_nice" = yes
15358then
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015361
15362fi
15363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15365$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015366if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015368else
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015370 ac_cv_broken_poll=no
15371else
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015373/* end confdefs.h. */
15374
15375#include <poll.h>
15376
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015377int main()
15378{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015379 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015380 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015381
15382 close (42);
15383
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015384 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015385 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015386 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015387 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015388 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015389 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015390 return 1;
15391}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015392
15393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015394if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015395 ac_cv_broken_poll=yes
15396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015403fi
15404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15406$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015407if test "$ac_cv_broken_poll" = yes
15408then
15409
Matthias Kloseb9621712010-04-24 17:59:49 +000015410$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015411
15412fi
15413
Brett Cannon43802422005-02-10 20:48:03 +000015414# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000015415# (which is not required by ISO C or UNIX spec) and/or if we support
15416# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015417ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000015418#include <$ac_cv_struct_tm>
15419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420"
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015422
15423cat >>confdefs.h <<_ACEOF
15424#define HAVE_STRUCT_TM_TM_ZONE 1
15425_ACEOF
15426
15427
15428fi
15429
15430if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015433
15434else
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15436"
Victor Stinnere0be4232011-10-25 13:06:09 +020015437if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441fi
15442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015444#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445_ACEOF
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15448$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015449if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451else
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015453/* end confdefs.h. */
15454#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455#if !HAVE_DECL_TZNAME
15456extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015457#endif
15458
15459int
15460main ()
15461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015463 ;
15464 return 0;
15465}
15466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015467if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015468 ac_cv_var_tzname=yes
15469else
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015472rm -f core conftest.err conftest.$ac_objext \
15473 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15476$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015477 if test $ac_cv_var_tzname = yes; then
15478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015480
15481 fi
15482fi
15483
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015484
Martin v. Löwis1d459062005-03-14 21:23:33 +000015485# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15487$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015488if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015490else
15491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015493 ac_cv_working_tzset=no
15494else
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015496/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015497
15498#include <stdlib.h>
15499#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015500#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015501
15502#if HAVE_TZNAME
15503extern char *tzname[];
15504#endif
15505
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015506int main()
15507{
Brett Cannon18367812003-09-19 00:59:16 +000015508 /* Note that we need to ensure that not only does tzset(3)
15509 do 'something' with localtime, but it works as documented
15510 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015511 This includes making sure that tzname is set properly if
15512 tm->tm_zone does not exist since it is the alternative way
15513 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015514
15515 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015516 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015517 */
15518
Martin v. Löwis1d459062005-03-14 21:23:33 +000015519 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015520 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15521
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015522 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015523 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015524 if (localtime(&groundhogday)->tm_hour != 0)
15525 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015526#if HAVE_TZNAME
15527 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15528 if (strcmp(tzname[0], "UTC") ||
15529 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15530 exit(1);
15531#endif
Brett Cannon18367812003-09-19 00:59:16 +000015532
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015533 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015534 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015535 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015536 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015537#if HAVE_TZNAME
15538 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15539 exit(1);
15540#endif
Brett Cannon18367812003-09-19 00:59:16 +000015541
15542 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15543 tzset();
15544 if (localtime(&groundhogday)->tm_hour != 11)
15545 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015546#if HAVE_TZNAME
15547 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15548 exit(1);
15549#endif
15550
15551#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015552 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15553 exit(1);
15554 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15555 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015556#endif
Brett Cannon18367812003-09-19 00:59:16 +000015557
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015558 exit(0);
15559}
15560
15561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015562if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015563 ac_cv_working_tzset=yes
15564else
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015569fi
15570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571fi
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15574$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015575if test "$ac_cv_working_tzset" = yes
15576then
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015579
15580fi
15581
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015582# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15584$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015585if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015587else
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015590#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015591int
15592main ()
15593{
15594
15595struct stat st;
15596st.st_mtim.tv_nsec = 1;
15597
15598 ;
15599 return 0;
15600}
15601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015603 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15608fi
15609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15611$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015612if test "$ac_cv_stat_tv_nsec" = yes
15613then
15614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015616
15617fi
15618
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015619# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15621$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015622if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015626/* end confdefs.h. */
15627#include <sys/stat.h>
15628int
15629main ()
15630{
15631
15632struct stat st;
15633st.st_mtimespec.tv_nsec = 1;
15634
15635 ;
15636 return 0;
15637}
15638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015640 ac_cv_stat_tv_nsec2=yes
15641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15645fi
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15648$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015649if test "$ac_cv_stat_tv_nsec2" = yes
15650then
15651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015653
15654fi
15655
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015656# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015657ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015658if test "$cross_compiling" = no; then
15659 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15660fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015661
15662for ac_header in curses.h ncurses.h
15663do :
15664 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15665ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15666if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15667 cat >>confdefs.h <<_ACEOF
15668#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15669_ACEOF
15670
15671fi
15672
15673done
15674
15675
15676# On Solaris, term.h requires curses.h
15677for ac_header in term.h
15678do :
15679 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15680#ifdef HAVE_CURSES_H
15681#include <curses.h>
15682#endif
15683
15684"
15685if test "x$ac_cv_header_term_h" = xyes; then :
15686 cat >>confdefs.h <<_ACEOF
15687#define HAVE_TERM_H 1
15688_ACEOF
15689
15690fi
15691
15692done
15693
15694
Jack Jansen666b1e72001-10-31 12:11:48 +000015695# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15697$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015698if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015700else
Matthias Kloseb9621712010-04-24 17:59:49 +000015701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015703#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015704int
15705main ()
15706{
Jack Jansen666b1e72001-10-31 12:11:48 +000015707
15708 int rtn;
15709 rtn = mvwdelch(0,0,0);
15710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 ;
15712 return 0;
15713}
15714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015715if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015716 ac_cv_mvwdelch_is_expression=yes
15717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15721fi
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15724$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015725
15726if test "$ac_cv_mvwdelch_is_expression" = yes
15727then
Martin v. Löwis11437992002-04-12 09:54:03 +000015728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015730
15731fi
15732
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015733# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15734# structs since version 5.7. If the macro is defined as zero before including
15735# [n]curses.h, ncurses will expose fields of the structs regardless of the
15736# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15738$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015739if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015741else
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015744
15745 #define NCURSES_OPAQUE 0
15746 #include <curses.h>
15747
Martin v. Löwis11437992002-04-12 09:54:03 +000015748int
15749main ()
15750{
Jack Jansen666b1e72001-10-31 12:11:48 +000015751
15752 WINDOW *w;
15753 w->_flags = 0;
15754
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 ;
15756 return 0;
15757}
15758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015760 ac_cv_window_has_flags=yes
15761else
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15765fi
15766
Matthias Kloseb9621712010-04-24 17:59:49 +000015767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15768$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015769
Jack Jansen666b1e72001-10-31 12:11:48 +000015770
15771if test "$ac_cv_window_has_flags" = yes
15772then
Martin v. Löwis11437992002-04-12 09:54:03 +000015773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015775
15776fi
15777
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15779$as_echo_n "checking for is_pad... " >&6; }
15780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15781/* end confdefs.h. */
15782#include <curses.h>
15783int
15784main ()
15785{
15786
15787#ifndef is_pad
15788void *x=is_pad
15789#endif
15790
15791 ;
15792 return 0;
15793}
15794_ACEOF
15795if ac_fn_c_try_compile "$LINENO"; then :
15796
15797$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15798
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15800$as_echo "yes" >&6; }
15801else
15802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15803$as_echo "no" >&6; }
15804
15805fi
15806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15809$as_echo_n "checking for is_term_resized... " >&6; }
15810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015811/* end confdefs.h. */
15812#include <curses.h>
15813int
15814main ()
15815{
15816void *x=is_term_resized
15817 ;
15818 return 0;
15819}
15820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015824
Matthias Kloseb159a552010-04-25 21:00:44 +000015825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015826$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15829$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830
15831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15833
Matthias Kloseb9621712010-04-24 17:59:49 +000015834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15835$as_echo_n "checking for resize_term... " >&6; }
15836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015837/* end confdefs.h. */
15838#include <curses.h>
15839int
15840main ()
15841{
15842void *x=resize_term
15843 ;
15844 return 0;
15845}
15846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015847if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015850
Matthias Kloseb159a552010-04-25 21:00:44 +000015851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015852$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015853else
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15855$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015856
15857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15861$as_echo_n "checking for resizeterm... " >&6; }
15862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015863/* end confdefs.h. */
15864#include <curses.h>
15865int
15866main ()
15867{
15868void *x=resizeterm
15869 ;
15870 return 0;
15871}
15872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015873if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015876
Matthias Kloseb159a552010-04-25 21:00:44 +000015877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015878$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15881$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015882
15883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015885
15886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15887$as_echo_n "checking for immedok... " >&6; }
15888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889/* end confdefs.h. */
15890#include <curses.h>
15891int
15892main ()
15893{
15894
15895#ifndef immedok
15896void *x=immedok
15897#endif
15898
15899 ;
15900 return 0;
15901}
15902_ACEOF
15903if ac_fn_c_try_compile "$LINENO"; then :
15904
15905$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15906
15907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15908$as_echo "yes" >&6; }
15909else
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15911$as_echo "no" >&6; }
15912
15913fi
15914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915
15916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15917$as_echo_n "checking for syncok... " >&6; }
15918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15919/* end confdefs.h. */
15920#include <curses.h>
15921int
15922main ()
15923{
15924
15925#ifndef syncok
15926void *x=syncok
15927#endif
15928
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933if ac_fn_c_try_compile "$LINENO"; then :
15934
15935$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15936
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15938$as_echo "yes" >&6; }
15939else
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15941$as_echo "no" >&6; }
15942
15943fi
15944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15945
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15947$as_echo_n "checking for wchgat... " >&6; }
15948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15949/* end confdefs.h. */
15950#include <curses.h>
15951int
15952main ()
15953{
15954
15955#ifndef wchgat
15956void *x=wchgat
15957#endif
15958
15959 ;
15960 return 0;
15961}
15962_ACEOF
15963if ac_fn_c_try_compile "$LINENO"; then :
15964
15965$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15966
15967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15968$as_echo "yes" >&6; }
15969else
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15971$as_echo "no" >&6; }
15972
15973fi
15974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15975
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15977$as_echo_n "checking for filter... " >&6; }
15978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15979/* end confdefs.h. */
15980#include <curses.h>
15981int
15982main ()
15983{
15984
15985#ifndef filter
15986void *x=filter
15987#endif
15988
15989 ;
15990 return 0;
15991}
15992_ACEOF
15993if ac_fn_c_try_compile "$LINENO"; then :
15994
15995$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15996
15997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15998$as_echo "yes" >&6; }
15999else
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16001$as_echo "no" >&6; }
16002
16003fi
16004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005
16006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16007$as_echo_n "checking for has_key... " >&6; }
16008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009/* end confdefs.h. */
16010#include <curses.h>
16011int
16012main ()
16013{
16014
16015#ifndef has_key
16016void *x=has_key
16017#endif
16018
16019 ;
16020 return 0;
16021}
16022_ACEOF
16023if ac_fn_c_try_compile "$LINENO"; then :
16024
16025$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16026
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16028$as_echo "yes" >&6; }
16029else
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16031$as_echo "no" >&6; }
16032
16033fi
16034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16035
16036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16037$as_echo_n "checking for typeahead... " >&6; }
16038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039/* end confdefs.h. */
16040#include <curses.h>
16041int
16042main ()
16043{
16044
16045#ifndef typeahead
16046void *x=typeahead
16047#endif
16048
16049 ;
16050 return 0;
16051}
16052_ACEOF
16053if ac_fn_c_try_compile "$LINENO"; then :
16054
16055$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16056
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16058$as_echo "yes" >&6; }
16059else
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16061$as_echo "no" >&6; }
16062
16063fi
16064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16065
16066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16067$as_echo_n "checking for use_env... " >&6; }
16068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16069/* end confdefs.h. */
16070#include <curses.h>
16071int
16072main ()
16073{
16074
16075#ifndef use_env
16076void *x=use_env
16077#endif
16078
16079 ;
16080 return 0;
16081}
16082_ACEOF
16083if ac_fn_c_try_compile "$LINENO"; then :
16084
16085$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16086
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16088$as_echo "yes" >&6; }
16089else
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16091$as_echo "no" >&6; }
16092
16093fi
16094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016095# last curses configure check
16096CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16099$as_echo "$as_me: checking for device files" >&6;}
16100
16101if test "x$cross_compiling" = xyes; then
16102 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16104$as_echo_n "checking for /dev/ptmx... " >&6; }
16105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16106$as_echo "not set" >&6; }
16107 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16108 fi
16109 if test "${ac_cv_file__dev_ptc+set}" != set; then
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16111$as_echo_n "checking for /dev/ptc... " >&6; }
16112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16113$as_echo "not set" >&6; }
16114 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16115 fi
16116fi
16117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16119$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016120if ${ac_cv_file__dev_ptmx+:} false; then :
16121 $as_echo_n "(cached) " >&6
16122else
16123 test "$cross_compiling" = yes &&
16124 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16125if test -r "/dev/ptmx"; then
16126 ac_cv_file__dev_ptmx=yes
16127else
16128 ac_cv_file__dev_ptmx=no
16129fi
16130fi
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16132$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16133if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016134
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016135fi
16136
16137if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016140
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16143$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016144if ${ac_cv_file__dev_ptc+:} false; then :
16145 $as_echo_n "(cached) " >&6
16146else
16147 test "$cross_compiling" = yes &&
16148 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16149if test -r "/dev/ptc"; then
16150 ac_cv_file__dev_ptc=yes
16151else
16152 ac_cv_file__dev_ptc=no
16153fi
16154fi
16155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16156$as_echo "$ac_cv_file__dev_ptc" >&6; }
16157if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016158
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016159fi
16160
16161if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016162
Matthias Kloseb9621712010-04-24 17:59:49 +000016163$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016164
Neal Norwitz865400f2003-03-21 01:42:58 +000016165fi
16166
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016167if test $ac_sys_system = Darwin
16168then
16169 LIBS="$LIBS -framework CoreFoundation"
16170fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16173$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016174if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016176else
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016178 ac_cv_have_size_t_format="cross -- assuming yes"
16179
Thomas Wouters477c8d52006-05-27 19:21:47 +000016180else
Matthias Kloseb9621712010-04-24 17:59:49 +000016181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016182/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016183
Thomas Wouters477c8d52006-05-27 19:21:47 +000016184#include <stdio.h>
16185#include <stddef.h>
16186#include <string.h>
16187
Christian Heimes2c181612007-12-17 20:04:13 +000016188#ifdef HAVE_SYS_TYPES_H
16189#include <sys/types.h>
16190#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016191
16192#ifdef HAVE_SSIZE_T
16193typedef ssize_t Py_ssize_t;
16194#elif SIZEOF_VOID_P == SIZEOF_LONG
16195typedef long Py_ssize_t;
16196#else
16197typedef int Py_ssize_t;
16198#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016199
Christian Heimes2c181612007-12-17 20:04:13 +000016200int main()
16201{
16202 char buffer[256];
16203
Thomas Wouters477c8d52006-05-27 19:21:47 +000016204 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16205 return 1;
16206
Thomas Wouters89f507f2006-12-13 04:49:30 +000016207 if (strcmp(buffer, "123"))
16208 return 1;
16209
16210 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16211 return 1;
16212
16213 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016214 return 1;
16215
16216 return 0;
16217}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016218
Thomas Wouters477c8d52006-05-27 19:21:47 +000016219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016220if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016221 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016222else
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16226 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016227fi
16228
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16231$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016232if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016233
Matthias Kloseb9621712010-04-24 17:59:49 +000016234$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016235
16236fi
16237
Matthias Kloseb9621712010-04-24 17:59:49 +000016238ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016239#ifdef HAVE_SYS_TYPES_H
16240#include <sys/types.h>
16241#endif
16242#ifdef HAVE_SYS_SOCKET_H
16243#include <sys/socket.h>
16244#endif
16245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246"
Victor Stinnere0be4232011-10-25 13:06:09 +020016247if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016248
Martin v. Löwis11437992002-04-12 09:54:03 +000016249else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016250
Matthias Kloseb9621712010-04-24 17:59:49 +000016251$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016252
16253fi
16254
Michael W. Hudson54241132001-12-07 15:38:26 +000016255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16257$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016258if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016259 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016260else
Matthias Kloseb9621712010-04-24 17:59:49 +000016261 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016262 ac_cv_broken_mbstowcs=no
16263else
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016265/* end confdefs.h. */
16266
Stefan Krah19c21392012-11-22 23:47:32 +010016267#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016268#include<stdlib.h>
16269int main() {
16270 size_t len = -1;
16271 const char *str = "text";
16272 len = mbstowcs(NULL, str, 0);
16273 return (len != 4);
16274}
16275
16276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016277if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016278 ac_cv_broken_mbstowcs=no
16279else
Matthias Kloseb9621712010-04-24 17:59:49 +000016280 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016284fi
16285
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016286fi
16287
Matthias Kloseb9621712010-04-24 17:59:49 +000016288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16289$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016290if test "$ac_cv_broken_mbstowcs" = yes
16291then
16292
Matthias Kloseb9621712010-04-24 17:59:49 +000016293$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016294
16295fi
16296
Antoine Pitroub52ec782009-01-25 16:34:23 +000016297# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16299$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016300
16301# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016302if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016303 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016304if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016305then
16306
Matthias Kloseb9621712010-04-24 17:59:49 +000016307$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16310$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016311fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016312if test "$withval" = no
16313then
16314
16315$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16316
Matthias Kloseb9621712010-04-24 17:59:49 +000016317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16318$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016319fi
16320
Antoine Pitrou042b1282010-08-13 21:15:58 +000016321else
16322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16323$as_echo "no value specified" >&6; }
16324fi
16325
Antoine Pitroub52ec782009-01-25 16:34:23 +000016326
Matthias Kloseb17289e2012-03-15 19:51:34 +010016327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16328$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16329if ${ac_cv_computed_gotos+:} false; then :
16330 $as_echo_n "(cached) " >&6
16331else
16332 if test "$cross_compiling" = yes; then :
16333 if test "${with_computed_gotos+set}" = set; then
16334 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16335 else
16336 ac_cv_computed_gotos=no
16337 fi
16338else
16339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16340/* end confdefs.h. */
16341
16342int main(int argc, char **argv)
16343{
16344 static void *targets[1] = { &&LABEL1 };
16345 goto LABEL2;
16346LABEL1:
16347 return 0;
16348LABEL2:
16349 goto *targets[0];
16350 return 1;
16351}
16352
16353_ACEOF
16354if ac_fn_c_try_run "$LINENO"; then :
16355 ac_cv_computed_gotos=yes
16356else
16357 ac_cv_computed_gotos=no
16358fi
16359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16360 conftest.$ac_objext conftest.beam conftest.$ac_ext
16361fi
16362
16363fi
16364
16365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16366$as_echo "$ac_cv_computed_gotos" >&6; }
16367case "$ac_cv_computed_gotos" in yes*)
16368
16369$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16370
16371esac
16372
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016373case $ac_sys_system in
16374AIX*)
16375
16376$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16377 ;;
16378esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016379
Michael W. Hudson54241132001-12-07 15:38:26 +000016380
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016381
16382
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016383for h in `(cd $srcdir;echo Python/thread_*.h)`
16384do
16385 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16386done
16387
Michael W. Hudson54241132001-12-07 15:38:26 +000016388
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016389SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16391$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016392for dir in $SRCDIRS; do
16393 if test ! -d $dir; then
16394 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016395 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016396done
Matthias Kloseb9621712010-04-24 17:59:49 +000016397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16398$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016399
Stefan Krah1919b7e2012-03-21 18:25:23 +010016400# Availability of -O2:
16401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16402$as_echo_n "checking for -O2... " >&6; }
16403saved_cflags="$CFLAGS"
16404CFLAGS="-O2"
16405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16406/* end confdefs.h. */
16407
16408int
16409main ()
16410{
16411
16412
16413 ;
16414 return 0;
16415}
16416_ACEOF
16417if ac_fn_c_try_compile "$LINENO"; then :
16418 have_O2=yes
16419else
16420 have_O2=no
16421fi
16422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16424$as_echo "$have_O2" >&6; }
16425CFLAGS="$saved_cflags"
16426
16427# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16428# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16430$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16431saved_cflags="$CFLAGS"
16432CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16433if test "$have_O2" = no; then
16434 CFLAGS=""
16435fi
16436if test "$cross_compiling" = yes; then :
16437 have_glibc_memmove_bug=undefined
16438else
16439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440/* end confdefs.h. */
16441
16442#include <stdio.h>
16443#include <stdlib.h>
16444#include <string.h>
16445void foo(void *p, void *q) { memmove(p, q, 19); }
16446int main() {
16447 char a[32] = "123456789000000000";
16448 foo(&a[9], a);
16449 if (strcmp(a, "123456789123456789000000000") != 0)
16450 return 1;
16451 foo(a, &a[9]);
16452 if (strcmp(a, "123456789000000000") != 0)
16453 return 1;
16454 return 0;
16455}
16456
16457_ACEOF
16458if ac_fn_c_try_run "$LINENO"; then :
16459 have_glibc_memmove_bug=no
16460else
16461 have_glibc_memmove_bug=yes
16462fi
16463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16464 conftest.$ac_objext conftest.beam conftest.$ac_ext
16465fi
16466
16467CFLAGS="$saved_cflags"
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16469$as_echo "$have_glibc_memmove_bug" >&6; }
16470if test "$have_glibc_memmove_bug" = yes; then
16471
16472$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16473
16474fi
16475
16476if test "$have_gcc_asm_for_x87" = yes; then
16477 # Some versions of gcc miscompile inline asm:
16478 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16479 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16480 case $CC in
16481 *gcc*)
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16483$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16484 saved_cflags="$CFLAGS"
16485 CFLAGS="-O2"
16486 if test "$cross_compiling" = yes; then :
16487 have_ipa_pure_const_bug=undefined
16488else
16489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16490/* end confdefs.h. */
16491
16492 __attribute__((noinline)) int
16493 foo(int *p) {
16494 int r;
16495 asm ( "movl \$6, (%1)\n\t"
16496 "xorl %0, %0\n\t"
16497 : "=r" (r) : "r" (p) : "memory"
16498 );
16499 return r;
16500 }
16501 int main() {
16502 int p = 8;
16503 if ((foo(&p) ? : p) != 6)
16504 return 1;
16505 return 0;
16506 }
16507
16508_ACEOF
16509if ac_fn_c_try_run "$LINENO"; then :
16510 have_ipa_pure_const_bug=no
16511else
16512 have_ipa_pure_const_bug=yes
16513fi
16514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16515 conftest.$ac_objext conftest.beam conftest.$ac_ext
16516fi
16517
16518 CFLAGS="$saved_cflags"
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16520$as_echo "$have_ipa_pure_const_bug" >&6; }
16521 if test "$have_ipa_pure_const_bug" = yes; then
16522
16523$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16524
16525 fi
16526 ;;
16527 esac
16528fi
16529
Victor Stinner4f5366e2015-01-09 02:13:19 +010016530# Check for stdatomic.h
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16532$as_echo_n "checking for stdatomic.h... " >&6; }
16533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534/* end confdefs.h. */
16535
16536
16537 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016538 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016539 int main() {
16540 int loaded_value = atomic_load(&value);
16541 return 0;
16542 }
16543
16544
16545_ACEOF
16546if ac_fn_c_try_link "$LINENO"; then :
16547 have_stdatomic_h=yes
16548else
16549 have_stdatomic_h=no
16550fi
16551rm -f core conftest.err conftest.$ac_objext \
16552 conftest$ac_exeext conftest.$ac_ext
16553
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16555$as_echo "$have_stdatomic_h" >&6; }
16556
16557if test "$have_stdatomic_h" = yes; then
16558
16559$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16560
16561fi
16562
16563# Check for GCC >= 4.7 __atomic builtins
16564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16565$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16567/* end confdefs.h. */
16568
16569
16570 volatile int val = 1;
16571 int main() {
16572 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16573 return 0;
16574 }
16575
16576
16577_ACEOF
16578if ac_fn_c_try_link "$LINENO"; then :
16579 have_builtin_atomic=yes
16580else
16581 have_builtin_atomic=no
16582fi
16583rm -f core conftest.err conftest.$ac_objext \
16584 conftest$ac_exeext conftest.$ac_ext
16585
16586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16587$as_echo "$have_builtin_atomic" >&6; }
16588
16589if test "$have_builtin_atomic" = yes; then
16590
16591$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16592
16593fi
16594
Ned Deily322f5ba2013-11-21 23:01:59 -080016595# ensurepip option
16596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16597$as_echo_n "checking for ensurepip... " >&6; }
16598
16599# Check whether --with-ensurepip was given.
16600if test "${with_ensurepip+set}" = set; then :
16601 withval=$with_ensurepip;
16602else
16603 with_ensurepip=upgrade
16604fi
16605
16606case $with_ensurepip in #(
16607 yes|upgrade) :
16608 ENSUREPIP=upgrade ;; #(
16609 install) :
16610 ENSUREPIP=install ;; #(
16611 no) :
16612 ENSUREPIP=no ;; #(
16613 *) :
16614 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16615esac
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16617$as_echo "$ENSUREPIP" >&6; }
16618
16619
Victor Stinner35a97c02015-03-08 02:59:09 +010016620# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16622$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16624/* end confdefs.h. */
16625
16626
16627 #include <dirent.h>
16628
16629 int main() {
16630 struct dirent entry;
16631 return entry.d_type == DT_UNKNOWN;
16632 }
16633
16634
16635_ACEOF
16636if ac_fn_c_try_link "$LINENO"; then :
16637 have_dirent_d_type=yes
16638else
16639 have_dirent_d_type=no
16640fi
16641rm -f core conftest.err conftest.$ac_objext \
16642 conftest$ac_exeext conftest.$ac_ext
16643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16644$as_echo "$have_dirent_d_type" >&6; }
16645
16646if test "$have_dirent_d_type" = yes; then
16647
16648$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16649
16650fi
16651
Victor Stinner9eb57c52015-03-19 22:21:49 +010016652# check if the Linux getrandom() syscall is available
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16654$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16656/* end confdefs.h. */
16657
16658
Victor Stinner1b80b242016-04-12 22:34:58 +020016659 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016660 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016661 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016662
16663 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016664 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016665 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016666 const int flags = GRND_NONBLOCK;
16667 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016668 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016669 return 0;
16670 }
16671
16672
16673_ACEOF
16674if ac_fn_c_try_link "$LINENO"; then :
16675 have_getrandom_syscall=yes
16676else
16677 have_getrandom_syscall=no
16678fi
16679rm -f core conftest.err conftest.$ac_objext \
16680 conftest$ac_exeext conftest.$ac_ext
16681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16682$as_echo "$have_getrandom_syscall" >&6; }
16683
16684if test "$have_getrandom_syscall" = yes; then
16685
16686$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16687
16688fi
16689
Victor Stinner3abf44e2015-09-18 15:38:37 +020016690# check if the getrandom() function is available
16691# the test was written for the Solaris function of <sys/random.h>
16692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16693$as_echo_n "checking for the getrandom() function... " >&6; }
16694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16695/* end confdefs.h. */
16696
16697
16698 #include <sys/random.h>
16699
16700 int main() {
16701 char buffer[1];
16702 const size_t buflen = sizeof(buffer);
16703 const int flags = 0;
16704 /* ignore the result, Python checks for ENOSYS at runtime */
16705 (void)getrandom(buffer, buflen, flags);
16706 return 0;
16707 }
16708
16709
16710_ACEOF
16711if ac_fn_c_try_link "$LINENO"; then :
16712 have_getrandom=yes
16713else
16714 have_getrandom=no
16715fi
16716rm -f core conftest.err conftest.$ac_objext \
16717 conftest$ac_exeext conftest.$ac_ext
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16719$as_echo "$have_getrandom" >&6; }
16720
16721if test "$have_getrandom" = yes; then
16722
16723$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16724
16725fi
16726
Christian Heimesff5be6e2018-01-20 13:19:21 +010016727# Check for usable OpenSSL
16728
16729 found=false
16730
16731# Check whether --with-openssl was given.
16732if test "${with_openssl+set}" = set; then :
16733 withval=$with_openssl;
16734 case "$withval" in
16735 "" | y | ye | yes | n | no)
16736 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16737 ;;
16738 *) ssldirs="$withval"
16739 ;;
16740 esac
16741
16742else
16743
16744 # if pkg-config is installed and openssl has installed a .pc file,
16745 # then use that information and don't search ssldirs
16746 if test -n "$ac_tool_prefix"; then
16747 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16748set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16750$as_echo_n "checking for $ac_word... " >&6; }
16751if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16752 $as_echo_n "(cached) " >&6
16753else
16754 if test -n "$PKG_CONFIG"; then
16755 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16756else
16757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16758for as_dir in $PATH
16759do
16760 IFS=$as_save_IFS
16761 test -z "$as_dir" && as_dir=.
16762 for ac_exec_ext in '' $ac_executable_extensions; do
16763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16764 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16766 break 2
16767 fi
16768done
16769 done
16770IFS=$as_save_IFS
16771
16772fi
16773fi
16774PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16775if test -n "$PKG_CONFIG"; then
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16777$as_echo "$PKG_CONFIG" >&6; }
16778else
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16780$as_echo "no" >&6; }
16781fi
16782
16783
16784fi
16785if test -z "$ac_cv_prog_PKG_CONFIG"; then
16786 ac_ct_PKG_CONFIG=$PKG_CONFIG
16787 # Extract the first word of "pkg-config", so it can be a program name with args.
16788set dummy pkg-config; ac_word=$2
16789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16790$as_echo_n "checking for $ac_word... " >&6; }
16791if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16792 $as_echo_n "(cached) " >&6
16793else
16794 if test -n "$ac_ct_PKG_CONFIG"; then
16795 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16796else
16797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16798for as_dir in $PATH
16799do
16800 IFS=$as_save_IFS
16801 test -z "$as_dir" && as_dir=.
16802 for ac_exec_ext in '' $ac_executable_extensions; do
16803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16804 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16806 break 2
16807 fi
16808done
16809 done
16810IFS=$as_save_IFS
16811
16812fi
16813fi
16814ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16815if test -n "$ac_ct_PKG_CONFIG"; then
16816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16817$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16818else
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16820$as_echo "no" >&6; }
16821fi
16822
16823 if test "x$ac_ct_PKG_CONFIG" = x; then
16824 PKG_CONFIG=""
16825 else
16826 case $cross_compiling:$ac_tool_warned in
16827yes:)
16828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16830ac_tool_warned=yes ;;
16831esac
16832 PKG_CONFIG=$ac_ct_PKG_CONFIG
16833 fi
16834else
16835 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16836fi
16837
16838 if test x"$PKG_CONFIG" != x""; then
16839 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16840 if test $? = 0; then
16841 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16842 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16843 found=true
16844 fi
16845 fi
16846
16847 # no such luck; use some default ssldirs
16848 if ! $found; then
16849 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16850 fi
16851
16852
16853fi
16854
16855
16856
16857 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16858 # an 'openssl' subdirectory
16859
16860 if ! $found; then
16861 OPENSSL_INCLUDES=
16862 for ssldir in $ssldirs; do
16863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16864$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16865 if test -f "$ssldir/include/openssl/ssl.h"; then
16866 OPENSSL_INCLUDES="-I$ssldir/include"
16867 OPENSSL_LDFLAGS="-L$ssldir/lib"
16868 OPENSSL_LIBS="-lssl -lcrypto"
16869 found=true
16870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16871$as_echo "yes" >&6; }
16872 break
16873 else
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16875$as_echo "no" >&6; }
16876 fi
16877 done
16878
16879 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16880 # it will just work!
16881 fi
16882
16883 # try the preprocessor and linker with our new flags,
16884 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16885
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16887$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16888 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16889 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16890
16891 save_LIBS="$LIBS"
16892 save_LDFLAGS="$LDFLAGS"
16893 save_CPPFLAGS="$CPPFLAGS"
16894 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16895 LIBS="$OPENSSL_LIBS $LIBS"
16896 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898/* end confdefs.h. */
16899#include <openssl/ssl.h>
16900int
16901main ()
16902{
16903SSL_new(NULL)
16904 ;
16905 return 0;
16906}
16907_ACEOF
16908if ac_fn_c_try_link "$LINENO"; then :
16909
16910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16911$as_echo "yes" >&6; }
16912 have_openssl=yes
16913
16914else
16915
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16917$as_echo "no" >&6; }
16918 have_openssl=no
16919
16920fi
16921rm -f core conftest.err conftest.$ac_objext \
16922 conftest$ac_exeext conftest.$ac_ext
16923 CPPFLAGS="$save_CPPFLAGS"
16924 LDFLAGS="$save_LDFLAGS"
16925 LIBS="$save_LIBS"
16926
16927
16928
16929
16930
16931
16932if test "$have_openssl" = yes; then
16933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16934$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16935
16936 save_LIBS="$LIBS"
16937 save_LDFLAGS="$LDFLAGS"
16938 save_CPPFLAGS="$CPPFLAGS"
16939 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16940 LIBS="$OPENSSL_LIBS $LIBS"
16941 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16942
16943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16944/* end confdefs.h. */
16945
16946 #include <openssl/x509_vfy.h>
16947
16948int
16949main ()
16950{
16951
16952 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16953 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16954 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16955 X509_VERIFY_PARAM_set_hostflags(p, 0);
16956
16957 ;
16958 return 0;
16959}
16960
16961_ACEOF
16962if ac_fn_c_try_link "$LINENO"; then :
16963
16964 ac_cv_has_x509_verify_param_set1_host=yes
16965
16966else
16967
16968 ac_cv_has_x509_verify_param_set1_host=no
16969
16970fi
16971rm -f core conftest.err conftest.$ac_objext \
16972 conftest$ac_exeext conftest.$ac_ext
16973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16974$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16975 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16976
16977$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16978
16979 fi
16980
16981 CPPFLAGS="$save_CPPFLAGS"
16982 LDFLAGS="$save_LDFLAGS"
16983 LIBS="$save_LIBS"
16984fi
16985
Christian Heimes892d66e2018-01-29 14:10:18 +010016986# ssl module default cipher suite string
16987
16988
16989
16990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16991$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16992
16993# Check whether --with-ssl-default-suites was given.
16994if test "${with_ssl_default_suites+set}" = set; then :
16995 withval=$with_ssl_default_suites;
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16997$as_echo "$withval" >&6; }
16998case "$withval" in
16999 python)
17000 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17001
17002 ;;
17003 openssl)
17004 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17005
17006 ;;
17007 *)
17008 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17009
17010 cat >>confdefs.h <<_ACEOF
17011#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17012_ACEOF
17013
17014 ;;
17015esac
17016
17017else
17018
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17020$as_echo "python" >&6; }
17021$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17022
17023
17024fi
17025
17026
17027
Guido van Rossum627b2d71993-12-24 10:39:16 +000017028# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017029ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017030
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017031ac_config_files="$ac_config_files Modules/ld_so_aix"
17032
Martin v. Löwis11437992002-04-12 09:54:03 +000017033cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017034# This file is a shell script that caches the results of configure
17035# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017036# scripts and configure runs, see configure's option --config-cache.
17037# It is not useful on other systems. If it contains results you don't
17038# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017039#
Martin v. Löwis11437992002-04-12 09:54:03 +000017040# config.status only pays attention to the cache file if you give it
17041# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017042#
Skip Montanaro6dead952003-09-25 14:50:04 +000017043# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017044# loading this file, other *unset* `ac_cv_foo' will be assigned the
17045# following values.
17046
17047_ACEOF
17048
Guido van Rossumf78abae1997-01-21 22:02:36 +000017049# The following way of writing the cache mishandles newlines in values,
17050# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017052# Ultrix sh set writes to stderr and can't be redirected directly,
17053# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054(
17055 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17056 eval ac_val=\$$ac_var
17057 case $ac_val in #(
17058 *${as_nl}*)
17059 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017060 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17061$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062 esac
17063 case $ac_var in #(
17064 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17066 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 esac ;;
17068 esac
17069 done
17070
Martin v. Löwis11437992002-04-12 09:54:03 +000017071 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17073 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 # `set' does not quote correctly, so add quotes: double-quote
17075 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017077 "s/'/'\\\\''/g;
17078 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017080 *)
17081 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 esac |
17085 sort
17086) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17092 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17094 :end' >>confcache
17095if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17096 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017097 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17099$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017100 if test ! -f "$cache_file" || test -h "$cache_file"; then
17101 cat confcache >"$cache_file"
17102 else
17103 case $cache_file in #(
17104 */* | ?:*)
17105 mv -f confcache "$cache_file"$$ &&
17106 mv -f "$cache_file"$$ "$cache_file" ;; #(
17107 *)
17108 mv -f confcache "$cache_file" ;;
17109 esac
17110 fi
17111 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017112 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17114$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017115 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017116fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017117rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017118
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017119test "x$prefix" = xNONE && prefix=$ac_default_prefix
17120# Let make expand exec_prefix.
17121test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017122
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017123DEFS=-DHAVE_CONFIG_H
17124
Skip Montanaro6dead952003-09-25 14:50:04 +000017125ac_libobjs=
17126ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017127U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017128for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17129 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017130 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17133 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017134 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17135 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017136done
17137LIBOBJS=$ac_libobjs
17138
17139LTLIBOBJS=$ac_ltlibobjs
17140
17141
Martin v. Löwis11437992002-04-12 09:54:03 +000017142
Matthias Kloseb9621712010-04-24 17:59:49 +000017143
Victor Stinnere0be4232011-10-25 13:06:09 +020017144: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017145ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017146ac_clean_files_save=$ac_clean_files
17147ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017148{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17149$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17150as_write_fail=0
17151cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017152#! $SHELL
17153# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017154# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017155# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017156# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017157
Martin v. Löwis11437992002-04-12 09:54:03 +000017158debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017159ac_cs_recheck=false
17160ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017161
Matthias Kloseb9621712010-04-24 17:59:49 +000017162SHELL=\${CONFIG_SHELL-$SHELL}
17163export SHELL
17164_ASEOF
17165cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17166## -------------------- ##
17167## M4sh Initialization. ##
17168## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170# Be more Bourne compatible
17171DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017172if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 emulate sh
17174 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017175 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017176 # is contrary to our usage. Disable this feature.
17177 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017179else
Matthias Kloseb9621712010-04-24 17:59:49 +000017180 case `(set -o) 2>/dev/null` in #(
17181 *posix*) :
17182 set -o posix ;; #(
17183 *) :
17184 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017186fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017187
17188
Matthias Kloseb9621712010-04-24 17:59:49 +000017189as_nl='
17190'
17191export as_nl
17192# Printing a long string crashes Solaris 7 /usr/bin/printf.
17193as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17194as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17195as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17196# Prefer a ksh shell builtin over an external printf program on Solaris,
17197# but without wasting forks for bash or zsh.
17198if test -z "$BASH_VERSION$ZSH_VERSION" \
17199 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17200 as_echo='print -r --'
17201 as_echo_n='print -rn --'
17202elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17203 as_echo='printf %s\n'
17204 as_echo_n='printf %s'
17205else
17206 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17207 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17208 as_echo_n='/usr/ucb/echo -n'
17209 else
17210 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17211 as_echo_n_body='eval
17212 arg=$1;
17213 case $arg in #(
17214 *"$as_nl"*)
17215 expr "X$arg" : "X\\(.*\\)$as_nl";
17216 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17217 esac;
17218 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17219 '
17220 export as_echo_n_body
17221 as_echo_n='sh -c $as_echo_n_body as_echo'
17222 fi
17223 export as_echo_body
17224 as_echo='sh -c $as_echo_body as_echo'
17225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017226
17227# The user is always right.
17228if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 PATH_SEPARATOR=:
17230 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17231 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17232 PATH_SEPARATOR=';'
17233 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236
17237# IFS
17238# We need space, tab and new line, in precisely that order. Quoting is
17239# there to prevent editors from complaining about space-tab.
17240# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17241# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242IFS=" "" $as_nl"
17243
17244# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017245as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017246case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247 *[\\/]* ) as_myself=$0 ;;
17248 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017249for as_dir in $PATH
17250do
17251 IFS=$as_save_IFS
17252 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17254 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 ;;
17258esac
17259# We did not find ourselves, most probably we were run as `sh COMMAND'
17260# in which case we are not to be found in the path.
17261if test "x$as_myself" = x; then
17262 as_myself=$0
17263fi
17264if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17266 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267fi
17268
Matthias Kloseb9621712010-04-24 17:59:49 +000017269# Unset variables that we do not need and which cause bugs (e.g. in
17270# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17271# suppresses any "Segmentation fault" message there. '((' could
17272# trigger a bug in pdksh 5.2.14.
17273for as_var in BASH_ENV ENV MAIL MAILPATH
17274do eval test x\${$as_var+set} = xset \
17275 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276done
17277PS1='$ '
17278PS2='> '
17279PS4='+ '
17280
17281# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017282LC_ALL=C
17283export LC_ALL
17284LANGUAGE=C
17285export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286
Matthias Kloseb9621712010-04-24 17:59:49 +000017287# CDPATH.
17288(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17289
17290
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017291# as_fn_error STATUS ERROR [LINENO LOG_FD]
17292# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017293# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17294# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017295# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017296as_fn_error ()
17297{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017298 as_status=$1; test $as_status -eq 0 && as_status=1
17299 if test "$4"; then
17300 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17301 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017302 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017303 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017304 as_fn_exit $as_status
17305} # as_fn_error
17306
17307
17308# as_fn_set_status STATUS
17309# -----------------------
17310# Set $? to STATUS, without forking.
17311as_fn_set_status ()
17312{
17313 return $1
17314} # as_fn_set_status
17315
17316# as_fn_exit STATUS
17317# -----------------
17318# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17319as_fn_exit ()
17320{
17321 set +e
17322 as_fn_set_status $1
17323 exit $1
17324} # as_fn_exit
17325
17326# as_fn_unset VAR
17327# ---------------
17328# Portably unset VAR.
17329as_fn_unset ()
17330{
17331 { eval $1=; unset $1;}
17332}
17333as_unset=as_fn_unset
17334# as_fn_append VAR VALUE
17335# ----------------------
17336# Append the text in VALUE to the end of the definition contained in VAR. Take
17337# advantage of any shell optimizations that allow amortized linear growth over
17338# repeated appends, instead of the typical quadratic growth present in naive
17339# implementations.
17340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17341 eval 'as_fn_append ()
17342 {
17343 eval $1+=\$2
17344 }'
17345else
17346 as_fn_append ()
17347 {
17348 eval $1=\$$1\$2
17349 }
17350fi # as_fn_append
17351
17352# as_fn_arith ARG...
17353# ------------------
17354# Perform arithmetic evaluation on the ARGs, and store the result in the
17355# global $as_val. Take advantage of shells that can avoid forks. The arguments
17356# must be portable across $(()) and expr.
17357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17358 eval 'as_fn_arith ()
17359 {
17360 as_val=$(( $* ))
17361 }'
17362else
17363 as_fn_arith ()
17364 {
17365 as_val=`expr "$@" || test $? -eq 1`
17366 }
17367fi # as_fn_arith
17368
17369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370if expr a : '\(a\)' >/dev/null 2>&1 &&
17371 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17372 as_expr=expr
17373else
17374 as_expr=false
17375fi
17376
17377if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17378 as_basename=basename
17379else
17380 as_basename=false
17381fi
17382
Matthias Kloseb9621712010-04-24 17:59:49 +000017383if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17384 as_dirname=dirname
17385else
17386 as_dirname=false
17387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389as_me=`$as_basename -- "$0" ||
17390$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17391 X"$0" : 'X\(//\)$' \| \
17392 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017393$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 sed '/^.*\/\([^/][^/]*\)\/*$/{
17395 s//\1/
17396 q
17397 }
17398 /^X\/\(\/\/\)$/{
17399 s//\1/
17400 q
17401 }
17402 /^X\/\(\/\).*/{
17403 s//\1/
17404 q
17405 }
17406 s/.*/./; q'`
17407
Matthias Kloseb9621712010-04-24 17:59:49 +000017408# Avoid depending upon Character Ranges.
17409as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17410as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17411as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17412as_cr_digits='0123456789'
17413as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414
17415ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017416case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017420 xy) ECHO_C='\c';;
17421 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17422 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 esac;;
17424*)
17425 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017427
Martin v. Löwis11437992002-04-12 09:54:03 +000017428rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429if test -d conf$$.dir; then
17430 rm -f conf$$.dir/conf$$.file
17431else
17432 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017433 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017435if (echo >conf$$.file) 2>/dev/null; then
17436 if ln -s conf$$.file conf$$ 2>/dev/null; then
17437 as_ln_s='ln -s'
17438 # ... but there are two gotchas:
17439 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17440 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017441 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017442 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017443 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 elif ln conf$$.file conf$$ 2>/dev/null; then
17445 as_ln_s=ln
17446 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017447 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017449else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017450 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17453rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017454
Matthias Kloseb9621712010-04-24 17:59:49 +000017455
17456# as_fn_mkdir_p
17457# -------------
17458# Create "$as_dir" as a directory, including parents if necessary.
17459as_fn_mkdir_p ()
17460{
17461
17462 case $as_dir in #(
17463 -*) as_dir=./$as_dir;;
17464 esac
17465 test -d "$as_dir" || eval $as_mkdir_p || {
17466 as_dirs=
17467 while :; do
17468 case $as_dir in #(
17469 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17470 *) as_qdir=$as_dir;;
17471 esac
17472 as_dirs="'$as_qdir' $as_dirs"
17473 as_dir=`$as_dirname -- "$as_dir" ||
17474$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17475 X"$as_dir" : 'X\(//\)[^/]' \| \
17476 X"$as_dir" : 'X\(//\)$' \| \
17477 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17478$as_echo X"$as_dir" |
17479 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17480 s//\1/
17481 q
17482 }
17483 /^X\(\/\/\)[^/].*/{
17484 s//\1/
17485 q
17486 }
17487 /^X\(\/\/\)$/{
17488 s//\1/
17489 q
17490 }
17491 /^X\(\/\).*/{
17492 s//\1/
17493 q
17494 }
17495 s/.*/./; q'`
17496 test -d "$as_dir" && break
17497 done
17498 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017499 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017500
17501
17502} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017505else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017507 as_mkdir_p=false
17508fi
17509
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017510
17511# as_fn_executable_p FILE
17512# -----------------------
17513# Test if FILE is an executable regular file.
17514as_fn_executable_p ()
17515{
17516 test -f "$1" && test -x "$1"
17517} # as_fn_executable_p
17518as_test_x='test -x'
17519as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017520
17521# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017522as_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 +000017523
17524# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017525as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017526
17527
Martin v. Löwis11437992002-04-12 09:54:03 +000017528exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017529## ----------------------------------- ##
17530## Main body of $CONFIG_STATUS script. ##
17531## ----------------------------------- ##
17532_ASEOF
17533test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017534
Matthias Kloseb9621712010-04-24 17:59:49 +000017535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17536# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017537# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538# values after options handling.
17539ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017540This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017541generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017542
17543 CONFIG_FILES = $CONFIG_FILES
17544 CONFIG_HEADERS = $CONFIG_HEADERS
17545 CONFIG_LINKS = $CONFIG_LINKS
17546 CONFIG_COMMANDS = $CONFIG_COMMANDS
17547 $ $0 $@
17548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549on `(hostname || uname -n) 2>/dev/null | sed 1q`
17550"
17551
Martin v. Löwis11437992002-04-12 09:54:03 +000017552_ACEOF
17553
Matthias Kloseb9621712010-04-24 17:59:49 +000017554case $ac_config_files in *"
17555"*) set x $ac_config_files; shift; ac_config_files=$*;;
17556esac
17557
17558case $ac_config_headers in *"
17559"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17560esac
17561
17562
17563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017564# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017565config_files="$ac_config_files"
17566config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017569
Matthias Kloseb9621712010-04-24 17:59:49 +000017570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017571ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017572\`$as_me' instantiates files and other configuration actions
17573from templates according to the current configuration. Unless the files
17574and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017575
Matthias Kloseb9621712010-04-24 17:59:49 +000017576Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017577
17578 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 --config print configuration, then exit
17581 -q, --quiet, --silent
17582 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 -d, --debug don't remove temporary files
17584 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017585 --file=FILE[:TEMPLATE]
17586 instantiate the configuration file FILE
17587 --header=FILE[:TEMPLATE]
17588 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017589
17590Configuration files:
17591$config_files
17592
17593Configuration headers:
17594$config_headers
17595
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017596Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17600ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017601ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017602python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017603configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017606Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017607This config.status script is free software; the Free Software Foundation
17608gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609
17610ac_pwd='$ac_pwd'
17611srcdir='$srcdir'
17612INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017613MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017614test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017615_ACEOF
17616
Matthias Kloseb9621712010-04-24 17:59:49 +000017617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17618# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017619ac_need_defaults=:
17620while test $# != 0
17621do
17622 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017623 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17625 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017626 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017628 --*=)
17629 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17630 ac_optarg=
17631 ac_shift=:
17632 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017634 ac_option=$1
17635 ac_optarg=$2
17636 ac_shift=shift
17637 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 esac
17639
Skip Montanaro6dead952003-09-25 14:50:04 +000017640 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017642 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17643 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 $as_echo "$ac_cs_version"; exit ;;
17646 --config | --confi | --conf | --con | --co | --c )
17647 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 debug=: ;;
17650 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017651 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017652 case $ac_optarg in
17653 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017654 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 esac
17656 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 ac_need_defaults=false;;
17658 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017659 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017660 case $ac_optarg in
17661 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17662 esac
17663 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 --he | --h)
17666 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017667 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017668Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017670 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017671 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17672 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17673 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017674
17675 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017676 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017677Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017678
Matthias Kloseb9621712010-04-24 17:59:49 +000017679 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
17682 esac
17683 shift
17684done
17685
Skip Montanaro6dead952003-09-25 14:50:04 +000017686ac_configure_extra_args=
17687
17688if $ac_cs_silent; then
17689 exec 6>/dev/null
17690 ac_configure_extra_args="$ac_configure_extra_args --silent"
17691fi
17692
17693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017695if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017696 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017697 shift
17698 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17699 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017701 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017702fi
17703
Martin v. Löwis11437992002-04-12 09:54:03 +000017704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706exec 5>>config.log
17707{
17708 echo
17709 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17710## Running $as_me. ##
17711_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017712 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017718
Matthias Kloseb9621712010-04-24 17:59:49 +000017719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720
17721# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017722for ac_config_target in $ac_config_targets
17723do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 case $ac_config_target in
17725 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17726 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17727 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017728 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17729 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017731 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017732 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017733 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734
Victor Stinnere0be4232011-10-25 13:06:09 +020017735 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 esac
17737done
17738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739
Martin v. Löwis11437992002-04-12 09:54:03 +000017740# If the user did not use the arguments to specify the items to instantiate,
17741# then the envvar interface is used. Set only those that are not.
17742# We use the long form for the default assignment because of an extremely
17743# bizarre bug on SunOS 4.1.3.
17744if $ac_need_defaults; then
17745 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17746 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17747fi
17748
Skip Montanaro6dead952003-09-25 14:50:04 +000017749# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017751# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752# Hook for its removal unless debugging.
17753# Note that there is a small window in which the directory will not be cleaned:
17754# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017755$debug ||
17756{
Victor Stinnere0be4232011-10-25 13:06:09 +020017757 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017759 : "${ac_tmp:=$tmp}"
17760 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017763}
Martin v. Löwis11437992002-04-12 09:54:03 +000017764# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017765
Martin v. Löwis11437992002-04-12 09:54:03 +000017766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017768 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017769} ||
17770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 tmp=./conf$$-$RANDOM
17772 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017773} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017774ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
Matthias Kloseb9621712010-04-24 17:59:49 +000017776# Set up the scripts for CONFIG_FILES section.
17777# No need to generate them if there are no CONFIG_FILES.
17778# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017780
Matthias Kloseb9621712010-04-24 17:59:49 +000017781
17782ac_cr=`echo X | tr X '\015'`
17783# On cygwin, bash can eat \r inside `` if the user requested igncr.
17784# But we know of no other shell where ac_cr would be empty at this
17785# point, so we can use a bashism as a fallback.
17786if test "x$ac_cr" = x; then
17787 eval ac_cr=\$\'\\r\'
17788fi
17789ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17790if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017791 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017792else
17793 ac_cs_awk_cr=$ac_cr
17794fi
17795
Victor Stinnere0be4232011-10-25 13:06:09 +020017796echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017797_ACEOF
17798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799
Matthias Kloseb9621712010-04-24 17:59:49 +000017800{
17801 echo "cat >conf$$subs.awk <<_ACEOF" &&
17802 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17803 echo "_ACEOF"
17804} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017805 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17806ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807ac_delim='%!_!# '
17808for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017809 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017810 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811
Matthias Kloseb9621712010-04-24 17:59:49 +000017812 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17813 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814 break
17815 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017816 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 else
17818 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820done
Matthias Kloseb9621712010-04-24 17:59:49 +000017821rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822
Matthias Kloseb9621712010-04-24 17:59:49 +000017823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017824cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017826sed -n '
17827h
17828s/^/S["/; s/!.*/"]=/
17829p
17830g
17831s/^[^!]*!//
17832:repl
17833t repl
17834s/'"$ac_delim"'$//
17835t delim
17836:nl
17837h
17838s/\(.\{148\}\)..*/\1/
17839t more1
17840s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17841p
17842n
17843b repl
17844:more1
17845s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17846p
17847g
17848s/.\{148\}//
17849t nl
17850:delim
17851h
17852s/\(.\{148\}\)..*/\1/
17853t more2
17854s/["\\]/\\&/g; s/^/"/; s/$/"/
17855p
17856b
17857:more2
17858s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17859p
17860g
17861s/.\{148\}//
17862t delim
17863' <conf$$subs.awk | sed '
17864/^[^""]/{
17865 N
17866 s/\n//
17867}
17868' >>$CONFIG_STATUS || ac_write_fail=1
17869rm -f conf$$subs.awk
17870cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17871_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017872cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017873 for (key in S) S_is_set[key] = 1
17874 FS = ""
17875
17876}
17877{
17878 line = $ 0
17879 nfields = split(line, field, "@")
17880 substed = 0
17881 len = length(field[1])
17882 for (i = 2; i < nfields; i++) {
17883 key = field[i]
17884 keylen = length(key)
17885 if (S_is_set[key]) {
17886 value = S[key]
17887 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17888 len += length(value) + length(field[++i])
17889 substed = 1
17890 } else
17891 len += 1 + keylen
17892 }
17893
17894 print line
17895}
17896
17897_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017899cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17900if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17901 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17902else
17903 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017904fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017905 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017906_ACEOF
17907
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17909# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910# trailing colons and then remove the whole line if VPATH becomes empty
17911# (actually we leave an empty line to preserve line numbers).
17912if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017913 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17914h
17915s///
17916s/^/:/
17917s/[ ]*$/:/
17918s/:\$(srcdir):/:/g
17919s/:\${srcdir}:/:/g
17920s/:@srcdir@:/:/g
17921s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923x
17924s/\(=[ ]*\).*/\1/
17925G
17926s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927s/^[^=]*=[ ]*$//
17928}'
17929fi
17930
Matthias Kloseb9621712010-04-24 17:59:49 +000017931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017932fi # test -n "$CONFIG_FILES"
17933
Matthias Kloseb9621712010-04-24 17:59:49 +000017934# Set up the scripts for CONFIG_HEADERS section.
17935# No need to generate them if there are no CONFIG_HEADERS.
17936# This happens for instance with `./config.status Makefile'.
17937if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017938cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017939BEGIN {
17940_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941
Matthias Kloseb9621712010-04-24 17:59:49 +000017942# Transform confdefs.h into an awk script `defines.awk', embedded as
17943# here-document in config.status, that substitutes the proper values into
17944# config.h.in to produce config.h.
17945
17946# Create a delimiter string that does not exist in confdefs.h, to ease
17947# handling of long lines.
17948ac_delim='%!_!# '
17949for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017950 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17951 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017952 break
17953 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017954 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017955 else
17956 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17957 fi
17958done
17959
17960# For the awk script, D is an array of macro values keyed by name,
17961# likewise P contains macro parameters if any. Preserve backslash
17962# newline sequences.
17963
17964ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17965sed -n '
17966s/.\{148\}/&'"$ac_delim"'/g
17967t rset
17968:rset
17969s/^[ ]*#[ ]*define[ ][ ]*/ /
17970t def
17971d
17972:def
17973s/\\$//
17974t bsnl
17975s/["\\]/\\&/g
17976s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17977D["\1"]=" \3"/p
17978s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17979d
17980:bsnl
17981s/["\\]/\\&/g
17982s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17983D["\1"]=" \3\\\\\\n"\\/p
17984t cont
17985s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17986t cont
17987d
17988:cont
17989n
17990s/.\{148\}/&'"$ac_delim"'/g
17991t clear
17992:clear
17993s/\\$//
17994t bsnlc
17995s/["\\]/\\&/g; s/^/"/; s/$/"/p
17996d
17997:bsnlc
17998s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17999b cont
18000' <confdefs.h | sed '
18001s/'"$ac_delim"'/"\\\
18002"/g' >>$CONFIG_STATUS || ac_write_fail=1
18003
18004cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18005 for (key in D) D_is_set[key] = 1
18006 FS = ""
18007}
18008/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18009 line = \$ 0
18010 split(line, arg, " ")
18011 if (arg[1] == "#") {
18012 defundef = arg[2]
18013 mac1 = arg[3]
18014 } else {
18015 defundef = substr(arg[1], 2)
18016 mac1 = arg[2]
18017 }
18018 split(mac1, mac2, "(") #)
18019 macro = mac2[1]
18020 prefix = substr(line, 1, index(line, defundef) - 1)
18021 if (D_is_set[macro]) {
18022 # Preserve the white space surrounding the "#".
18023 print prefix "define", macro P[macro] D[macro]
18024 next
18025 } else {
18026 # Replace #undef with comments. This is necessary, for example,
18027 # in the case of _POSIX_SOURCE, which is predefined and required
18028 # on some systems where configure will not decide to define it.
18029 if (defundef == "undef") {
18030 print "/*", prefix defundef, macro, "*/"
18031 next
18032 }
18033 }
18034}
18035{ print }
18036_ACAWK
18037_ACEOF
18038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018039 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018040fi # test -n "$CONFIG_HEADERS"
18041
18042
18043eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18044shift
18045for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046do
18047 case $ac_tag in
18048 :[FHLC]) ac_mode=$ac_tag; continue;;
18049 esac
18050 case $ac_mode$ac_tag in
18051 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018052 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053 :[FH]-) ac_tag=-:-;;
18054 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18055 esac
18056 ac_save_IFS=$IFS
18057 IFS=:
18058 set x $ac_tag
18059 IFS=$ac_save_IFS
18060 shift
18061 ac_file=$1
18062 shift
18063
18064 case $ac_mode in
18065 :L) ac_source=$1;;
18066 :[FH])
18067 ac_file_inputs=
18068 for ac_f
18069 do
18070 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018071 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072 *) # Look for the file first in the build tree, then in the source tree
18073 # (if the path is not absolute). The absolute path cannot be DOS-style,
18074 # because $ac_f cannot contain `:'.
18075 test -f "$ac_f" ||
18076 case $ac_f in
18077 [\\/$]*) false;;
18078 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18079 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018080 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018082 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18083 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084 done
18085
18086 # Let's still pretend it is `configure' which instantiates (i.e., don't
18087 # use $as_me), people would be surprised to read:
18088 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018089 configure_input='Generated from '`
18090 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18091 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092 if test x"$ac_file" != x-; then
18093 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18095$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 # Neutralize special characters interpreted by sed in replacement strings.
18098 case $configure_input in #(
18099 *\&* | *\|* | *\\* )
18100 ac_sed_conf_input=`$as_echo "$configure_input" |
18101 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18102 *) ac_sed_conf_input=$configure_input;;
18103 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104
18105 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018106 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18107 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108 esac
18109 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018110 esac
18111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018113$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114 X"$ac_file" : 'X\(//\)[^/]' \| \
18115 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018117$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18119 s//\1/
18120 q
18121 }
18122 /^X\(\/\/\)[^/].*/{
18123 s//\1/
18124 q
18125 }
18126 /^X\(\/\/\)$/{
18127 s//\1/
18128 q
18129 }
18130 /^X\(\/\).*/{
18131 s//\1/
18132 q
18133 }
18134 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018135 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 ac_builddir=.
18137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138case "$ac_dir" in
18139.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18140*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018141 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018143 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144 case $ac_top_builddir_sub in
18145 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18146 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18147 esac ;;
18148esac
18149ac_abs_top_builddir=$ac_pwd
18150ac_abs_builddir=$ac_pwd$ac_dir_suffix
18151# for backward compatibility:
18152ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018153
18154case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157 ac_top_srcdir=$ac_top_builddir_sub
18158 ac_abs_top_srcdir=$ac_pwd ;;
18159 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018160 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161 ac_top_srcdir=$srcdir
18162 ac_abs_top_srcdir=$srcdir ;;
18163 *) # Relative name.
18164 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18165 ac_top_srcdir=$ac_top_build_prefix$srcdir
18166 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018167esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018169
Martin v. Löwis11437992002-04-12 09:54:03 +000018170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 case $ac_mode in
18172 :F)
18173 #
18174 # CONFIG_FILE
18175 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177 case $INSTALL in
18178 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018180 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018181 ac_MKDIR_P=$MKDIR_P
18182 case $MKDIR_P in
18183 [\\/$]* | ?:[\\/]* ) ;;
18184 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18185 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018186_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018187
Matthias Kloseb9621712010-04-24 17:59:49 +000018188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189# If the template does not know about datarootdir, expand it.
18190# FIXME: This hack should be removed a few years after 2.60.
18191ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018192ac_sed_dataroot='
18193/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194 p
18195 q
18196}
18197/@datadir@/p
18198/@docdir@/p
18199/@infodir@/p
18200/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018201/@mandir@/p'
18202case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203*datarootdir*) ac_datarootdir_seen=yes;;
18204*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18206$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209 ac_datarootdir_hack='
18210 s&@datadir@&$datadir&g
18211 s&@docdir@&$docdir&g
18212 s&@infodir@&$infodir&g
18213 s&@localedir@&$localedir&g
18214 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018215 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216esac
18217_ACEOF
18218
18219# Neutralize VPATH when `$srcdir' = `.'.
18220# Shell code in configure.ac might set extrasub.
18221# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18223ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018224$extrasub
18225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018227:t
18228/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018229s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018231s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232s&@srcdir@&$ac_srcdir&;t t
18233s&@abs_srcdir@&$ac_abs_srcdir&;t t
18234s&@top_srcdir@&$ac_top_srcdir&;t t
18235s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18236s&@builddir@&$ac_builddir&;t t
18237s&@abs_builddir@&$ac_abs_builddir&;t t
18238s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18239s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018240s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018242"
Victor Stinnere0be4232011-10-25 13:06:09 +020018243eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18244 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018247 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18248 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18249 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018251which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018252$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018253which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018254
Victor Stinnere0be4232011-10-25 13:06:09 +020018255 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018256 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018257 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18258 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018259 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018260 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261 ;;
18262 :H)
18263 #
18264 # CONFIG_HEADER
18265 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018266 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018267 {
18268 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018269 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18270 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018271 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018272 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018273 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18274$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018275 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018276 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018277 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018278 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018279 fi
18280 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018282 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018283 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287
18288 esac
18289
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018290
18291 case $ac_file$ac_mode in
18292 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18293
18294 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295done # for ac_tag
18296
Guido van Rossum627b2d71993-12-24 10:39:16 +000018297
Matthias Kloseb9621712010-04-24 17:59:49 +000018298as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018299_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018300ac_clean_files=$ac_clean_files_save
18301
Matthias Kloseb9621712010-04-24 17:59:49 +000018302test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018303 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018304
Martin v. Löwis11437992002-04-12 09:54:03 +000018305
18306# configure is writing to config.log, and then calls config.status.
18307# config.status does its own redirection, appending to config.log.
18308# Unfortunately, on DOS this fails, as config.log is still kept open
18309# by configure, so config.status won't be able to write to it; its
18310# output is simply discarded. So we exec the FD to /dev/null,
18311# effectively closing config.log, so it can be properly (re)opened and
18312# appended to by config.status. When coming back to configure, we
18313# need to make the FD available again.
18314if test "$no_create" != yes; then
18315 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018316 ac_config_status_args=
18317 test "$silent" = yes &&
18318 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018319 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018320 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 exec 5>>config.log
18322 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18323 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018324 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018325fi
18326if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18328$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018330
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018331
Christian Heimes75ed8902013-11-20 01:11:18 +010018332echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018333if test ! -f Modules/Setup.local
18334then
18335 echo "# Edit this file for local setup changes" >Modules/Setup.local
18336fi
18337
Christian Heimes75ed8902013-11-20 01:11:18 +010018338echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018339$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018340 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018341 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018342mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018343
18344if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18345 echo "" >&6
18346 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018347 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 +000018348 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018349 echo "" >&6
18350 echo "" >&6
18351fi
18352