blob: d427703f8e860a2445610ee00b4f647eda4d0027 [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
832with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100840with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100841with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147 ac_prev=sbindir ;;
1148 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
1152 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154 | --sharedst | --shareds | --shared | --share | --shar \
1155 | --sha | --sh)
1156 ac_prev=sharedstatedir ;;
1157 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163 -site | --site | --sit)
1164 ac_prev=site ;;
1165 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169 ac_prev=srcdir ;;
1170 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174 | --syscon | --sysco | --sysc | --sys | --sy)
1175 ac_prev=sysconfdir ;;
1176 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186 verbose=yes ;;
1187
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 -version | --version | --versio | --versi | --vers | -V)
1189 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001195 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 --x)
1224 # Obsolete; use --with-x.
1225 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
1227 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1228 | --x-incl | --x-inc | --x-in | --x-i)
1229 ac_prev=x_includes ;;
1230 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1231 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1235 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1236 ac_prev=x_libraries ;;
1237 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1238 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001241 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1242Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ;;
1244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 *=*)
1246 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1247 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 case $ac_envvar in #(
1249 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 export $ac_envvar ;;
1254
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001255 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001260 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 ;;
1262
1263 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264done
1265
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269fi
1270
Matthias Kloseb9621712010-04-24 17:59:49 +00001271if test -n "$ac_unrecognized_opts"; then
1272 case $enable_option_checking in
1273 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1276 esac
1277fi
1278
1279# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1281 datadir sysconfdir sharedstatedir localstatedir includedir \
1282 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Eitan Adler3055c942018-05-15 22:58:09 -07001283 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001286 # Remove trailing slashes.
1287 case $ac_val in
1288 */ )
1289 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1290 eval $ac_var=\$ac_val;;
1291 esac
1292 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001293 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 [\\/$]* | ?:[\\/]* ) continue;;
1295 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001297 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001298done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300# There might be people who depend on the old broken behavior: `$host'
1301# used to hold the argument of --host etc.
1302# FIXME: To remove some day.
1303build=$build_alias
1304host=$host_alias
1305target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# FIXME: To remove some day.
1308if test "x$host_alias" != x; then
1309 if test "x$build_alias" = x; then
1310 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 elif test "x$build_alias" != "x$host_alias"; then
1312 cross_compiling=yes
1313 fi
1314fi
1315
1316ac_tool_prefix=
1317test -n "$host_alias" && ac_tool_prefix=$host_alias-
1318
1319test "$silent" = yes && exec 6>/dev/null
1320
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322ac_pwd=`pwd` && test -n "$ac_pwd" &&
1323ac_ls_di=`ls -di .` &&
1324ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001325 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001327 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330# Find the source files, if location was not specified.
1331if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 ac_confdir=`$as_dirname -- "$as_myself" ||
1335$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336 X"$as_myself" : 'X\(//\)[^/]' \| \
1337 X"$as_myself" : 'X\(//\)$' \| \
1338 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)[^/].*/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\).*/{
1353 s//\1/
1354 q
1355 }
1356 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001357 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359 srcdir=..
1360 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361else
1362 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364if test ! -r "$srcdir/$ac_unique_file"; then
1365 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001366 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 pwd)`
1372# When building in place, set srcdir=.
1373if test "$ac_abs_confdir" = "$ac_pwd"; then
1374 srcdir=.
1375fi
1376# Remove unnecessary trailing slashes from srcdir.
1377# Double slashes in file names in object file debugging info
1378# mess up M-x gdb in Emacs.
1379case $srcdir in
1380*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381esac
1382for ac_var in $ac_precious_vars; do
1383 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_env_${ac_var}_value=\$${ac_var}
1385 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001388
Martin v. Löwis11437992002-04-12 09:54:03 +00001389#
1390# Report the --help message.
1391#
1392if test "$ac_init_help" = "long"; then
1393 # Omit some internal or obsolete options to make the list less imposing.
1394 # This message is too long to be a string in the A/UX 3.1 sh.
1395 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001396\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Usage: $0 [OPTION]... [VAR=VALUE]...
1399
1400To assign environment variables (e.g., CC, CFLAGS...), specify them as
1401VAR=VALUE. See below for descriptions of some of the useful variables.
1402
1403Defaults for the options are specified in brackets.
1404
1405Configuration:
1406 -h, --help display this help and exit
1407 --help=short display options specific to this package
1408 --help=recursive display the short help of all the included packages
1409 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001410 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --cache-file=FILE cache test results in FILE [disabled]
1412 -C, --config-cache alias for \`--cache-file=config.cache'
1413 -n, --no-create do not create output files
1414 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1415
Martin v. Löwis11437992002-04-12 09:54:03 +00001416Installation directories:
1417 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001418 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001420 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421
1422By default, \`make install' will install all the files in
1423\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1424an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425for instance \`--prefix=\$HOME'.
1426
1427For better control, use the options below.
1428
1429Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 --bindir=DIR user executables [EPREFIX/bin]
1431 --sbindir=DIR system admin executables [EPREFIX/sbin]
1432 --libexecdir=DIR program executables [EPREFIX/libexec]
1433 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1434 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1435 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1436 --libdir=DIR object code libraries [EPREFIX/lib]
1437 --includedir=DIR C header files [PREFIX/include]
1438 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1439 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1440 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1441 --infodir=DIR info documentation [DATAROOTDIR/info]
1442 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1443 --mandir=DIR man documentation [DATAROOTDIR/man]
1444 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1445 --htmldir=DIR html documentation [DOCDIR]
1446 --dvidir=DIR dvi documentation [DOCDIR]
1447 --pdfdir=DIR pdf documentation [DOCDIR]
1448 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001449_ACEOF
1450
1451 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001452
1453System types:
1454 --build=BUILD configure for building on BUILD [guessed]
1455 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001456 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458fi
1459
1460if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001461 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001462 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001463 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 cat <<\_ACEOF
1465
1466Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1469 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001470 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001471 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-framework[=INSTALLDIR]
1473 Build (MacOSX|Darwin) framework
1474 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001475 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001476 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1477 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001478 --enable-loadable-sqlite-extensions
1479 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-ipv6 Enable ipv6 (with ipv4) support
1481 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001482 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485Optional Packages:
1486 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1487 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001488 --with-universal-archs=ARCH
1489 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001490 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1491 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001492 --with-framework-name=FRAMEWORK
1493 specify an alternate name of the framework built
1494 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001495 --with-cxx-main=<compiler>
1496 compile main() and link python executable with C++
1497 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-suffix=.exe set executable suffix
1499 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001500 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001501 --with-lto Enable Link Time Optimization in any build. Disabled
1502 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001503 --with-hash-algorithm=[fnv|siphash24]
1504 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001505 --with-address-sanitizer
1506 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001508 --with-system-expat build pyexpat module using an installed expat
1509 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001511 --with-system-libmpdec build _decimal module using an installed libmpdec
1512 library
Ned Deilyd819b932013-09-06 01:07:05 -07001513 --with-tcltk-includes='-I...'
1514 override search for Tcl and Tk include files
1515 --with-tcltk-libs='-L...'
1516 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001517 --with-dbmliborder=db1:db2:...
1518 order to check db backends for dbm. Valid value is a
1519 colon separated string with the backend names
1520 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with(out)-doc-strings disable/enable documentation strings
1522 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001523 --with(out)-c-locale-coercion
1524 disable/enable C locale coercion to a UTF-8 based
1525 locale
1526 --with(out)-c-locale-warning
1527 disable/enable locale compatibility warning in the C
1528 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001529 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001530 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001536 --with(out)-ensurepip=[=upgrade]
1537 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001538 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001539 --with-ssl-default-suites=[python|openssl|STRING]
1540 Override default cipher suites string, python: use
1541 Python's preferred selection (default), openssl:
1542 leave OpenSSL's defaults untouched, STRING: use a
1543 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
1545Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001546 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 CC C compiler command
1548 CFLAGS C compiler flags
1549 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1550 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001555 PKG_CONFIG path to pkg-config utility
1556 PKG_CONFIG_PATH
1557 directories to add to pkg-config's search path
1558 PKG_CONFIG_LIBDIR
1559 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Use these variables to override the choices made by `configure' or to help
1562it to find libraries and programs with nonstandard names/locations.
1563
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001564Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001567fi
1568
1569if test "$ac_init_help" = "recursive"; then
1570 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 test -d "$ac_dir" ||
1573 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1574 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 ac_builddir=.
1576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577case "$ac_dir" in
1578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 case $ac_top_builddir_sub in
1584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1586 esac ;;
1587esac
1588ac_abs_top_builddir=$ac_pwd
1589ac_abs_builddir=$ac_pwd$ac_dir_suffix
1590# for backward compatibility:
1591ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$ac_top_builddir_sub
1597 ac_abs_top_srcdir=$ac_pwd ;;
1598 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$srcdir
1601 ac_abs_top_srcdir=$srcdir ;;
1602 *) # Relative name.
1603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1604 ac_top_srcdir=$ac_top_build_prefix$srcdir
1605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001606esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 cd "$ac_dir" || { ac_status=$?; continue; }
1610 # Check for guested configure.
1611 if test -f "$ac_srcdir/configure.gnu"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1614 elif test -f "$ac_srcdir/configure"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 fi || ac_status=$?
1620 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 done
1622fi
1623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001625if $ac_init_version; then
1626 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001627python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001628generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001629
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001631This configure script is free software; the Free Software Foundation
1632gives unlimited permission to copy, distribute and modify it.
1633_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001636
1637## ------------------------ ##
1638## Autoconf initialization. ##
1639## ------------------------ ##
1640
1641# ac_fn_c_try_compile LINENO
1642# --------------------------
1643# Try to compile conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_compile ()
1645{
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 rm -f conftest.$ac_objext
1648 if { { ac_try="$ac_compile"
1649case "(($ac_try" in
1650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1651 *) ac_try_echo=$ac_try;;
1652esac
1653eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1654$as_echo "$ac_try_echo"; } >&5
1655 (eval "$ac_compile") 2>conftest.err
1656 ac_status=$?
1657 if test -s conftest.err; then
1658 grep -v '^ *+' conftest.err >conftest.er1
1659 cat conftest.er1 >&5
1660 mv -f conftest.er1 conftest.err
1661 fi
1662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1663 test $ac_status = 0; } && {
1664 test -z "$ac_c_werror_flag" ||
1665 test ! -s conftest.err
1666 } && test -s conftest.$ac_objext; then :
1667 ac_retval=0
1668else
1669 $as_echo "$as_me: failed program was:" >&5
1670sed 's/^/| /' conftest.$ac_ext >&5
1671
1672 ac_retval=1
1673fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 as_fn_set_status $ac_retval
1676
1677} # ac_fn_c_try_compile
1678
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001679# ac_fn_c_try_cpp LINENO
1680# ----------------------
1681# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1682ac_fn_c_try_cpp ()
1683{
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685 if { { ac_try="$ac_cpp conftest.$ac_ext"
1686case "(($ac_try" in
1687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 *) ac_try_echo=$ac_try;;
1689esac
1690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1691$as_echo "$ac_try_echo"; } >&5
1692 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1693 ac_status=$?
1694 if test -s conftest.err; then
1695 grep -v '^ *+' conftest.err >conftest.er1
1696 cat conftest.er1 >&5
1697 mv -f conftest.er1 conftest.err
1698 fi
1699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1700 test $ac_status = 0; } > conftest.i && {
1701 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1702 test ! -s conftest.err
1703 }; then :
1704 ac_retval=0
1705else
1706 $as_echo "$as_me: failed program was:" >&5
1707sed 's/^/| /' conftest.$ac_ext >&5
1708
1709 ac_retval=1
1710fi
1711 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1712 as_fn_set_status $ac_retval
1713
1714} # ac_fn_c_try_cpp
1715
Matthias Kloseb9621712010-04-24 17:59:49 +00001716# ac_fn_c_try_link LINENO
1717# -----------------------
1718# Try to link conftest.$ac_ext, and return whether this succeeded.
1719ac_fn_c_try_link ()
1720{
1721 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1722 rm -f conftest.$ac_objext conftest$ac_exeext
1723 if { { ac_try="$ac_link"
1724case "(($ac_try" in
1725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 *) ac_try_echo=$ac_try;;
1727esac
1728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1729$as_echo "$ac_try_echo"; } >&5
1730 (eval "$ac_link") 2>conftest.err
1731 ac_status=$?
1732 if test -s conftest.err; then
1733 grep -v '^ *+' conftest.err >conftest.er1
1734 cat conftest.er1 >&5
1735 mv -f conftest.er1 conftest.err
1736 fi
1737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738 test $ac_status = 0; } && {
1739 test -z "$ac_c_werror_flag" ||
1740 test ! -s conftest.err
1741 } && test -s conftest$ac_exeext && {
1742 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001743 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 }; then :
1745 ac_retval=0
1746else
1747 $as_echo "$as_me: failed program was:" >&5
1748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
1752 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1753 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1754 # interfere with the next link command; also delete a directory that is
1755 # left behind by Apple's compiler. We do this before executing the actions.
1756 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001758 as_fn_set_status $ac_retval
1759
1760} # ac_fn_c_try_link
1761
Matthias Kloseb9621712010-04-24 17:59:49 +00001762# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1763# -------------------------------------------------------
1764# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1765# the include files in INCLUDES and setting the cache variable VAR
1766# accordingly.
1767ac_fn_c_check_header_mongrel ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001770 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1772$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001773if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 $as_echo_n "(cached) " >&6
1775fi
1776eval ac_res=\$$3
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1778$as_echo "$ac_res" >&6; }
1779else
1780 # Is the header compilable?
1781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1782$as_echo_n "checking $2 usability... " >&6; }
1783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1784/* end confdefs.h. */
1785$4
1786#include <$2>
1787_ACEOF
1788if ac_fn_c_try_compile "$LINENO"; then :
1789 ac_header_compiler=yes
1790else
1791 ac_header_compiler=no
1792fi
1793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1795$as_echo "$ac_header_compiler" >&6; }
1796
1797# Is the header present?
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1799$as_echo_n "checking $2 presence... " >&6; }
1800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_cpp "$LINENO"; then :
1805 ac_header_preproc=yes
1806else
1807 ac_header_preproc=no
1808fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001809rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1811$as_echo "$ac_header_preproc" >&6; }
1812
1813# So? What about this header?
1814case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1815 yes:no: )
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1817$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1819$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1820 ;;
1821 no:yes:* )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1823$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1825$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1827$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1829$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1831$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001832( $as_echo "## --------------------------------------- ##
1833## Report this to https://bugs.python.org/ ##
1834## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001835 ) | sed "s/^/$as_me: WARNING: /" >&2
1836 ;;
1837esac
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001840if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 $as_echo_n "(cached) " >&6
1842else
1843 eval "$3=\$ac_header_compiler"
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
1848fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001849 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001850
1851} # ac_fn_c_check_header_mongrel
1852
1853# ac_fn_c_try_run LINENO
1854# ----------------------
1855# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1856# that executables *can* be run.
1857ac_fn_c_try_run ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 if { { ac_try="$ac_link"
1861case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_link") 2>&5
1868 ac_status=$?
1869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1871 { { case "(($ac_try" in
1872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873 *) ac_try_echo=$ac_try;;
1874esac
1875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876$as_echo "$ac_try_echo"; } >&5
1877 (eval "$ac_try") 2>&5
1878 ac_status=$?
1879 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1880 test $ac_status = 0; }; }; then :
1881 ac_retval=0
1882else
1883 $as_echo "$as_me: program exited with status $ac_status" >&5
1884 $as_echo "$as_me: failed program was:" >&5
1885sed 's/^/| /' conftest.$ac_ext >&5
1886
1887 ac_retval=$ac_status
1888fi
1889 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001890 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 as_fn_set_status $ac_retval
1892
1893} # ac_fn_c_try_run
1894
1895# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1896# -------------------------------------------------------
1897# Tests whether HEADER exists and can be compiled using the include files in
1898# INCLUDES, setting the cache variable VAR accordingly.
1899ac_fn_c_check_header_compile ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1903$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001904if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905 $as_echo_n "(cached) " >&6
1906else
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910#include <$2>
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 eval "$3=yes"
1914else
1915 eval "$3=no"
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001923
1924} # ac_fn_c_check_header_compile
1925
Matthias Kloseb9621712010-04-24 17:59:49 +00001926# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1927# -------------------------------------------
1928# Tests whether TYPE exists after having included INCLUDES, setting cache
1929# variable VAR accordingly.
1930ac_fn_c_check_type ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001935if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=no"
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$4
1942int
1943main ()
1944{
1945if (sizeof ($2))
1946 return 0;
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958if (sizeof (($2)))
1959 return 0;
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965
1966else
1967 eval "$3=yes"
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973eval ac_res=\$$3
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1975$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978} # ac_fn_c_check_type
1979
Matthias Kloseb9621712010-04-24 17:59:49 +00001980# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1981# --------------------------------------------
1982# Tries to find the compile-time value of EXPR in a program that includes
1983# INCLUDES, setting VAR accordingly. Returns whether the value could be
1984# computed
1985ac_fn_c_compute_int ()
1986{
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 if test "$cross_compiling" = yes; then
1989 # Depending upon the size, compute the lo and hi bounds.
1990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$4
1993int
1994main ()
1995{
1996static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001997test_array [0] = 0;
1998return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005 ac_lo=0 ac_mid=0
2006 while :; do
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_hi=$ac_mid; break
2023else
2024 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2025 if test $ac_lo -le $ac_mid; then
2026 ac_lo= ac_hi=
2027 break
2028 fi
2029 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032 done
2033else
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002041test_array [0] = 0;
2042return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_hi=-1 ac_mid=-1
2050 while :; do
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_lo=$ac_mid; break
2067else
2068 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2069 if test $ac_mid -le $ac_hi; then
2070 ac_lo= ac_hi=
2071 break
2072 fi
2073 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 done
2077else
2078 ac_lo= ac_hi=
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083# Binary search between lo and hi bounds.
2084while test "x$ac_lo" != "x$ac_hi"; do
2085 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002093test_array [0] = 0;
2094return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=$ac_mid
2102else
2103 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106done
2107case $ac_lo in #((
2108?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2109'') ac_retval=1 ;;
2110esac
2111 else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115static long int longval () { return $2; }
2116static unsigned long int ulongval () { return $2; }
2117#include <stdio.h>
2118#include <stdlib.h>
2119int
2120main ()
2121{
2122
2123 FILE *f = fopen ("conftest.val", "w");
2124 if (! f)
2125 return 1;
2126 if (($2) < 0)
2127 {
2128 long int i = longval ();
2129 if (i != ($2))
2130 return 1;
2131 fprintf (f, "%ld", i);
2132 }
2133 else
2134 {
2135 unsigned long int i = ulongval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%lu", i);
2139 }
2140 /* Do not output a trailing newline, as this causes \r\n confusion
2141 on some platforms. */
2142 return ferror (f) || fclose (f) != 0;
2143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_run "$LINENO"; then :
2149 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2150else
2151 ac_retval=1
2152fi
2153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2154 conftest.$ac_objext conftest.beam conftest.$ac_ext
2155rm -f conftest.val
2156
2157 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002158 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002159 as_fn_set_status $ac_retval
2160
2161} # ac_fn_c_compute_int
2162
2163# ac_fn_c_check_func LINENO FUNC VAR
2164# ----------------------------------
2165# Tests whether FUNC exists, setting the cache variable VAR accordingly
2166ac_fn_c_check_func ()
2167{
2168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2170$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002171if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 $as_echo_n "(cached) " >&6
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2177 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2178#define $2 innocuous_$2
2179
2180/* System header to define __stub macros and hopefully few prototypes,
2181 which can conflict with char $2 (); below.
2182 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2183 <limits.h> exists even on freestanding compilers. */
2184
2185#ifdef __STDC__
2186# include <limits.h>
2187#else
2188# include <assert.h>
2189#endif
2190
2191#undef $2
2192
2193/* Override any GCC internal prototype to avoid an error.
2194 Use char because int might match the return type of a GCC
2195 builtin and then its argument prototype would still apply. */
2196#ifdef __cplusplus
2197extern "C"
2198#endif
2199char $2 ();
2200/* The GNU C library defines this for functions which it implements
2201 to always fail with ENOSYS. Some functions are actually named
2202 something starting with __ and the normal name is an alias. */
2203#if defined __stub_$2 || defined __stub___$2
2204choke me
2205#endif
2206
2207int
2208main ()
2209{
2210return $2 ();
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_link "$LINENO"; then :
2216 eval "$3=yes"
2217else
2218 eval "$3=no"
2219fi
2220rm -f core conftest.err conftest.$ac_objext \
2221 conftest$ac_exeext conftest.$ac_ext
2222fi
2223eval ac_res=\$$3
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2225$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002226 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002227
2228} # ac_fn_c_check_func
2229
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002230# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2231# ---------------------------------------------
2232# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2233# accordingly.
2234ac_fn_c_check_decl ()
2235{
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 as_decl_name=`echo $2|sed 's/ *(.*//'`
2238 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2240$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2241if eval \${$3+:} false; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$4
2247int
2248main ()
2249{
2250#ifndef $as_decl_name
2251#ifdef __cplusplus
2252 (void) $as_decl_use;
2253#else
2254 (void) $as_decl_name;
2255#endif
2256#endif
2257
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_compile "$LINENO"; then :
2263 eval "$3=yes"
2264else
2265 eval "$3=no"
2266fi
2267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268fi
2269eval ac_res=\$$3
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2271$as_echo "$ac_res" >&6; }
2272 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2273
2274} # ac_fn_c_check_decl
2275
Matthias Kloseb9621712010-04-24 17:59:49 +00002276# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2277# ----------------------------------------------------
2278# Tries to find if the field MEMBER exists in type AGGR, after including
2279# INCLUDES, setting cache variable VAR accordingly.
2280ac_fn_c_check_member ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2284$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002285if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$5
2291int
2292main ()
2293{
2294static $2 ac_aggr;
2295if (ac_aggr.$3)
2296return 0;
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_compile "$LINENO"; then :
2302 eval "$4=yes"
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (sizeof ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 eval "$4=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$4
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002333This file contains any messages produced by compilers while
2334running configure, to aid debugging if configure makes a mistake.
2335
Ned Deily5489bda2018-01-31 17:44:09 -05002336It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002337generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339 $ $0 $@
2340
2341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002342exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002343{
2344cat <<_ASUNAME
2345## --------- ##
2346## Platform. ##
2347## --------- ##
2348
2349hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2350uname -m = `(uname -m) 2>/dev/null || echo unknown`
2351uname -r = `(uname -r) 2>/dev/null || echo unknown`
2352uname -s = `(uname -s) 2>/dev/null || echo unknown`
2353uname -v = `(uname -v) 2>/dev/null || echo unknown`
2354
2355/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2356/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2357
2358/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2359/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2360/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002362/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2363/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2364/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2365
2366_ASUNAME
2367
2368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2369for as_dir in $PATH
2370do
2371 IFS=$as_save_IFS
2372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo "PATH: $as_dir"
2374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377} >&5
2378
2379cat >&5 <<_ACEOF
2380
2381
2382## ----------- ##
2383## Core tests. ##
2384## ----------- ##
2385
2386_ACEOF
2387
2388
2389# Keep a trace of the command line.
2390# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_configure_args0=
2396ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_must_keep_next=false
2398for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002399do
Skip Montanaro6dead952003-09-25 14:50:04 +00002400 for ac_arg
2401 do
2402 case $ac_arg in
2403 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2404 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2405 | -silent | --silent | --silen | --sile | --sil)
2406 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 esac
2410 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 case $ac_arg in
2418 *=* | --config-cache | -C | -disable-* | --disable-* \
2419 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2420 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2421 | -with-* | --with-* | -without-* | --without-* | --x)
2422 case "$ac_configure_args0 " in
2423 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2424 esac
2425 ;;
2426 -* ) ac_must_keep_next=true ;;
2427 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 ;;
2431 esac
2432 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002433done
Matthias Kloseb9621712010-04-24 17:59:49 +00002434{ ac_configure_args0=; unset ac_configure_args0;}
2435{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437# When interrupted or exit'd, cleanup temporary files, and complete
2438# config.log. We remove comments because anyway the quotes in there
2439# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440# WARNING: Use '\'' to represent an apostrophe within the trap.
2441# 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 +00002442trap 'exit_status=$?
2443 # Save into config.log some information that might help in debugging.
2444 {
2445 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002446
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002447 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002448## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 echo
2451 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac |
2479 sort
2480)
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002483 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002484## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002515## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 fi
2521 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$as_me: caught signal $ac_signal"
2523 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 rm -f core *.core core.conftest.* &&
2526 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002529for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002531done
2532ac_signal=0
2533
2534# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536
Matthias Kloseb9621712010-04-24 17:59:49 +00002537$as_echo "/* confdefs.h */" > confdefs.h
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539# Predefined preprocessor variables.
2540
2541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_NAME "$PACKAGE_NAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_VERSION "$PACKAGE_VERSION"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_STRING "$PACKAGE_STRING"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2559_ACEOF
2560
Matthias Kloseb9621712010-04-24 17:59:49 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_URL "$PACKAGE_URL"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002567# Prefer an explicitly selected file to automatically selected ones.
2568ac_site_file1=NONE
2569ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571 # We do not want a PATH search for config.site.
2572 case $CONFIG_SITE in #((
2573 -*) ac_site_file1=./$CONFIG_SITE;;
2574 */*) ac_site_file1=$CONFIG_SITE;;
2575 *) ac_site_file1=./$CONFIG_SITE;;
2576 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$prefix/share/config.site
2579 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580else
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$ac_default_prefix/share/config.site
2582 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002584for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585do
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 test "x$ac_site_file" = xNONE && continue
2587 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2589$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591 . "$ac_site_file" \
2592 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2594as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002595See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596 fi
2597done
2598
2599if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 # Some versions of bash will fail to source /dev/null (special files
2601 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2602 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2604$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2607 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 esac
2609 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2612$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 >$cache_file
2614fi
2615
2616# Check that the precious variables saved in the cache have kept the same
2617# value.
2618ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2621 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2623 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $ac_old_set,$ac_new_set in
2625 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2627$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 +00002628 ac_cache_corrupted=: ;;
2629 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2631$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_cache_corrupted=: ;;
2633 ,);;
2634 *)
2635 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # differences in whitespace do not lead to failure.
2637 ac_old_val_w=`echo x $ac_old_val`
2638 ac_new_val_w=`echo x $ac_new_val`
2639 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2641$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2642 ac_cache_corrupted=:
2643 else
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2645$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2646 eval $ac_var=\$ac_old_val
2647 fi
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2649$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2651$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 fi;;
2653 esac
2654 # Pass precious variables to config.status.
2655 if test "$ac_new_set" = set; then
2656 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 *) ac_arg=$ac_var=$ac_new_val ;;
2659 esac
2660 case " $ac_configure_args " in
2661 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
2665done
2666if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2670$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002671 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002673## -------------------- ##
2674## Main body of script. ##
2675## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676
Guido van Rossum7f43da71994-08-01 12:15:30 +00002677ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2681ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682
Guido van Rossum627b2d71993-12-24 10:39:16 +00002683
Michael W. Hudson54241132001-12-07 15:38:26 +00002684
Trent Nelson4d4ec652012-10-16 08:51:24 -04002685
Christian Heimesff5be6e2018-01-20 13:19:21 +01002686
2687
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002688if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Victor Stinner9ed34a82017-05-02 22:35:58 +02002707if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002709# Extract the first word of "git", so it can be a program name with args.
2710set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716 if test -n "$HAS_GIT"; then
2717 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002726 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735fi
2736fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737HAS_GIT=$ac_cv_prog_HAS_GIT
2738if test -n "$HAS_GIT"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2740$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751then
Ned Deily554626a2017-03-20 23:41:52 -04002752 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2753 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITVERSION=""
2757 GITTAG=""
2758 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if 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/install.sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install.sh -c"
2774 break
2775 elif test -f "$ac_dir/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002877if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878 $as_echo_n "(cached) " >&6
2879else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880 if test -n "$PYTHON_FOR_REGEN"; then
2881 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002890 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002900PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2901if test -n "$PYTHON_FOR_REGEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2903$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
Victor Stinnera5c62a82017-05-03 18:21:48 +02002910 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 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 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002932 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 +02002933 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002934elif test "$cross_compiling" = maybe; then
2935 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002936else
2937 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2938fi
2939
2940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Benjamin Petersond23f8222009-04-05 19:13:16 +00002942if test "$prefix" != "/"; then
2943 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
2948
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002949# We don't use PACKAGE_ variables, and they cause conflicts
2950# with other autoconf-based packages that include Python.h
2951grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2952rm confdefs.h
2953mv confdefs.h.new confdefs.h
2954
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002955
Ned Deily5489bda2018-01-31 17:44:09 -05002956VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002957
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002958# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002959
2960SOVERSION=1.0
2961
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002962# The later defininition of _XOPEN_SOURCE disables certain features
2963# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2964
Matthias Kloseb9621712010-04-24 17:59:49 +00002965$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966
2967
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002968# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2969# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2970# them.
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973
2974
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980
2981
Martin v. Löwisd6320502004-08-12 13:45:08 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002983# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987
2988
2989
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002990define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002991
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002992# Arguments passed to configure.
2993
2994CONFIG_ARGS="$ac_configure_args"
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2997$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002999if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001 case $enableval in
3002 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003003 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003004 # information
3005 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003006 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003007 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003008 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3009 if test ! -d "${enableval}"
3010 then
3011 enableval=/
3012 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003014 ;;
3015 esac
3016 case $enableval in
3017 no)
3018 UNIVERSALSDK=
3019 enable_universalsdk=
3020 ;;
3021 *)
3022 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 if test ! -d "${UNIVERSALSDK}"
3024 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003025 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027 ;;
3028 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031else
3032
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038if test -n "${UNIVERSALSDK}"
3039then
Matthias Kloseb9621712010-04-24 17:59:49 +00003040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3041$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042else
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003048
Ned Deily87adb6e2013-10-18 21:09:56 -07003049ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051# For backward compatibility reasons we prefer to select '32-bit' if available,
3052# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003053UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054if test "`uname -s`" = "Darwin"
3055then
3056 if test -n "${UNIVERSALSDK}"
3057 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003058 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059 then
3060 UNIVERSAL_ARCHS="intel"
3061 fi
3062 fi
3063fi
3064
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003065
Matthias Kloseb9621712010-04-24 17:59:49 +00003066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3067$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068
3069# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003070if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072 UNIVERSAL_ARCHS="$withval"
3073
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074fi
3075
Ned Deily87adb6e2013-10-18 21:09:56 -07003076if test -n "${UNIVERSALSDK}"
3077then
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3079$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3080else
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3082$as_echo "no" >&6; }
3083fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003085
3086# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003087if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088 withval=$with_framework_name;
3089 PYTHONFRAMEWORK=${withval}
3090 PYTHONFRAMEWORKDIR=${withval}.framework
3091 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3092
3093else
3094
3095 PYTHONFRAMEWORK=Python
3096 PYTHONFRAMEWORKDIR=Python.framework
3097 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3098
3099fi
3100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003104 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003106 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003107 esac
3108 case $enableval in
3109 no)
3110 PYTHONFRAMEWORK=
3111 PYTHONFRAMEWORKDIR=no-framework
3112 PYTHONFRAMEWORKPREFIX=
3113 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003114 FRAMEWORKINSTALLFIRST=
3115 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003116 FRAMEWORKALTINSTALLFIRST=
3117 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003118 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 if test "x${prefix}" = "xNONE"; then
3120 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3121 else
3122 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3123 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003124 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003125 ;;
3126 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003127 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003130 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003131 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3132 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003135
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 if test "x${prefix}" = "xNONE" ; then
3137 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
3143 case "${enableval}" in
3144 /System*)
3145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3146 if test "${prefix}" = "NONE" ; then
3147 # See below
3148 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3149 fi
3150 ;;
3151
3152 /Library*)
3153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3154 ;;
3155
3156 */Library/Frameworks)
3157 MDIR="`dirname "${enableval}"`"
3158 MDIR="`dirname "${MDIR}"`"
3159 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3160
3161 if test "${prefix}" = "NONE"; then
3162 # User hasn't specified the
3163 # --prefix option, but wants to install
3164 # the framework in a non-default location,
3165 # ensure that the compatibility links get
3166 # installed relative to that prefix as well
3167 # instead of in /usr/local.
3168 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3169 fi
3170 ;;
3171
3172 *)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175 esac
3176
Jack Jansen127e56e2001-09-11 14:41:54 +00003177 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003179 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003185 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3186
3187 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3188
Jack Jansene578a632001-08-15 01:27:14 +00003189 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003190
Guido van Rossum563e7081996-09-10 18:20:48 +00003191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Jack Jansene578a632001-08-15 01:27:14 +00003193 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003194 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORKPREFIX=
3196 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197 FRAMEWORKINSTALLFIRST=
3198 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 FRAMEWORKALTINSTALLFIRST=
3200 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003201 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 if test "x${prefix}" = "xNONE" ; then
3203 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3204 else
3205 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3206 fi
Jack Jansene578a632001-08-15 01:27:14 +00003207 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003208
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210fi
3211
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212
3213
Michael W. Hudson54241132001-12-07 15:38:26 +00003214
3215
3216
3217
Jack Jansene578a632001-08-15 01:27:14 +00003218
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219
3220
3221
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003222
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223
Ned Deilyb8f944f2013-11-21 22:42:25 -08003224
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003225
3226cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003227#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228_ACEOF
3229
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003232## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003233## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003234##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235# Set name for machine-dependent library files
3236
Matthias Kloseb9621712010-04-24 17:59:49 +00003237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3238$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239if test -z "$MACHDEP"
3240then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003241 # avoid using uname for cross builds
3242 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003243 # ac_sys_system and ac_sys_release are used for setting
3244 # a lot of different things including 'define_xopen_source'
3245 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003247 *-*-linux-android*)
3248 ac_sys_system=Linux-android
3249 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 *-*-linux*)
3251 ac_sys_system=Linux
3252 ;;
3253 *-*-cygwin*)
3254 ac_sys_system=Cygwin
3255 ;;
3256 *)
3257 # for now, limit cross builds to known configurations
3258 MACHDEP="unknown"
3259 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3260 esac
3261 ac_sys_release=
3262 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003264 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003265 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 fi
3271 ac_md_system=`echo $ac_sys_system |
3272 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3273 ac_md_release=`echo $ac_sys_release |
3274 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3275 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003276
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003278 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003279 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003280 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003281 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283fi
Guido van Rossum91922671997-10-09 20:24:13 +00003284
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003285
3286if test "$cross_compiling" = yes; then
3287 case "$host" in
3288 *-*-linux*)
3289 case "$host_cpu" in
3290 arm*)
3291 _host_cpu=arm
3292 ;;
3293 *)
3294 _host_cpu=$host_cpu
3295 esac
3296 ;;
3297 *-*-cygwin*)
3298 _host_cpu=
3299 ;;
3300 *)
3301 # for now, limit cross builds to known configurations
3302 MACHDEP="unknown"
3303 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3304 esac
3305 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3306fi
3307
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003308# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3309# disable features if it is defined, without any means to access these
3310# features as extensions. For these systems, we skip the definition of
3311# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3312# some feature, make sure there is no alternative way to access this
3313# feature. Also, when using wildcards, make sure you have verified the
3314# need for not defining _XOPEN_SOURCE on all systems matching the
3315# wildcard, and that the wildcard does not include future systems
3316# (which may remove their limitations).
3317case $ac_sys_system/$ac_sys_release in
3318 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3319 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003320 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003321 # In addition, Stefan Krah confirms that issue #1244610 exists through
3322 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003323 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003324 define_xopen_source=no
3325 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3326 # also defined. This can be overridden by defining _BSD_SOURCE
3327 # As this has a different meaning on Linux, only define it on OpenBSD
3328
Matthias Kloseb9621712010-04-24 17:59:49 +00003329$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003330
3331 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003332 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003338
3339 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003340 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3341 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3342 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003343 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 +00003344 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003345 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3346 # request to enable features supported by the standard as a request
3347 # to disable features not supported by the standard. The best way
3348 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3349 # entirely and define __EXTENSIONS__ instead.
3350 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003351 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003352 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3353 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003354 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003355 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 define_xopen_source=no;;
3357 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003358 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003361 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3362 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3363 # identifies itself as Darwin/7.*
3364 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3365 # disables platform specific features beyond repair.
3366 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3367 # has no effect, don't bother defining them
3368 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003369 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003370 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003371 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003372 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3373 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3374 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003375 AIX/4)
3376 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003377 AIX/5)
3378 if test `uname -r` -eq 1; then
3379 define_xopen_source=no
3380 fi
3381 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003382 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3383 # defining NI_NUMERICHOST.
3384 QNX/6.3.2)
3385 define_xopen_source=no
3386 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003387
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003388esac
3389
3390if test $define_xopen_source = yes
3391then
Victor Stinner14d098d2011-09-07 22:29:43 +02003392 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
Victor Stinner14d098d2011-09-07 22:29:43 +02003394$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003395
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003396
3397 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3398 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3399 # several APIs are not declared. Since this is also needed in some
3400 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Matthias Kloseb9621712010-04-24 17:59:49 +00003402$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
3404
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003406$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408fi
3409
Christian Heimes647cd872013-12-07 23:39:33 +01003410# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3411case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003412 hp*|HP*)
3413 define_stdc_a1=yes;;
3414 *)
3415 define_stdc_a1=no;;
3416esac
3417
3418if test $define_stdc_a1 = yes
3419then
Christian Heimes647cd872013-12-07 23:39:33 +01003420
3421$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3422
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423fi
Christian Heimes647cd872013-12-07 23:39:33 +01003424
Jack Jansen6b08a402004-06-03 12:41:45 +00003425# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3426# it may influence the way we can build extensions, so distutils
3427# needs to check it
3428
Thomas Wouters477c8d52006-05-27 19:21:47 +00003429
Jack Jansen6b08a402004-06-03 12:41:45 +00003430CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003431EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003432
Guido van Rossum627b2d71993-12-24 10:39:16 +00003433# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003434
3435# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3436# for debug/optimization stuff. BASECFLAGS is for flags that are required
3437# just to get things to compile and link. Users are free to override OPT
3438# when running configure or make. The build should not break if they do.
3439# BASECFLAGS should generally not be messed with, however.
3440
Guido van Rossum8b131c51995-03-09 14:10:13 +00003441# If the user switches compilers, we can't believe the cache
3442if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3443then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003444 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003445(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003446fi
3447
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003448# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3449# when the compiler supports them, but we don't always want -O2, and
3450# we set -g later.
3451if test -z "$CFLAGS"; then
3452 CFLAGS=
3453fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003454
3455if test "$ac_sys_system" = "Darwin"
3456then
3457 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003458 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003459 # information
3460 if test -z "${CC}"
3461 then
3462 found_gcc=
3463 found_clang=
3464 as_save_IFS=$IFS; IFS=:
3465 for as_dir in $PATH
3466 do
3467 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003468 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003469 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003470 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003471 fi
3472 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003473 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003475 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003476 fi
3477 fi
3478 done
3479 IFS=$as_save_IFS
3480
3481 if test -n "$found_gcc" -a -n "$found_clang"
3482 then
3483 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3484 then
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3486$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3487 CC="$found_clang"
3488 CXX="$found_clang++"
3489 fi
3490
3491
3492 elif test -z "$found_gcc" -a -n "$found_clang"
3493 then
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3495$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3496 CC="$found_clang"
3497 CXX="$found_clang++"
3498
3499 elif test -z "$found_gcc" -a -z "$found_clang"
3500 then
3501 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3502 if test -n "${found_clang}"
3503 then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3505$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3506 CC="${found_clang}"
3507 CXX="`/usr/bin/xcrun -find clang++`"
3508
3509 # else: use default behaviour
3510 fi
3511 fi
3512 fi
3513fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003514ac_ext=c
3515ac_cpp='$CPP $CPPFLAGS'
3516ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3517ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3518ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519if test -n "$ac_tool_prefix"; then
3520 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3521set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3523$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003524if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003525 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003526else
3527 if test -n "$CC"; then
3528 ac_cv_prog_CC="$CC" # Let the user override the test.
3529else
Martin v. Löwis11437992002-04-12 09:54:03 +00003530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3531for as_dir in $PATH
3532do
3533 IFS=$as_save_IFS
3534 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003536 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003538 $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 +00003539 break 2
3540 fi
3541done
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003544
Jack Jansendd19cf82001-12-06 22:36:17 +00003545fi
3546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003547CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003548if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3550$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003551else
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3553$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003554fi
3555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556
Martin v. Löwis11437992002-04-12 09:54:03 +00003557fi
3558if test -z "$ac_cv_prog_CC"; then
3559 ac_ct_CC=$CC
3560 # Extract the first word of "gcc", so it can be a program name with args.
3561set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003564if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003566else
3567 if test -n "$ac_ct_CC"; then
3568 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3569else
3570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $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 +00003579 break 2
3580 fi
3581done
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
3585fi
3586fi
3587ac_ct_CC=$ac_cv_prog_ac_ct_CC
3588if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3590$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591else
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596 if test "x$ac_ct_CC" = x; then
3597 CC=""
3598 else
3599 case $cross_compiling:$ac_tool_warned in
3600yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3602$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603ac_tool_warned=yes ;;
3604esac
3605 CC=$ac_ct_CC
3606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607else
3608 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003609fi
3610
Jack Jansendd19cf82001-12-06 22:36:17 +00003611if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612 if test -n "$ac_tool_prefix"; then
3613 # 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 +00003614set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003617if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003619else
3620 if test -n "$CC"; then
3621 ac_cv_prog_CC="$CC" # Let the user override the test.
3622else
Martin v. Löwis11437992002-04-12 09:54:03 +00003623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $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 +00003632 break 2
3633 fi
3634done
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003637
3638fi
3639fi
3640CC=$ac_cv_prog_CC
3641if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3643$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003651fi
3652if test -z "$CC"; then
3653 # Extract the first word of "cc", so it can be a program name with args.
3654set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003657if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
3660 if test -n "$CC"; then
3661 ac_cv_prog_CC="$CC" # Let the user override the test.
3662else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003663 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3665for as_dir in $PATH
3666do
3667 IFS=$as_save_IFS
3668 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003669 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003671 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3672 ac_prog_rejected=yes
3673 continue
3674 fi
3675 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $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 +00003677 break 2
3678 fi
3679done
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003682
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003683if test $ac_prog_rejected = yes; then
3684 # We found a bogon in the path, so make sure we never use it.
3685 set dummy $ac_cv_prog_CC
3686 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003688 # We chose a different compiler from the bogus one.
3689 # However, it has the same basename, so the bogon will be chosen
3690 # first if we set CC to just the basename; use the full file name.
3691 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003692 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003693 fi
3694fi
3695fi
3696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003697CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3700$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701else
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3703$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003704fi
3705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708if test -z "$CC"; then
3709 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 do
3712 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $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 +00003731 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003732 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003733done
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
3737fi
3738fi
3739CC=$ac_cv_prog_CC
3740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 test -n "$CC" && break
3750 done
3751fi
3752if test -z "$CC"; then
3753 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003755do
3756 # Extract the first word of "$ac_prog", so it can be a program name with args.
3757set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003760if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 if test -n "$ac_ct_CC"; then
3764 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3765else
3766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3767for as_dir in $PATH
3768do
3769 IFS=$as_save_IFS
3770 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 $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 +00003775 break 2
3776 fi
3777done
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781fi
3782fi
3783ac_ct_CC=$ac_cv_prog_ac_ct_CC
3784if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3786$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003790fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 test -n "$ac_ct_CC" && break
3794done
Michael W. Hudson54241132001-12-07 15:38:26 +00003795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 if test "x$ac_ct_CC" = x; then
3797 CC=""
3798 else
3799 case $cross_compiling:$ac_tool_warned in
3800yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803ac_tool_warned=yes ;;
3804esac
3805 CC=$ac_ct_CC
3806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003807fi
3808
3809fi
3810
3811
Matthias Kloseb9621712010-04-24 17:59:49 +00003812test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003814as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003815See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3819set X $ac_compile
3820ac_compiler=$2
3821for ac_option in --version -v -V -qversion; do
3822 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823case "(($ac_try" in
3824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3825 *) ac_try_echo=$ac_try;;
3826esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3828$as_echo "$ac_try_echo"; } >&5
3829 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 if test -s conftest.err; then
3832 sed '10a\
3833... rest of stderr output deleted ...
3834 10q' conftest.err >conftest.er1
3835 cat conftest.er1 >&5
3836 fi
3837 rm -f conftest.er1 conftest.err
3838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3839 test $ac_status = 0; }
3840done
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
Matthias Kloseb9621712010-04-24 17:59:49 +00003842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003843/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845int
3846main ()
3847{
3848
3849 ;
3850 return 0;
3851}
3852_ACEOF
3853ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003854ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003855# Try to create an executable without -o first, disregard a.out.
3856# It will help us diagnose broken compilers, and finding out an intuition
3857# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3859$as_echo_n "checking whether the C compiler works... " >&6; }
3860ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3861
3862# The possible output files:
3863ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865ac_rmfiles=
3866for ac_file in $ac_files
3867do
3868 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3871 esac
3872done
3873rm -f $ac_rmfiles
3874
Matthias Kloseb9621712010-04-24 17:59:49 +00003875if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876case "(($ac_try" in
3877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878 *) ac_try_echo=$ac_try;;
3879esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3885 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3887# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3888# in a Makefile. We should not override ac_cv_exeext if it was cached,
3889# so that the user can short-circuit this test for compilers unknown to
3890# Autoconf.
3891for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003892do
3893 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003896 ;;
3897 [ab].out )
3898 # We found the default executable, but exeext='' is most
3899 # certainly right.
3900 break;;
3901 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 then :; else
3904 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3905 fi
3906 # We set ac_cv_exeext here because the later test for it is not
3907 # safe: cross compilers may not add the suffix if given an `-o'
3908 # argument, so we may need to know it at that point already.
3909 # Even if this section looks crufty: it has the advantage of
3910 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 break;;
3912 * )
3913 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003914 esac
3915done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916test "$ac_cv_exeext" = no && ac_cv_exeext=
3917
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003918else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 ac_file=''
3920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003921if test -z "$ac_file"; then :
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3923$as_echo "no" >&6; }
3924$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003925sed 's/^/| /' conftest.$ac_ext >&5
3926
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003929as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003930See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003931else
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3933$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3936$as_echo_n "checking for C compiler default output file name... " >&6; }
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3938$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003939ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003942ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3944$as_echo_n "checking for suffix of executables... " >&6; }
3945if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3951$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3955 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3957# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3958# work properly (i.e., refer to `conftest.exe'), while it won't with
3959# `rm'.
3960for ac_file in conftest.exe conftest conftest.*; do
3961 test -f "$ac_file" || continue
3962 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3965 break;;
3966 * ) break;;
3967 esac
3968done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969else
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003972as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003973See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003975rm -f conftest conftest$ac_cv_exeext
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3977$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978
3979rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003980EXEEXT=$ac_cv_exeext
3981ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3983/* end confdefs.h. */
3984#include <stdio.h>
3985int
3986main ()
3987{
3988FILE *f = fopen ("conftest.out", "w");
3989 return ferror (f) || fclose (f) != 0;
3990
3991 ;
3992 return 0;
3993}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003995ac_clean_files="$ac_clean_files conftest.out"
3996# Check that the compiler produces executables we can run. If not, either
3997# the compiler is broken, or we cross compile.
3998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3999$as_echo_n "checking whether we are cross compiling... " >&6; }
4000if test "$cross_compiling" != yes; then
4001 { { ac_try="$ac_link"
4002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
4006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007$as_echo "$ac_try_echo"; } >&5
4008 (eval "$ac_link") 2>&5
4009 ac_status=$?
4010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }
4012 if { ac_try='./conftest$ac_cv_exeext'
4013 { { case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
4017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018$as_echo "$ac_try_echo"; } >&5
4019 (eval "$ac_try") 2>&5
4020 ac_status=$?
4021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022 test $ac_status = 0; }; }; then
4023 cross_compiling=no
4024 else
4025 if test "$cross_compiling" = maybe; then
4026 cross_compiling=yes
4027 else
4028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004031If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004032See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 fi
4034 fi
4035fi
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4037$as_echo "$cross_compiling" >&6; }
4038
4039rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4040ac_clean_files=$ac_clean_files_save
4041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4042$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004043if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo_n "(cached) " >&6
4045else
4046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047/* end confdefs.h. */
4048
4049int
4050main ()
4051{
4052
4053 ;
4054 return 0;
4055}
4056_ACEOF
4057rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004058if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059case "(($ac_try" in
4060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4061 *) ac_try_echo=$ac_try;;
4062esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004063eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4064$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4068 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004069 for ac_file in conftest.o conftest.obj conftest.*; do
4070 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4074 break;;
4075 esac
4076done
4077else
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004079sed 's/^/| /' conftest.$ac_ext >&5
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004083as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004084See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004085fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004086rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4089$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004090OBJEXT=$ac_cv_objext
4091ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4093$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004094if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004096else
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004099
Martin v. Löwis11437992002-04-12 09:54:03 +00004100int
4101main ()
4102{
4103#ifndef __GNUC__
4104 choke me
4105#endif
4106
4107 ;
4108 return 0;
4109}
4110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004111if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 ac_compiler_gnu=yes
4113else
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004117ac_cv_c_compiler_gnu=$ac_compiler_gnu
4118
4119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4121$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4122if test $ac_compiler_gnu = yes; then
4123 GCC=yes
4124else
4125 GCC=
4126fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004127ac_test_CFLAGS=${CFLAGS+set}
4128ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4130$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004131if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004133else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 ac_save_c_werror_flag=$ac_c_werror_flag
4135 ac_c_werror_flag=yes
4136 ac_cv_prog_cc_g=no
4137 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004140
Martin v. Löwis11437992002-04-12 09:54:03 +00004141int
4142main ()
4143{
4144
4145 ;
4146 return 0;
4147}
4148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004149if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004150 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151else
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 CFLAGS=""
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154/* end confdefs.h. */
4155
4156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004164if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165
Matthias Kloseb9621712010-04-24 17:59:49 +00004166else
4167 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170/* end confdefs.h. */
4171
4172int
4173main ()
4174{
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4188 ac_c_werror_flag=$ac_save_c_werror_flag
4189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4191$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004192if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004194elif test $ac_cv_prog_cc_g = yes; then
4195 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004196 CFLAGS="-g -O2"
4197 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004198 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199 fi
4200else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004201 if test "$GCC" = yes; then
4202 CFLAGS="-O2"
4203 else
4204 CFLAGS=
4205 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4208$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004209if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004211else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004213ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
4216#include <stdarg.h>
4217#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004218struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004219/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4220struct buf { int x; };
4221FILE * (*rcsopen) (struct buf *, struct stat *, int);
4222static char *e (p, i)
4223 char **p;
4224 int i;
4225{
4226 return p[i];
4227}
4228static char *f (char * (*g) (char **, int), char **p, ...)
4229{
4230 char *s;
4231 va_list v;
4232 va_start (v,p);
4233 s = g (p, va_arg (v,int));
4234 va_end (v);
4235 return s;
4236}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004237
4238/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4239 function prototypes and stuff, but not '\xHH' hex character constants.
4240 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004242 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4243 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004245int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4248 inside strings and character constants. */
4249#define FOO(x) 'x'
4250int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4251
Skip Montanaro6dead952003-09-25 14:50:04 +00004252int test (int i, double x);
4253struct s1 {int (*f) (int a);};
4254struct s2 {int (*f) (double a);};
4255int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4256int argc;
4257char **argv;
4258int
4259main ()
4260{
4261return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4262 ;
4263 return 0;
4264}
4265_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4267 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004268do
4269 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext
4274 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004275done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004277CC=$ac_save_CC
4278
4279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280# AC_CACHE_VAL
4281case "x$ac_cv_prog_cc_c89" in
4282 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4284$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4287$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4291$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004292esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004293if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004296
Martin v. Löwis11437992002-04-12 09:54:03 +00004297ac_ext=c
4298ac_cpp='$CPP $CPPFLAGS'
4299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4301ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004303ac_ext=c
4304ac_cpp='$CPP $CPPFLAGS'
4305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4307ac_compiler_gnu=$ac_cv_c_compiler_gnu
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4309$as_echo_n "checking how to run the C preprocessor... " >&6; }
4310# On Suns, sometimes $CPP names a directory.
4311if test -n "$CPP" && test -d "$CPP"; then
4312 CPP=
4313fi
4314if test -z "$CPP"; then
4315 if ${ac_cv_prog_CPP+:} false; then :
4316 $as_echo_n "(cached) " >&6
4317else
4318 # Double quotes because CPP needs to be expanded
4319 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4320 do
4321 ac_preproc_ok=false
4322for ac_c_preproc_warn_flag in '' yes
4323do
4324 # Use a header file that comes with gcc, so configuring glibc
4325 # with a fresh cross-compiler works.
4326 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4327 # <limits.h> exists even on freestanding compilers.
4328 # On the NeXT, cc -E runs the code through the compiler's parser,
4329 # not just through cpp. "Syntax error" is here to catch this case.
4330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4331/* end confdefs.h. */
4332#ifdef __STDC__
4333# include <limits.h>
4334#else
4335# include <assert.h>
4336#endif
4337 Syntax error
4338_ACEOF
4339if ac_fn_c_try_cpp "$LINENO"; then :
4340
4341else
4342 # Broken: fails on valid input.
4343continue
4344fi
4345rm -f conftest.err conftest.i conftest.$ac_ext
4346
4347 # OK, works on sane cases. Now check whether nonexistent headers
4348 # can be detected and how.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350/* end confdefs.h. */
4351#include <ac_nonexistent.h>
4352_ACEOF
4353if ac_fn_c_try_cpp "$LINENO"; then :
4354 # Broken: success on invalid input.
4355continue
4356else
4357 # Passes both tests.
4358ac_preproc_ok=:
4359break
4360fi
4361rm -f conftest.err conftest.i conftest.$ac_ext
4362
4363done
4364# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4365rm -f conftest.i conftest.err conftest.$ac_ext
4366if $ac_preproc_ok; then :
4367 break
4368fi
4369
4370 done
4371 ac_cv_prog_CPP=$CPP
4372
4373fi
4374 CPP=$ac_cv_prog_CPP
4375else
4376 ac_cv_prog_CPP=$CPP
4377fi
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4379$as_echo "$CPP" >&6; }
4380ac_preproc_ok=false
4381for ac_c_preproc_warn_flag in '' yes
4382do
4383 # Use a header file that comes with gcc, so configuring glibc
4384 # with a fresh cross-compiler works.
4385 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4386 # <limits.h> exists even on freestanding compilers.
4387 # On the NeXT, cc -E runs the code through the compiler's parser,
4388 # not just through cpp. "Syntax error" is here to catch this case.
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391#ifdef __STDC__
4392# include <limits.h>
4393#else
4394# include <assert.h>
4395#endif
4396 Syntax error
4397_ACEOF
4398if ac_fn_c_try_cpp "$LINENO"; then :
4399
4400else
4401 # Broken: fails on valid input.
4402continue
4403fi
4404rm -f conftest.err conftest.i conftest.$ac_ext
4405
4406 # OK, works on sane cases. Now check whether nonexistent headers
4407 # can be detected and how.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#include <ac_nonexistent.h>
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413 # Broken: success on invalid input.
4414continue
4415else
4416 # Passes both tests.
4417ac_preproc_ok=:
4418break
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422done
4423# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4424rm -f conftest.i conftest.err conftest.$ac_ext
4425if $ac_preproc_ok; then :
4426
4427else
4428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4430as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4431See \`config.log' for more details" "$LINENO" 5; }
4432fi
4433
4434ac_ext=c
4435ac_cpp='$CPP $CPPFLAGS'
4436ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4437ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4438ac_compiler_gnu=$ac_cv_c_compiler_gnu
4439
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4441$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4442if ${ac_cv_path_GREP+:} false; then :
4443 $as_echo_n "(cached) " >&6
4444else
4445 if test -z "$GREP"; then
4446 ac_path_GREP_found=false
4447 # Loop through the user's path and test for each of PROGNAME-LIST
4448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4450do
4451 IFS=$as_save_IFS
4452 test -z "$as_dir" && as_dir=.
4453 for ac_prog in grep ggrep; do
4454 for ac_exec_ext in '' $ac_executable_extensions; do
4455 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4456 as_fn_executable_p "$ac_path_GREP" || continue
4457# Check for GNU ac_path_GREP and select it if it is found.
4458 # Check for GNU $ac_path_GREP
4459case `"$ac_path_GREP" --version 2>&1` in
4460*GNU*)
4461 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4462*)
4463 ac_count=0
4464 $as_echo_n 0123456789 >"conftest.in"
4465 while :
4466 do
4467 cat "conftest.in" "conftest.in" >"conftest.tmp"
4468 mv "conftest.tmp" "conftest.in"
4469 cp "conftest.in" "conftest.nl"
4470 $as_echo 'GREP' >> "conftest.nl"
4471 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4472 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4473 as_fn_arith $ac_count + 1 && ac_count=$as_val
4474 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4475 # Best one so far, save it but keep looking for a better one
4476 ac_cv_path_GREP="$ac_path_GREP"
4477 ac_path_GREP_max=$ac_count
4478 fi
4479 # 10*(2^10) chars as input seems more than enough
4480 test $ac_count -gt 10 && break
4481 done
4482 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4483esac
4484
4485 $ac_path_GREP_found && break 3
4486 done
4487 done
4488 done
4489IFS=$as_save_IFS
4490 if test -z "$ac_cv_path_GREP"; then
4491 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4492 fi
4493else
4494 ac_cv_path_GREP=$GREP
4495fi
4496
4497fi
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4499$as_echo "$ac_cv_path_GREP" >&6; }
4500 GREP="$ac_cv_path_GREP"
4501
4502
Łukasz Langaa785c872016-09-09 17:37:37 -07004503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4504$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4505if ${ac_cv_path_SED+:} false; then :
4506 $as_echo_n "(cached) " >&6
4507else
4508 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4509 for ac_i in 1 2 3 4 5 6 7; do
4510 ac_script="$ac_script$as_nl$ac_script"
4511 done
4512 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4513 { ac_script=; unset ac_script;}
4514 if test -z "$SED"; then
4515 ac_path_SED_found=false
4516 # Loop through the user's path and test for each of PROGNAME-LIST
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_prog in sed gsed; do
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4525 as_fn_executable_p "$ac_path_SED" || continue
4526# Check for GNU ac_path_SED and select it if it is found.
4527 # Check for GNU $ac_path_SED
4528case `"$ac_path_SED" --version 2>&1` in
4529*GNU*)
4530 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4531*)
4532 ac_count=0
4533 $as_echo_n 0123456789 >"conftest.in"
4534 while :
4535 do
4536 cat "conftest.in" "conftest.in" >"conftest.tmp"
4537 mv "conftest.tmp" "conftest.in"
4538 cp "conftest.in" "conftest.nl"
4539 $as_echo '' >> "conftest.nl"
4540 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4541 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4542 as_fn_arith $ac_count + 1 && ac_count=$as_val
4543 if test $ac_count -gt ${ac_path_SED_max-0}; then
4544 # Best one so far, save it but keep looking for a better one
4545 ac_cv_path_SED="$ac_path_SED"
4546 ac_path_SED_max=$ac_count
4547 fi
4548 # 10*(2^10) chars as input seems more than enough
4549 test $ac_count -gt 10 && break
4550 done
4551 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4552esac
4553
4554 $ac_path_SED_found && break 3
4555 done
4556 done
4557 done
4558IFS=$as_save_IFS
4559 if test -z "$ac_cv_path_SED"; then
4560 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4561 fi
4562else
4563 ac_cv_path_SED=$SED
4564fi
4565
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4568$as_echo "$ac_cv_path_SED" >&6; }
4569 SED="$ac_cv_path_SED"
4570 rm -f conftest.sed
4571
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004572
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573
4574
Matthias Kloseb9621712010-04-24 17:59:49 +00004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4576$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004578# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004579if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581
4582 case $withval in
4583 no) with_cxx_main=no
4584 MAINCC='$(CC)';;
4585 yes) with_cxx_main=yes
4586 MAINCC='$(CXX)';;
4587 *) with_cxx_main=yes
4588 MAINCC=$withval
4589 if test -z "$CXX"
4590 then
4591 CXX=$withval
4592 fi;;
4593 esac
4594else
4595
4596 with_cxx_main=no
4597 MAINCC='$(CC)'
4598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599fi
4600
Matthias Kloseb9621712010-04-24 17:59:49 +00004601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4602$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004603
4604preset_cxx="$CXX"
4605if test -z "$CXX"
4606then
4607 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004608 gcc) if test -n "$ac_tool_prefix"; then
4609 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4610set dummy ${ac_tool_prefix}g++; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_path_CXX+:} false; then :
4614 $as_echo_n "(cached) " >&6
4615else
4616 case $CXX in
4617 [\\/]* | ?:[\\/]*)
4618 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4619 ;;
4620 *)
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622for as_dir in notfound
4623do
4624 IFS=$as_save_IFS
4625 test -z "$as_dir" && as_dir=.
4626 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630 break 2
4631 fi
4632done
4633 done
4634IFS=$as_save_IFS
4635
4636 ;;
4637esac
4638fi
4639CXX=$ac_cv_path_CXX
4640if test -n "$CXX"; then
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4642$as_echo "$CXX" >&6; }
4643else
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645$as_echo "no" >&6; }
4646fi
4647
4648
4649fi
4650if test -z "$ac_cv_path_CXX"; then
4651 ac_pt_CXX=$CXX
4652 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4655$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656if ${ac_cv_path_ac_pt_CXX+:} false; then :
4657 $as_echo_n "(cached) " >&6
4658else
4659 case $ac_pt_CXX in
4660 [\\/]* | ?:[\\/]*)
4661 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4662 ;;
4663 *)
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665for as_dir in notfound
4666do
4667 IFS=$as_save_IFS
4668 test -z "$as_dir" && as_dir=.
4669 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673 break 2
4674 fi
4675done
4676 done
4677IFS=$as_save_IFS
4678
4679 ;;
4680esac
4681fi
4682ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4683if test -n "$ac_pt_CXX"; then
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4685$as_echo "$ac_pt_CXX" >&6; }
4686else
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4688$as_echo "no" >&6; }
4689fi
4690
4691 if test "x$ac_pt_CXX" = x; then
4692 CXX="g++"
4693 else
4694 case $cross_compiling:$ac_tool_warned in
4695yes:)
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4698ac_tool_warned=yes ;;
4699esac
4700 CXX=$ac_pt_CXX
4701 fi
4702else
4703 CXX="$ac_cv_path_CXX"
4704fi
4705 ;;
4706 cc) if test -n "$ac_tool_prefix"; then
4707 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4708set dummy ${ac_tool_prefix}c++; ac_word=$2
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004711if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004712 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713else
4714 case $CXX in
4715 [\\/]* | ?:[\\/]*)
4716 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4717 ;;
4718 *)
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in notfound
4721do
4722 IFS=$as_save_IFS
4723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728 break 2
4729 fi
4730done
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004732IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734 ;;
4735esac
4736fi
4737CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004738if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4740$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004741else
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004745
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746
4747fi
4748if test -z "$ac_cv_path_CXX"; then
4749 ac_pt_CXX=$CXX
4750 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4753$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 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 +00004760 ;;
4761 *)
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in notfound
4764do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771 break 2
4772 fi
4773done
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004775IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 ;;
4778esac
4779fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4781if test -n "$ac_pt_CXX"; then
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4783$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004784else
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4786$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004788
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 if test "x$ac_pt_CXX" = x; then
4790 CXX="c++"
4791 else
4792 case $cross_compiling:$ac_tool_warned in
4793yes:)
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4796ac_tool_warned=yes ;;
4797esac
4798 CXX=$ac_pt_CXX
4799 fi
4800else
4801 CXX="$ac_cv_path_CXX"
4802fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 clang|*/clang) if test -n "$ac_tool_prefix"; then
4805 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4806set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808$as_echo_n "checking for $ac_word... " >&6; }
4809if ${ac_cv_path_CXX+:} false; then :
4810 $as_echo_n "(cached) " >&6
4811else
4812 case $CXX in
4813 [\\/]* | ?:[\\/]*)
4814 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4815 ;;
4816 *)
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818for as_dir in notfound
4819do
4820 IFS=$as_save_IFS
4821 test -z "$as_dir" && as_dir=.
4822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004824 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4826 break 2
4827 fi
4828done
4829 done
4830IFS=$as_save_IFS
4831
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832 ;;
4833esac
4834fi
4835CXX=$ac_cv_path_CXX
4836if test -n "$CXX"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4838$as_echo "$CXX" >&6; }
4839else
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
4842fi
4843
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844
4845fi
4846if test -z "$ac_cv_path_CXX"; then
4847 ac_pt_CXX=$CXX
4848 # Extract the first word of "clang++", so it can be a program name with args.
4849set dummy clang++; ac_word=$2
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851$as_echo_n "checking for $ac_word... " >&6; }
4852if ${ac_cv_path_ac_pt_CXX+:} false; then :
4853 $as_echo_n "(cached) " >&6
4854else
4855 case $ac_pt_CXX in
4856 [\\/]* | ?:[\\/]*)
4857 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4858 ;;
4859 *)
4860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861for as_dir in notfound
4862do
4863 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=.
4865 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869 break 2
4870 fi
4871done
4872 done
4873IFS=$as_save_IFS
4874
4875 ;;
4876esac
4877fi
4878ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4879if test -n "$ac_pt_CXX"; then
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4881$as_echo "$ac_pt_CXX" >&6; }
4882else
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4884$as_echo "no" >&6; }
4885fi
4886
4887 if test "x$ac_pt_CXX" = x; then
4888 CXX="clang++"
4889 else
4890 case $cross_compiling:$ac_tool_warned in
4891yes:)
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4894ac_tool_warned=yes ;;
4895esac
4896 CXX=$ac_pt_CXX
4897 fi
4898else
4899 CXX="$ac_cv_path_CXX"
4900fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004902 icc|*/icc) if test -n "$ac_tool_prefix"; then
4903 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4904set dummy ${ac_tool_prefix}icpc; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if ${ac_cv_path_CXX+:} false; then :
4908 $as_echo_n "(cached) " >&6
4909else
4910 case $CXX in
4911 [\\/]* | ?:[\\/]*)
4912 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4913 ;;
4914 *)
4915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in notfound
4917do
4918 IFS=$as_save_IFS
4919 test -z "$as_dir" && as_dir=.
4920 for ac_exec_ext in '' $ac_executable_extensions; do
4921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4922 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924 break 2
4925 fi
4926done
4927 done
4928IFS=$as_save_IFS
4929
4930 ;;
4931esac
4932fi
4933CXX=$ac_cv_path_CXX
4934if test -n "$CXX"; then
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4936$as_echo "$CXX" >&6; }
4937else
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942
4943fi
4944if test -z "$ac_cv_path_CXX"; then
4945 ac_pt_CXX=$CXX
4946 # Extract the first word of "icpc", so it can be a program name with args.
4947set dummy icpc; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if ${ac_cv_path_ac_pt_CXX+:} false; then :
4951 $as_echo_n "(cached) " >&6
4952else
4953 case $ac_pt_CXX in
4954 [\\/]* | ?:[\\/]*)
4955 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4956 ;;
4957 *)
4958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in notfound
4960do
4961 IFS=$as_save_IFS
4962 test -z "$as_dir" && as_dir=.
4963 for ac_exec_ext in '' $ac_executable_extensions; do
4964 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969done
4970 done
4971IFS=$as_save_IFS
4972
4973 ;;
4974esac
4975fi
4976ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4977if test -n "$ac_pt_CXX"; then
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4979$as_echo "$ac_pt_CXX" >&6; }
4980else
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985 if test "x$ac_pt_CXX" = x; then
4986 CXX="icpc"
4987 else
4988 case $cross_compiling:$ac_tool_warned in
4989yes:)
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4992ac_tool_warned=yes ;;
4993esac
4994 CXX=$ac_pt_CXX
4995 fi
4996else
4997 CXX="$ac_cv_path_CXX"
4998fi
4999 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005000 esac
5001 if test "$CXX" = "notfound"
5002 then
5003 CXX=""
5004 fi
5005fi
5006if test -z "$CXX"
5007then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005008 if test -n "$ac_tool_prefix"; then
5009 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5010 do
5011 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005015if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005017else
5018 if test -n "$CXX"; then
5019 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5020else
5021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024 IFS=$as_save_IFS
5025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005030 break 2
5031 fi
5032done
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005035
5036fi
5037fi
5038CXX=$ac_cv_prog_CXX
5039if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5041$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042else
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045fi
5046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005048 test -n "$CXX" && break
5049 done
5050fi
5051if test -z "$CXX"; then
5052 ac_ct_CXX=$CXX
5053 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5054do
5055 # Extract the first word of "$ac_prog", so it can be a program name with args.
5056set dummy $ac_prog; ac_word=$2
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058$as_echo_n "checking for $ac_word... " >&6; }
5059if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5060 $as_echo_n "(cached) " >&6
5061else
5062 if test -n "$ac_ct_CXX"; then
5063 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5064else
5065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
5070 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005072 ac_cv_prog_ac_ct_CXX="$ac_prog"
5073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5074 break 2
5075 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005077 done
5078IFS=$as_save_IFS
5079
5080fi
5081fi
5082ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5083if test -n "$ac_ct_CXX"; then
5084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5085$as_echo "$ac_ct_CXX" >&6; }
5086else
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088$as_echo "no" >&6; }
5089fi
5090
5091
5092 test -n "$ac_ct_CXX" && break
5093done
5094
5095 if test "x$ac_ct_CXX" = x; then
5096 CXX="notfound"
5097 else
5098 case $cross_compiling:$ac_tool_warned in
5099yes:)
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5102ac_tool_warned=yes ;;
5103esac
5104 CXX=$ac_ct_CXX
5105 fi
5106fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107
5108 if test "$CXX" = "notfound"
5109 then
5110 CXX=""
5111 fi
5112fi
5113if test "$preset_cxx" != "$CXX"
5114then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005115 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116
5117 By default, distutils will build C++ extension modules with \"$CXX\".
5118 If this is not intended, then set CXX on the configure command line.
5119 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005120$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122 By default, distutils will build C++ extension modules with \"$CXX\".
5123 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005124 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125fi
5126
5127
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005128MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5129
5130
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5132$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5133cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005134#undef bfin
5135#undef cris
5136#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005137#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005138#undef hppa
5139#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005142#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005143#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005145#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005146 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005147#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148# if defined(__x86_64__) && defined(__LP64__)
5149 x86_64-linux-gnu
5150# elif defined(__x86_64__) && defined(__ILP32__)
5151 x86_64-linux-gnux32
5152# elif defined(__i386__)
5153 i386-linux-gnu
5154# elif defined(__aarch64__) && defined(__AARCH64EL__)
5155# if defined(__ILP32__)
5156 aarch64_ilp32-linux-gnu
5157# else
5158 aarch64-linux-gnu
5159# endif
5160# elif defined(__aarch64__) && defined(__AARCH64EB__)
5161# if defined(__ILP32__)
5162 aarch64_be_ilp32-linux-gnu
5163# else
5164 aarch64_be-linux-gnu
5165# endif
5166# elif defined(__alpha__)
5167 alpha-linux-gnu
5168# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5169# if defined(__ARMEL__)
5170 arm-linux-gnueabihf
5171# else
5172 armeb-linux-gnueabihf
5173# endif
5174# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5175# if defined(__ARMEL__)
5176 arm-linux-gnueabi
5177# else
5178 armeb-linux-gnueabi
5179# endif
5180# elif defined(__hppa__)
5181 hppa-linux-gnu
5182# elif defined(__ia64__)
5183 ia64-linux-gnu
5184# elif defined(__m68k__) && !defined(__mcoldfire__)
5185 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005186# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5187# if _MIPS_SIM == _ABIO32
5188 mipsisa32r6el-linux-gnu
5189# elif _MIPS_SIM == _ABIN32
5190 mipsisa64r6el-linux-gnuabin32
5191# elif _MIPS_SIM == _ABI64
5192 mipsisa64r6el-linux-gnuabi64
5193# else
5194# error unknown platform triplet
5195# endif
5196# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5197# if _MIPS_SIM == _ABIO32
5198 mipsisa32r6-linux-gnu
5199# elif _MIPS_SIM == _ABIN32
5200 mipsisa64r6-linux-gnuabin32
5201# elif _MIPS_SIM == _ABI64
5202 mipsisa64r6-linux-gnuabi64
5203# else
5204# error unknown platform triplet
5205# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206# elif defined(__mips_hard_float) && defined(_MIPSEL)
5207# if _MIPS_SIM == _ABIO32
5208 mipsel-linux-gnu
5209# elif _MIPS_SIM == _ABIN32
5210 mips64el-linux-gnuabin32
5211# elif _MIPS_SIM == _ABI64
5212 mips64el-linux-gnuabi64
5213# else
5214# error unknown platform triplet
5215# endif
5216# elif defined(__mips_hard_float)
5217# if _MIPS_SIM == _ABIO32
5218 mips-linux-gnu
5219# elif _MIPS_SIM == _ABIN32
5220 mips64-linux-gnuabin32
5221# elif _MIPS_SIM == _ABI64
5222 mips64-linux-gnuabi64
5223# else
5224# error unknown platform triplet
5225# endif
5226# elif defined(__or1k__)
5227 or1k-linux-gnu
5228# elif defined(__powerpc__) && defined(__SPE__)
5229 powerpc-linux-gnuspe
5230# elif defined(__powerpc64__)
5231# if defined(__LITTLE_ENDIAN__)
5232 powerpc64le-linux-gnu
5233# else
5234 powerpc64-linux-gnu
5235# endif
5236# elif defined(__powerpc__)
5237 powerpc-linux-gnu
5238# elif defined(__s390x__)
5239 s390x-linux-gnu
5240# elif defined(__s390__)
5241 s390-linux-gnu
5242# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5243 sh4-linux-gnu
5244# elif defined(__sparc__) && defined(__arch64__)
5245 sparc64-linux-gnu
5246# elif defined(__sparc__)
5247 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005248# elif defined(__riscv)
5249# if __riscv_xlen == 32
5250 riscv32-linux-gnu
5251# elif __riscv_xlen == 64
5252 riscv64-linux-gnu
5253# else
5254# error unknown platform triplet
5255# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005256# else
5257# error unknown platform triplet
5258# endif
5259#elif defined(__FreeBSD_kernel__)
5260# if defined(__LP64__)
5261 x86_64-kfreebsd-gnu
5262# elif defined(__i386__)
5263 i386-kfreebsd-gnu
5264# else
5265# error unknown platform triplet
5266# endif
5267#elif defined(__gnu_hurd__)
5268 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005269#elif defined(__APPLE__)
5270 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005271#else
5272# error unknown platform triplet
5273#endif
5274
5275EOF
5276
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005277if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005278 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5280$as_echo "$PLATFORM_TRIPLET" >&6; }
5281else
5282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5283$as_echo "none" >&6; }
5284fi
5285rm -f conftest.c conftest.out
5286
5287if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5288 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5289 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5290 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005291elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5292 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294
doko@ubuntu.com55532312016-06-14 08:55:19 +02005295if test x$MULTIARCH != x; then
5296 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5297fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298
5299
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5301$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5302save_LDFLAGS="$LDFLAGS"
5303LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005304
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5306/* end confdefs.h. */
5307
5308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_link "$LINENO"; then :
5317 NO_AS_NEEDED="-Wl,--no-as-needed"
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5319$as_echo "yes" >&6; }
5320else
5321 NO_AS_NEEDED=""
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324fi
5325rm -f core conftest.err conftest.$ac_objext \
5326 conftest$ac_exeext conftest.$ac_ext
5327LDFLAGS="$save_LDFLAGS"
5328
5329
5330
5331# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005332
Matthias Kloseb9621712010-04-24 17:59:49 +00005333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5334$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005335if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005337else
5338 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5339 then ac_cv_path_EGREP="$GREP -E"
5340 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005342 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 # Loop through the user's path and test for each of PROGNAME-LIST
5344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005345for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5346do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 for ac_prog in egrep; do
5350 for ac_exec_ext in '' $ac_executable_extensions; do
5351 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005352 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005353# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 # Check for GNU $ac_path_EGREP
5355case `"$ac_path_EGREP" --version 2>&1` in
5356*GNU*)
5357 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5358*)
5359 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 while :
5362 do
5363 cat "conftest.in" "conftest.in" >"conftest.tmp"
5364 mv "conftest.tmp" "conftest.in"
5365 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005367 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5368 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5371 # Best one so far, save it but keep looking for a better one
5372 ac_cv_path_EGREP="$ac_path_EGREP"
5373 ac_path_EGREP_max=$ac_count
5374 fi
5375 # 10*(2^10) chars as input seems more than enough
5376 test $ac_count -gt 10 && break
5377 done
5378 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5379esac
5380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $ac_path_EGREP_found && break 3
5382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005387 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 +00005388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389else
5390 ac_cv_path_EGREP=$EGREP
5391fi
5392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 fi
5394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5396$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005398
5399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5401$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005402if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $as_echo_n "(cached) " >&6
5404else
5405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005406/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005407#include <stdlib.h>
5408#include <stdarg.h>
5409#include <string.h>
5410#include <float.h>
5411
5412int
5413main ()
5414{
5415
5416 ;
5417 return 0;
5418}
5419_ACEOF
5420if ac_fn_c_try_compile "$LINENO"; then :
5421 ac_cv_header_stdc=yes
5422else
5423 ac_cv_header_stdc=no
5424fi
5425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5426
5427if test $ac_cv_header_stdc = yes; then
5428 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430/* end confdefs.h. */
5431#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005432
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005433_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437else
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005439fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005440rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442fi
5443
5444if test $ac_cv_header_stdc = yes; then
5445 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447/* end confdefs.h. */
5448#include <stdlib.h>
5449
5450_ACEOF
5451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5452 $EGREP "free" >/dev/null 2>&1; then :
5453
5454else
5455 ac_cv_header_stdc=no
5456fi
5457rm -f conftest*
5458
5459fi
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5463 if test "$cross_compiling" = yes; then :
5464 :
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467/* end confdefs.h. */
5468#include <ctype.h>
5469#include <stdlib.h>
5470#if ((' ' & 0x0FF) == 0x020)
5471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5473#else
5474# define ISLOWER(c) \
5475 (('a' <= (c) && (c) <= 'i') \
5476 || ('j' <= (c) && (c) <= 'r') \
5477 || ('s' <= (c) && (c) <= 'z'))
5478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5479#endif
5480
5481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5482int
5483main ()
5484{
5485 int i;
5486 for (i = 0; i < 256; i++)
5487 if (XOR (islower (i), ISLOWER (i))
5488 || toupper (i) != TOUPPER (i))
5489 return 2;
5490 return 0;
5491}
5492_ACEOF
5493if ac_fn_c_try_run "$LINENO"; then :
5494
5495else
5496 ac_cv_header_stdc=no
5497fi
5498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5499 conftest.$ac_objext conftest.beam conftest.$ac_ext
5500fi
5501
5502fi
5503fi
5504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5505$as_echo "$ac_cv_header_stdc" >&6; }
5506if test $ac_cv_header_stdc = yes; then
5507
5508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5509
5510fi
5511
5512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5514 inttypes.h stdint.h unistd.h
5515do :
5516 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5517ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5518"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005520 cat >>confdefs.h <<_ACEOF
5521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5522_ACEOF
5523
5524fi
5525
5526done
5527
5528
5529
5530 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 +02005531if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 MINIX=yes
5533else
5534 MINIX=
5535fi
5536
5537
5538 if test "$MINIX" = yes; then
5539
5540$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5541
5542
5543$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5544
5545
5546$as_echo "#define _MINIX 1" >>confdefs.h
5547
5548 fi
5549
5550
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5552$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005553if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 $as_echo_n "(cached) " >&6
5555else
5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557/* end confdefs.h. */
5558
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005559# define __EXTENSIONS__ 1
5560 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005561int
5562main ()
5563{
5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"; then :
5570 ac_cv_safe_to_define___extensions__=yes
5571else
5572 ac_cv_safe_to_define___extensions__=no
5573fi
5574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575fi
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5577$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5578 test $ac_cv_safe_to_define___extensions__ = yes &&
5579 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5580
5581 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5582
5583 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5584
5585 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5586
5587 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5588
5589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Xavier de Gaye95750b12016-07-09 11:05:42 +02005591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5592$as_echo_n "checking for the Android API level... " >&6; }
5593cat >> conftest.c <<EOF
5594#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005595android_api = __ANDROID_API__
5596arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005597#else
5598#error not Android
5599#endif
5600EOF
5601
5602if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005603 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5604 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5606$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005607 if test -z "$ANDROID_API_LEVEL"; then
5608 echo 'Fatal: you must define __ANDROID_API__'
5609 exit 1
5610 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005611
5612cat >>confdefs.h <<_ACEOF
5613#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5614_ACEOF
5615
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005616
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5618$as_echo_n "checking for the Android arm ABI... " >&6; }
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5620$as_echo "$_arm_arch" >&6; }
5621 if test "$_arm_arch" = 7; then
5622 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5623 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5624 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625else
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5627$as_echo "not Android" >&6; }
5628fi
5629rm -f conftest.c conftest.out
5630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631# Check for unsupported systems
5632case $ac_sys_system/$ac_sys_release in
5633atheos*|Linux*/1*)
5634 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5635 echo See README for details.
5636 exit 1;;
5637esac
5638
5639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5641$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
5643# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005644if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645 withval=$with_suffix;
5646 case $withval in
5647 no) EXEEXT=;;
5648 yes) EXEEXT=.exe;;
5649 *) EXEEXT=$withval;;
5650 esac
5651fi
5652
Matthias Kloseb9621712010-04-24 17:59:49 +00005653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5654$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655
5656# Test whether we're running on a non-case-sensitive system, in which
5657# case we give a warning if no ext is given
5658
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5660$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661if test ! -d CaseSensitiveTestDir; then
5662mkdir CaseSensitiveTestDir
5663fi
5664
5665if test -d casesensitivetestdir
5666then
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5668$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 BUILDEXEEXT=.exe
5670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 BUILDEXEEXT=$EXEEXT
5674fi
5675rmdir CaseSensitiveTestDir
5676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677case $ac_sys_system in
5678hp*|HP*)
5679 case $CC in
5680 cc|*/cc) CC="$CC -Ae";;
5681 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682esac
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5686$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test -z "$LIBRARY"
5688then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005689 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5692$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# LDLIBRARY is the name of the library to link against (as opposed to the
5695# name of the library into which to insert object files). BLDLIBRARY is also
5696# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5697# is blank as the main program is not linked directly against LDLIBRARY.
5698# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5699# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5700# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5701# DLLLIBRARY is the shared (i.e., DLL) library.
5702#
5703# RUNSHARED is used to run shared python without installed libraries
5704#
5705# INSTSONAME is the name of the shared library that will be use to install
5706# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005707#
5708# LDVERSION is the shared library version number, normally the Python version
5709# with the ABI build flags appended.
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712
5713
5714
5715
5716
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718LDLIBRARY="$LIBRARY"
5719BLDLIBRARY='$(LDLIBRARY)'
5720INSTSONAME='$(LDLIBRARY)'
5721DLLLIBRARY=''
5722LDLIBRARYDIR=''
5723RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005724LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# LINKCC is the command that links the python executable -- default is $(CC).
5727# If CXX is set, and if it is needed to link a main function that was
5728# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5729# python might then depend on the C++ runtime
5730# This is altered for AIX in order to build the export list before
5731# linking.
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5734$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test -z "$LINKCC"
5736then
5737 LINKCC='$(PURIFY) $(MAINCC)'
5738 case $ac_sys_system in
5739 AIX*)
5740 exp_extra="\"\""
5741 if test $ac_sys_release -ge 5 -o \
5742 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5743 exp_extra="."
5744 fi
5745 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 QNX*)
5747 # qcc must be used because the other compilers do not
5748 # support -N.
5749 LINKCC=qcc;;
5750 esac
5751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5753$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5756# make sure we default having it set to "no": this is used by
5757# distutils.unixccompiler to know if it should add --enable-new-dtags
5758# to linker command lines, and failing to detect GNU ld simply results
5759# in the same bahaviour as before.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5762$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763ac_prog=ld
5764if test "$GCC" = yes; then
5765 ac_prog=`$CC -print-prog-name=ld`
5766fi
5767case `"$ac_prog" -V 2>&1 < /dev/null` in
5768 *GNU*)
5769 GNULD=yes;;
5770 *)
5771 GNULD=no;;
5772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5774$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5777$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005779if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 enableval=$enable_shared;
5781fi
5782
5783
5784if test -z "$enable_shared"
5785then
5786 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005787 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 enable_shared="yes";;
5789 *)
5790 enable_shared="no";;
5791 esac
5792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5794$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5797$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005799if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005800 enableval=$enable_profiling;
5801fi
5802
5803if test "x$enable_profiling" = xyes; then
5804 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005805 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807/* end confdefs.h. */
5808int main() { return 0; }
5809_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005810if ac_fn_c_try_link "$LINENO"; then :
5811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005813 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005815rm -f core conftest.err conftest.$ac_objext \
5816 conftest$ac_exeext conftest.$ac_ext
5817 CC="$ac_save_cc"
5818else
5819 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5822$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
doko@ubuntu.comba015832012-06-30 16:52:05 +02005824if test "x$enable_profiling" = xyes; then
5825 BASECFLAGS="-pg $BASECFLAGS"
5826 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
5828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5830$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
5832# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5833# library that we build, but we do not want to link against it (we
5834# will find it with a -framework option). For this reason there is an
5835# extra variable BLDLIBRARY against which Python and the extension
5836# modules are linked, BLDLIBRARY. This is normally the same as
5837# LDLIBRARY, but empty for MacOSX framework builds.
5838if test "$enable_framework"
5839then
5840 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005841 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842 BLDLIBRARY=''
5843else
5844 BLDLIBRARY='$(LDLIBRARY)'
5845fi
5846
5847# Other platforms follow
5848if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005849 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
5853 case $ac_sys_system in
5854 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005855 LDLIBRARY='libpython$(LDVERSION).dll.a'
5856 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 ;;
5858 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005859 LDLIBRARY='libpython$(LDVERSION).so'
5860 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005861 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005863 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005864 then
5865 PY3LIBRARY=libpython3.so
5866 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005868 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005869 LDLIBRARY='libpython$(LDVERSION).so'
5870 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005871 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005873 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005874 then
5875 PY3LIBRARY=libpython3.so
5876 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 ;;
5878 hp*|HP*)
5879 case `uname -m` in
5880 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005881 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 ;;
5883 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005884 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005887 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005891 LDLIBRARY='libpython$(LDVERSION).dylib'
5892 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005893 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005895 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005898 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
5900 esac
5901else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005902 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 case $ac_sys_system in
5904 CYGWIN*)
5905 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 esac
5909fi
5910
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005911if test "$cross_compiling" = yes; then
5912 RUNSHARED=
5913fi
5914
Matthias Kloseb9621712010-04-24 17:59:49 +00005915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5916$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005919if test -n "$ac_tool_prefix"; then
5920 for ac_prog in ar aal
5921 do
5922 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5923set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5925$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005926if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928else
5929 if test -n "$AR"; then
5930 ac_cv_prog_AR="$AR" # Let the user override the test.
5931else
5932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935 IFS=$as_save_IFS
5936 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005937 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005939 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 break 2
5942 fi
5943done
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945IFS=$as_save_IFS
5946
5947fi
5948fi
5949AR=$ac_cv_prog_AR
5950if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5952$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953else
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5955$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956fi
5957
5958
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005959 test -n "$AR" && break
5960 done
5961fi
5962if test -z "$AR"; then
5963 ac_ct_AR=$AR
5964 for ac_prog in ar aal
5965do
5966 # Extract the first word of "$ac_prog", so it can be a program name with args.
5967set dummy $ac_prog; ac_word=$2
5968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969$as_echo_n "checking for $ac_word... " >&6; }
5970if ${ac_cv_prog_ac_ct_AR+:} false; then :
5971 $as_echo_n "(cached) " >&6
5972else
5973 if test -n "$ac_ct_AR"; then
5974 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5975else
5976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977for as_dir in $PATH
5978do
5979 IFS=$as_save_IFS
5980 test -z "$as_dir" && as_dir=.
5981 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005983 ac_cv_prog_ac_ct_AR="$ac_prog"
5984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985 break 2
5986 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005988 done
5989IFS=$as_save_IFS
5990
5991fi
5992fi
5993ac_ct_AR=$ac_cv_prog_ac_ct_AR
5994if test -n "$ac_ct_AR"; then
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5996$as_echo "$ac_ct_AR" >&6; }
5997else
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
6000fi
6001
6002
6003 test -n "$ac_ct_AR" && break
6004done
6005
6006 if test "x$ac_ct_AR" = x; then
6007 AR="ar"
6008 else
6009 case $cross_compiling:$ac_tool_warned in
6010yes:)
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6013ac_tool_warned=yes ;;
6014esac
6015 AR=$ac_ct_AR
6016 fi
6017fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
6019
6020# tweak ARFLAGS only if the user didn't set it on the command line
6021
6022if test -z "$ARFLAGS"
6023then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006024 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025fi
6026
doko@ubuntu.com58844492012-06-30 18:25:32 +02006027if test -n "$ac_tool_prefix"; then
6028 for ac_prog in readelf
6029 do
6030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_prog_READELF+:} false; then :
6035 $as_echo_n "(cached) " >&6
6036else
6037 if test -n "$READELF"; then
6038 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6039else
6040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043 IFS=$as_save_IFS
6044 test -z "$as_dir" && as_dir=.
6045 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006047 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049 break 2
6050 fi
6051done
6052 done
6053IFS=$as_save_IFS
6054
6055fi
6056fi
6057READELF=$ac_cv_prog_READELF
6058if test -n "$READELF"; then
6059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6060$as_echo "$READELF" >&6; }
6061else
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067 test -n "$READELF" && break
6068 done
6069fi
6070if test -z "$READELF"; then
6071 ac_ct_READELF=$READELF
6072 for ac_prog in readelf
6073do
6074 # Extract the first word of "$ac_prog", so it can be a program name with args.
6075set dummy $ac_prog; ac_word=$2
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6077$as_echo_n "checking for $ac_word... " >&6; }
6078if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080else
6081 if test -n "$ac_ct_READELF"; then
6082 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6083else
6084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087 IFS=$as_save_IFS
6088 test -z "$as_dir" && as_dir=.
6089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006091 ac_cv_prog_ac_ct_READELF="$ac_prog"
6092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6093 break 2
6094 fi
6095done
6096 done
6097IFS=$as_save_IFS
6098
6099fi
6100fi
6101ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6102if test -n "$ac_ct_READELF"; then
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6104$as_echo "$ac_ct_READELF" >&6; }
6105else
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6107$as_echo "no" >&6; }
6108fi
6109
6110
6111 test -n "$ac_ct_READELF" && break
6112done
6113
6114 if test "x$ac_ct_READELF" = x; then
6115 READELF=":"
6116 else
6117 case $cross_compiling:$ac_tool_warned in
6118yes:)
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6121ac_tool_warned=yes ;;
6122esac
6123 READELF=$ac_ct_READELF
6124 fi
6125fi
6126
6127if test "$cross_compiling" = yes; then
6128 case "$READELF" in
6129 readelf|:)
6130 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6131 ;;
6132 esac
6133fi
6134
6135
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006138hp*|HP*)
6139 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140 if test -z "$INSTALL"
6141 then
6142 INSTALL="${srcdir}/install-sh -c"
6143 fi
6144esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145# Find a good install program. We prefer a C program (faster),
6146# so one script is as good as another. But avoid the broken or
6147# incompatible versions:
6148# SysV /etc/install, /usr/sbin/install
6149# SunOS /usr/etc/install
6150# IRIX /sbin/install
6151# AIX /bin/install
6152# AmigaOS /C/install, which installs bootblocks on floppy discs
6153# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6154# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6155# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6156# OS/2's system install, which has a completely different semantic
6157# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006158# Reject install programs that cannot install multiple files.
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6160$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006162if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164else
6165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 # Account for people who put trailing slashes in PATH elements.
6171case $as_dir/ in #((
6172 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 /usr/ucb/* ) ;;
6176 *)
6177 # OSF1 and SCO ODT 3.0 have their own names for install.
6178 # Don't use installbsd from OSF since it installs stuff as root
6179 # by default.
6180 for ac_prog in ginstall scoinst install; do
6181 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006182 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 if test $ac_prog = install &&
6184 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6185 # AIX install. It has an incompatible calling convention.
6186 :
6187 elif test $ac_prog = install &&
6188 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6189 # program-specific install script used by HP pwplus--don't use.
6190 :
6191 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 rm -rf conftest.one conftest.two conftest.dir
6193 echo one > conftest.one
6194 echo two > conftest.two
6195 mkdir conftest.dir
6196 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6197 test -s conftest.one && test -s conftest.two &&
6198 test -s conftest.dir/conftest.one &&
6199 test -s conftest.dir/conftest.two
6200 then
6201 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6202 break 3
6203 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 fi
6205 fi
6206 done
6207 done
6208 ;;
6209esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006210
6211 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212IFS=$as_save_IFS
6213
Matthias Kloseb9621712010-04-24 17:59:49 +00006214rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215
6216fi
6217 if test "${ac_cv_path_install+set}" = set; then
6218 INSTALL=$ac_cv_path_install
6219 else
6220 # As a last resort, use the slow shell script. Don't cache a
6221 # value for INSTALL within a source directory, because that will
6222 # break other packages using the cache if that directory is
6223 # removed, or if the value is a relative name.
6224 INSTALL=$ac_install_sh
6225 fi
6226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6228$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229
6230# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6231# It thinks the first close brace ends the variable substitution.
6232test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6233
6234test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6235
6236test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6237
Matthias Klose93a0ef12012-03-15 18:08:34 +01006238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6239$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6240if test -z "$MKDIR_P"; then
6241 if ${ac_cv_path_mkdir+:} false; then :
6242 $as_echo_n "(cached) " >&6
6243else
6244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6246do
6247 IFS=$as_save_IFS
6248 test -z "$as_dir" && as_dir=.
6249 for ac_prog in mkdir gmkdir; do
6250 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006251 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006252 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6253 'mkdir (GNU coreutils) '* | \
6254 'mkdir (coreutils) '* | \
6255 'mkdir (fileutils) '4.1*)
6256 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6257 break 3;;
6258 esac
6259 done
6260 done
6261 done
6262IFS=$as_save_IFS
6263
6264fi
6265
6266 test -d ./--version && rmdir ./--version
6267 if test "${ac_cv_path_mkdir+set}" = set; then
6268 MKDIR_P="$ac_cv_path_mkdir -p"
6269 else
6270 # As a last resort, use the slow shell script. Don't cache a
6271 # value for MKDIR_P within a source directory, because that will
6272 # break other packages using the cache if that directory is
6273 # removed, or if the value is a relative name.
6274 MKDIR_P="$ac_install_sh -d"
6275 fi
6276fi
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6278$as_echo "$MKDIR_P" >&6; }
6279
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280
6281# Not every filesystem supports hard links
6282
6283if test -z "$LN" ; then
6284 case $ac_sys_system in
6285 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286 *) LN=ln;;
6287 esac
6288fi
6289
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006290# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006291
6292ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6296$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297
6298# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006299if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300 withval=$with_pydebug;
6301if test "$withval" != no
6302then
6303
Matthias Kloseb9621712010-04-24 17:59:49 +00006304$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6307$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006309 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006310else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312fi
6313else
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316fi
6317
6318
T. Woutersddbfa2c2017-05-23 01:30:49 +02006319# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6320# the ABI. This allows enabling assertions without changing the ABI.
6321assertions='false'
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6323$as_echo_n "checking for --with-assertions... " >&6; }
6324
6325# Check whether --with-assertions was given.
6326if test "${with_assertions+set}" = set; then :
6327 withval=$with_assertions;
6328if test "$withval" != no
6329then
6330 assertions='true'
6331fi
6332fi
6333
6334if test "$assertions" = 'true'; then
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6336$as_echo "yes" >&6; }
6337elif test "$Py_DEBUG" = 'true'; then
6338 assertions='true'
6339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6340$as_echo "implied by --with-pydebug" >&6; }
6341else
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343$as_echo "no" >&6; }
6344fi
6345
Brett Cannon63d98bc2016-09-06 17:12:40 -07006346# Enable optimization flags
6347
6348
6349Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6351$as_echo_n "checking for --enable-optimizations... " >&6; }
6352# Check whether --enable-optimizations was given.
6353if test "${enable_optimizations+set}" = set; then :
6354 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006355if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006356then
6357 Py_OPT='true'
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6359$as_echo "yes" >&6; };
6360else
6361 Py_OPT='false'
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; };
6364fi
6365else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }
6368fi
6369
6370if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006371 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6372 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006373 # 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 +00006374 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006375 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006376 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006377 DEF_MAKE_RULE="build_all"
6378else
6379 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006380 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006381 DEF_MAKE_RULE="all"
6382fi
6383
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006384# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6386$as_echo_n "checking for --with-lto... " >&6; }
6387
6388# Check whether --with-lto was given.
6389if test "${with_lto+set}" = set; then :
6390 withval=$with_lto;
6391if test "$withval" != no
6392then
6393 Py_LTO='true'
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6395$as_echo "yes" >&6; };
6396else
6397 Py_LTO='false'
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; };
6400fi
6401else
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; }
6404fi
6405
6406if test "$Py_LTO" = 'true' ; then
6407 case $CC in
6408 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006409 case $ac_sys_system in
6410 Darwin*)
6411 # Any changes made here should be reflected in the GCC+Darwin case below
6412 LTOFLAGS="-flto -Wl,-export_dynamic"
6413 ;;
6414 *)
6415 LTOFLAGS="-flto"
6416 ;;
6417 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006418 ;;
6419 *gcc*)
6420 case $ac_sys_system in
6421 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006422 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006423 ;;
6424 *)
6425 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6426 ;;
6427 esac
6428 ;;
6429 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006430
6431 if test "$ac_cv_prog_cc_g" = "yes"
6432 then
6433 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6434 # to get debug symbols.
6435 LTOFLAGS="$LTOFLAGS -g"
6436 fi
6437
octaviansoldea4c814012017-09-08 12:14:33 -07006438 CFLAGS="$CFLAGS $LTOFLAGS"
6439 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006440fi
6441
Brett Cannon7188a3e2015-09-18 15:13:44 -07006442# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006443
6444
6445
6446
6447
Gregory P. Smith799520c2016-09-07 16:10:00 -07006448# Make this work on systems where llvm tools are not installed with their
6449# normal names in the default $PATH (ie: Ubuntu). They exist under the
6450# non-suffixed name in their versioned llvm directory.
6451llvm_bin_dir=''
6452llvm_path="${PATH}"
6453if test "${CC}" = "clang"
6454then
6455 clang_bin=`which clang`
6456 # Some systems install clang elsewhere as a symlink to the real path
6457 # which is where the related llvm tools are located.
6458 if test -L "${clang_bin}"
6459 then
6460 clang_dir=`dirname "${clang_bin}"`
6461 clang_bin=`readlink "${clang_bin}"`
6462 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6463 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6464 fi
6465fi
Zachary Ware5af85642015-12-21 12:09:17 -06006466
Gregory P. Smith799520c2016-09-07 16:10:00 -07006467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6468$as_echo_n "checking target system type... " >&6; }
6469if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006470 $as_echo_n "(cached) " >&6
6471else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006472 if test "x$target_alias" = x; then
6473 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006474else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006475 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6476 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6477fi
6478
6479fi
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6481$as_echo "$ac_cv_target" >&6; }
6482case $ac_cv_target in
6483*-*-*) ;;
6484*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6485esac
6486target=$ac_cv_target
6487ac_save_IFS=$IFS; IFS='-'
6488set x $ac_cv_target
6489shift
6490target_cpu=$1
6491target_vendor=$2
6492shift; shift
6493# Remember, the first character of IFS is used to create $*,
6494# except with old shells:
6495target_os=$*
6496IFS=$ac_save_IFS
6497case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6498
6499
6500# The aliases save the names the user supplied, while $host etc.
6501# will get canonicalized.
6502test -n "$target_alias" &&
6503 test "$program_prefix$program_suffix$program_transform_name" = \
6504 NONENONEs,x,x, &&
6505 program_prefix=${target_alias}-
6506# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6507set dummy $target_alias-llvm-profdata; ac_word=$2
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6509$as_echo_n "checking for $ac_word... " >&6; }
6510if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6511 $as_echo_n "(cached) " >&6
6512else
6513 case $LLVM_PROFDATA in
6514 [\\/]* | ?:[\\/]*)
6515 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6516 ;;
6517 *)
6518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6519for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006520do
6521 IFS=$as_save_IFS
6522 test -z "$as_dir" && as_dir=.
6523 for ac_exec_ext in '' $ac_executable_extensions; do
6524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006525 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6527 break 2
6528 fi
6529done
6530 done
6531IFS=$as_save_IFS
6532
Gregory P. Smith799520c2016-09-07 16:10:00 -07006533 ;;
6534esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006535fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006536LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6537if test -n "$LLVM_PROFDATA"; then
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6539$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006540else
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6542$as_echo "no" >&6; }
6543fi
6544
6545
Gregory P. Smith799520c2016-09-07 16:10:00 -07006546if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6547 if test "$build" = "$target"; then
6548 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6549 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6550set dummy llvm-profdata; ac_word=$2
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552$as_echo_n "checking for $ac_word... " >&6; }
6553if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6554 $as_echo_n "(cached) " >&6
6555else
6556 case $ac_pt_LLVM_PROFDATA in
6557 [\\/]* | ?:[\\/]*)
6558 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6559 ;;
6560 *)
6561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in ${llvm_path}
6563do
6564 IFS=$as_save_IFS
6565 test -z "$as_dir" && as_dir=.
6566 for ac_exec_ext in '' $ac_executable_extensions; do
6567 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570 break 2
6571 fi
6572done
6573 done
6574IFS=$as_save_IFS
6575
6576 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6577 ;;
6578esac
6579fi
6580ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6581if test -n "$ac_pt_LLVM_PROFDATA"; then
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6583$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6584else
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6590 else
6591 LLVM_PROFDATA="''"
6592 fi
6593else
6594 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6595fi
6596
6597
6598if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6599then
6600 LLVM_PROF_FOUND="found"
6601else
6602 LLVM_PROF_FOUND="not-found"
6603fi
6604if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6605then
6606 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6607 if test -n "${found_llvm_profdata}"
6608 then
6609 # llvm-profdata isn't directly in $PATH in some cases.
6610 # https://apple.stackexchange.com/questions/197053/
6611 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6612 LLVM_PROF_FOUND=found
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6614$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6615 fi
6616fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006617LLVM_PROF_ERR=no
6618case $CC in
6619 *clang*)
6620 # Any changes made here should be reflected in the GCC+Darwin case below
6621 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6622 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006623 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006624 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6625 if test $LLVM_PROF_FOUND = not-found
6626 then
6627 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006628 if test "${REQUIRE_PGO}" = "yes"
6629 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006630 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 -07006631 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632 fi
6633 ;;
6634 *gcc*)
6635 case $ac_sys_system in
6636 Darwin*)
6637 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6638 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006639 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 then
6643 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006644 if test "${REQUIRE_PGO}" = "yes"
6645 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006646 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 -07006647 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 fi
6649 ;;
6650 *)
6651 PGO_PROF_GEN_FLAG="-fprofile-generate"
6652 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6653 LLVM_PROF_MERGER="true"
6654 LLVM_PROF_FILE=""
6655 ;;
6656 esac
6657 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006658 *icc*)
6659 PGO_PROF_GEN_FLAG="-prof-gen"
6660 PGO_PROF_USE_FLAG="-prof-use"
6661 LLVM_PROF_MERGER="true"
6662 LLVM_PROF_FILE=""
6663 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006664esac
6665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6667# merged with this chunk of code?
6668
6669# Optimizer/debugger flags
6670# ------------------------
6671# (The following bit of code is complicated enough - please keep things
6672# indented properly. Just pretend you're editing Python code. ;-)
6673
6674# There are two parallel sets of case statements below, one that checks to
6675# see if OPT was set and one that does BASECFLAGS setting based upon
6676# compiler and platform. BASECFLAGS tweaks need to be made even if the
6677# user set OPT.
6678
6679# tweak OPT based on compiler and platform, only if the user didn't set
6680# it on the command line
6681
Victor Stinner9ed34a82017-05-02 22:35:58 +02006682
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006683if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684then
6685 case $GCC in
6686 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6688 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6689 WRAP="-fwrapv"
6690 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006691
Stefan Krahaf04ff22011-12-08 22:20:31 +01006692 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006693 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006694 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006695 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006696 *)
6697 if $CC --version 2>&1 | grep -q clang
6698 then
6699 cc_is_clang=1
6700 else
6701 cc_is_clang=
6702 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006703 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006704
Victor Stinner35f3d242017-04-21 12:35:24 +02006705 if test -n "${cc_is_clang}"
6706 then
6707 # Clang also needs -fwrapv
6708 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006709 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6710 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006711 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006712 fi
6713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714 case $ac_cv_prog_cc_g in
6715 yes)
6716 if test "$Py_DEBUG" = 'true' ; then
6717 # Optimization messes up debuggers, so turn it off for
6718 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006719 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006720 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006721 else
Victor Stinner28205b22017-04-21 11:24:34 +02006722 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006723 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724 else
Victor Stinner28205b22017-04-21 11:24:34 +02006725 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 fi
6727 ;;
6728 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006729 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730 ;;
6731 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 case $ac_sys_system in
6734 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6735 ;;
6736 esac
6737 ;;
6738
6739 *)
6740 OPT="-O"
6741 ;;
6742 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743fi
6744
6745
6746
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006748# The -arch flags for universal builds on OSX
6749UNIVERSAL_ARCH_FLAGS=
6750
6751
6752# tweak BASECFLAGS based on compiler and platform
6753case $GCC in
6754yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006755 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006756
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6758$as_echo_n "checking for -Wextra... " >&6; }
6759 ac_save_cc="$CC"
6760 CC="$CC -Wextra -Werror"
6761 if ${ac_cv_extra_warnings+:} false; then :
6762 $as_echo_n "(cached) " >&6
6763else
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765/* end confdefs.h. */
6766
6767
6768int
6769main ()
6770{
6771
6772 ;
6773 return 0;
6774}
6775
6776_ACEOF
6777if ac_fn_c_try_compile "$LINENO"; then :
6778
6779 ac_cv_extra_warnings=yes
6780
6781else
6782
6783 ac_cv_extra_warnings=no
6784
6785fi
6786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6787fi
6788
6789 CC="$ac_save_cc"
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6791$as_echo "$ac_cv_extra_warnings" >&6; }
6792
6793 if test $ac_cv_extra_warnings = yes
6794 then
6795 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6796 fi
6797
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006798 # Python doesn't violate C99 aliasing rules, but older versions of
6799 # GCC produce warnings for legal Python code. Enable
6800 # -fno-strict-aliasing on versions of GCC that support but produce
6801 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6803$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804 ac_save_cc="$CC"
6805 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006807 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006812
Matthias Kloseb159a552010-04-25 21:00:44 +00006813
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006814int
6815main ()
6816{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006817
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006818 ;
6819 return 0;
6820}
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006823if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006824
6825 CC="$ac_save_cc -fstrict-aliasing"
6826 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006828/* end confdefs.h. */
6829
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006830 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831int
6832main ()
6833{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006834double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006835 ;
6836 return 0;
6837}
Matthias Kloseb159a552010-04-25 21:00:44 +00006838
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006840if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006841
6842 ac_cv_no_strict_aliasing=no
6843
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006844else
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
6846 ac_cv_no_strict_aliasing=yes
6847
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006848fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006850
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006851else
Matthias Kloseb159a552010-04-25 21:00:44 +00006852
6853 ac_cv_no_strict_aliasing=no
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006857fi
6858
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6862$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006863 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864 then
6865 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6866 fi
6867
Zachary Ware5af85642015-12-21 12:09:17 -06006868 # ICC doesn't recognize the option, but only emits a warning
6869 ## XXX does it emit an unused result warning and can it be disabled?
6870 case "$CC" in
6871 *icc*)
6872 ac_cv_disable_unused_result_warning=no
6873 ;;
6874 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6876$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6877 ac_save_cc="$CC"
6878 CC="$CC -Wunused-result -Werror"
6879 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006880 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006881 $as_echo_n "(cached) " >&6
6882else
6883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6884/* end confdefs.h. */
6885
6886
6887int
6888main ()
6889{
6890
6891 ;
6892 return 0;
6893}
6894
6895_ACEOF
6896if ac_fn_c_try_compile "$LINENO"; then :
6897
6898 ac_cv_disable_unused_result_warning=yes
6899
6900else
6901
6902 ac_cv_disable_unused_result_warning=no
6903
6904fi
6905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6906fi
6907
6908 CFLAGS="$save_CFLAGS"
6909 CC="$ac_save_cc"
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6911$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006912 ;;
6913 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006914
6915 if test $ac_cv_disable_unused_result_warning = yes
6916 then
6917 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006918 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6919 fi
6920
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6922$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6923 ac_save_cc="$CC"
6924 CC="$CC -Wunused-parameter -Werror"
6925 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6926 $as_echo_n "(cached) " >&6
6927else
6928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929/* end confdefs.h. */
6930
6931
6932int
6933main ()
6934{
6935
6936 ;
6937 return 0;
6938}
6939
6940_ACEOF
6941if ac_fn_c_try_compile "$LINENO"; then :
6942
6943 ac_cv_disable_unused_parameter_warning=yes
6944
6945else
6946
6947 ac_cv_disable_unused_parameter_warning=no
6948
6949fi
6950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6951fi
6952
6953 CC="$ac_save_cc"
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6955$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6956
6957 if test $ac_cv_disable_unused_parameter_warning = yes
6958 then
6959 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6960 fi
6961
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6963$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6964 ac_save_cc="$CC"
6965 CC="$CC -Wmissing-field-initializers -Werror"
6966 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6967 $as_echo_n "(cached) " >&6
6968else
6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6970/* end confdefs.h. */
6971
6972
6973int
6974main ()
6975{
6976
6977 ;
6978 return 0;
6979}
6980
6981_ACEOF
6982if ac_fn_c_try_compile "$LINENO"; then :
6983
6984 ac_cv_disable_missing_field_initializers=yes
6985
6986else
6987
6988 ac_cv_disable_missing_field_initializers=no
6989
6990fi
6991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6992fi
6993
6994 CC="$ac_save_cc"
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
6996$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
6997
6998 if test $ac_cv_disable_missing_field_initializers = yes
6999 then
7000 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007001 fi
7002
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7004$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7005 ac_save_cc="$CC"
7006 CC="$CC -Wsign-compare"
7007 save_CFLAGS="$CFLAGS"
7008 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7009 $as_echo_n "(cached) " >&6
7010else
7011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7012/* end confdefs.h. */
7013
7014
7015int
7016main ()
7017{
7018
7019 ;
7020 return 0;
7021}
7022
7023_ACEOF
7024if ac_fn_c_try_compile "$LINENO"; then :
7025
7026 ac_cv_enable_sign_compare_warning=yes
7027
7028else
7029
7030 ac_cv_enable_sign_compare_warning=no
7031
7032fi
7033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7034fi
7035
7036 CFLAGS="$save_CFLAGS"
7037 CC="$ac_save_cc"
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7039$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7040
7041 if test $ac_cv_enable_sign_compare_warning = yes
7042 then
7043 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7044 fi
7045
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7047$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7048 ac_save_cc="$CC"
7049 CC="$CC -Wunreachable-code"
7050 save_CFLAGS="$CFLAGS"
7051 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7052 $as_echo_n "(cached) " >&6
7053else
7054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7055/* end confdefs.h. */
7056
7057
7058int
7059main ()
7060{
7061
7062 ;
7063 return 0;
7064}
7065
7066_ACEOF
7067if ac_fn_c_try_compile "$LINENO"; then :
7068
7069 ac_cv_enable_unreachable_code_warning=yes
7070
7071else
7072
7073 ac_cv_enable_unreachable_code_warning=no
7074
7075fi
7076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7077fi
7078
7079 CFLAGS="$save_CFLAGS"
7080 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007081
7082 # Don't enable unreachable code warning in debug mode, since it usually
7083 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007084 # Issue #24324: Unfortunately, the unreachable code warning does not work
7085 # correctly on gcc and has been silently removed from the compiler.
7086 # It is supported on clang but on OS X systems gcc may be an alias
7087 # for clang. Try to determine if the compiler is not really gcc and,
7088 # if so, only then enable the warning.
7089 if test $ac_cv_enable_unreachable_code_warning = yes && \
7090 test "$Py_DEBUG" != "true" && \
7091 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007092 then
7093 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007094 else
7095 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007096 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7098$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007099
INADA Naokie3364842018-06-05 20:40:53 +09007100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7101$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7102 ac_save_cc="$CC"
7103 CC="$CC -Werror -Wstrict-prototypes"
7104 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7105 $as_echo_n "(cached) " >&6
7106else
7107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7108/* end confdefs.h. */
7109
7110
7111int
7112main ()
7113{
7114
7115 ;
7116 return 0;
7117}
7118
7119_ACEOF
7120if ac_fn_c_try_compile "$LINENO"; then :
7121
7122 ac_cv_enable_strict_prototypes_warning=yes
7123
7124else
7125
7126 ac_cv_enable_strict_prototypes_warning=no
7127
7128fi
7129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7130fi
7131
7132 CC="$ac_save_cc"
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7134$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7135
7136 if test $ac_cv_enable_strict_prototypes_warning = yes
7137 then
7138 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7139 fi
7140
Victor Stinner193ee0a2017-02-06 14:24:00 +01007141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7142$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7143 ac_save_cc="$CC"
7144 CC="$CC -Werror=implicit-function-declaration"
7145 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7146 $as_echo_n "(cached) " >&6
7147else
7148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7149/* end confdefs.h. */
7150
7151
7152int
7153main ()
7154{
7155
7156 ;
7157 return 0;
7158}
7159
7160_ACEOF
7161if ac_fn_c_try_compile "$LINENO"; then :
7162
7163 ac_cv_enable_implicit_function_declaration_error=yes
7164
7165else
7166
7167 ac_cv_enable_implicit_function_declaration_error=no
7168
7169fi
7170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7171fi
7172
7173 CC="$ac_save_cc"
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7175$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7176
7177 if test $ac_cv_enable_implicit_function_declaration_error = yes
7178 then
7179 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7180 fi
7181
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7183 # support. Without this, treatment of subnormals doesn't follow
7184 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007185 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007186 alpha*)
7187 BASECFLAGS="$BASECFLAGS -mieee"
7188 ;;
7189 esac
7190
7191 case $ac_sys_system in
7192 SCO_SV*)
7193 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7194 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007195
Ned Deily87adb6e2013-10-18 21:09:56 -07007196 Darwin*)
7197 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7198 # used to be here, but non-Apple gcc doesn't accept them.
7199 if test "${CC}" = gcc
7200 then
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007202$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007203 case "${UNIVERSALSDK}" in
7204 */MacOSX10.4u.sdk)
7205 # Build using 10.4 SDK, force usage of gcc when the
7206 # compiler is gcc, otherwise the user will get very
7207 # confusing error messages when building on OSX 10.6
7208 CC=gcc-4.0
7209 CPP=cpp-4.0
7210 ;;
7211 esac
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007213$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007214 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215
Ned Deily87adb6e2013-10-18 21:09:56 -07007216 if test "${enable_universalsdk}"
7217 then
7218 case "$UNIVERSAL_ARCHS" in
7219 32-bit)
7220 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7221 LIPO_32BIT_FLAGS=""
7222 ARCH_RUN_32BIT=""
7223 ;;
7224 64-bit)
7225 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7226 LIPO_32BIT_FLAGS=""
7227 ARCH_RUN_32BIT="true"
7228 ;;
7229 all)
7230 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7231 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7232 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7233 ;;
7234 intel)
7235 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7236 LIPO_32BIT_FLAGS="-extract i386"
7237 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7238 ;;
7239 intel-32)
7240 UNIVERSAL_ARCH_FLAGS="-arch i386"
7241 LIPO_32BIT_FLAGS=""
7242 ARCH_RUN_32BIT=""
7243 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007244 intel-64)
7245 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7246 LIPO_32BIT_FLAGS=""
7247 ARCH_RUN_32BIT="true"
7248 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007249 3-way)
7250 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7251 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7252 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7253 ;;
7254 *)
7255 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7256 ;;
7257 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258
Ned Deily87adb6e2013-10-18 21:09:56 -07007259 if test "${UNIVERSALSDK}" != "/"
7260 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007261 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7262 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007263 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007264 else
7265 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7266 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 fi
7268 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 # Calculate an appropriate deployment target for this build:
7271 # The deployment target value is used explicitly to enable certain
7272 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007273 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007274 # component of the string returned by distutils.get_platform().
7275 #
7276 # Use the value from:
7277 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7278 # 2. the operating system version of the build machine if >= 10.6
7279 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7280 # below to pick either 10.3, 10.4, or 10.5 as the target.
7281 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282
Ned Deily87adb6e2013-10-18 21:09:56 -07007283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7284$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007285 cur_target_major=`sw_vers -productVersion | \
7286 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7287 cur_target_minor=`sw_vers -productVersion | \
7288 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7289 cur_target="${cur_target_major}.${cur_target_minor}"
7290 if test ${cur_target_major} -eq 10 && \
7291 test ${cur_target_minor} -ge 3 && \
7292 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007293 then
Ned Deily36820b62014-06-25 13:44:22 -07007294 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007295 cur_target=10.3
7296 if test ${enable_universalsdk}
7297 then
7298 case "$UNIVERSAL_ARCHS" in
7299 all|3-way|intel|64-bit)
7300 # These configurations were first supported in 10.5
7301 cur_target='10.5'
7302 ;;
7303 esac
7304 else
7305 if test `/usr/bin/arch` = "i386"
7306 then
7307 # 10.4 was the first release to support Intel archs
7308 cur_target="10.4"
7309 fi
7310 fi
7311 fi
7312 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007313
Ned Deily87adb6e2013-10-18 21:09:56 -07007314 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7315 # environment with a value that is the same as what we'll use
7316 # in the Makefile to ensure that we'll get the same compiler
7317 # environment during configure and build time.
7318 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7319 export MACOSX_DEPLOYMENT_TARGET
7320 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7322$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007323
Ned Deily87adb6e2013-10-18 21:09:56 -07007324 # end of Darwin* tests
7325 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326 esac
7327 ;;
7328
7329*)
7330 case $ac_sys_system in
7331 OpenUNIX*|UnixWare*)
7332 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7333 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334 SCO_SV*)
7335 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7336 ;;
7337 esac
7338 ;;
7339esac
7340
Zachary Ware5af85642015-12-21 12:09:17 -06007341# ICC needs -fp-model strict or floats behave badly
7342case "$CC" in
7343*icc*)
7344 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7345 ;;
7346esac
7347
T. Woutersddbfa2c2017-05-23 01:30:49 +02007348if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349 :
7350else
7351 OPT="-DNDEBUG $OPT"
7352fi
7353
7354if test "$ac_arch_flags"
7355then
7356 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7357fi
7358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359# On some compilers, pthreads are available without further options
7360# (e.g. MacOS X). On some of these systems, the compiler will not
7361# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7362# So we have to see first whether pthreads are available without
7363# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7365$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007366if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368else
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370 ac_cv_pthread_is_default=no
7371else
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373/* end confdefs.h. */
7374
Stefan Krah7dba5942012-11-22 22:49:11 +01007375#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376#include <pthread.h>
7377
7378void* routine(void* p){return NULL;}
7379
7380int main(){
7381 pthread_t p;
7382 if(pthread_create(&p,NULL,routine,NULL)!=0)
7383 return 1;
7384 (void)pthread_detach(p);
7385 return 0;
7386}
7387
7388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390
7391 ac_cv_pthread_is_default=yes
7392 ac_cv_kthread=no
7393 ac_cv_pthread=no
7394
7395else
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400fi
7401
7402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403fi
7404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7406$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407
7408
7409if test $ac_cv_pthread_is_default = yes
7410then
7411 ac_cv_kpthread=no
7412else
7413# -Kpthread, if available, provides the right #defines
7414# and linker options to make pthread_create available
7415# Some compilers won't report that they do not support -Kpthread,
7416# so we need to run a program to see whether it really made the
7417# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7419$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007420if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422else
7423 ac_save_cc="$CC"
7424CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007425if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 ac_cv_kpthread=no
7427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429/* end confdefs.h. */
7430
Stefan Krah7dba5942012-11-22 22:49:11 +01007431#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432#include <pthread.h>
7433
7434void* routine(void* p){return NULL;}
7435
7436int main(){
7437 pthread_t p;
7438 if(pthread_create(&p,NULL,routine,NULL)!=0)
7439 return 1;
7440 (void)pthread_detach(p);
7441 return 0;
7442}
7443
7444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007445if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446 ac_cv_kpthread=yes
7447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7451 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452fi
7453
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454CC="$ac_save_cc"
7455fi
7456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7458$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459fi
7460
7461if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7462then
7463# -Kthread, if available, provides the right #defines
7464# and linker options to make pthread_create available
7465# Some compilers won't report that they do not support -Kthread,
7466# so we need to run a program to see whether it really made the
7467# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7469$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007470if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472else
7473 ac_save_cc="$CC"
7474CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007475if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476 ac_cv_kthread=no
7477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479/* end confdefs.h. */
7480
Stefan Krah7dba5942012-11-22 22:49:11 +01007481#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482#include <pthread.h>
7483
7484void* routine(void* p){return NULL;}
7485
7486int main(){
7487 pthread_t p;
7488 if(pthread_create(&p,NULL,routine,NULL)!=0)
7489 return 1;
7490 (void)pthread_detach(p);
7491 return 0;
7492}
7493
7494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007495if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496 ac_cv_kthread=yes
7497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502fi
7503
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504CC="$ac_save_cc"
7505fi
7506
Matthias Kloseb9621712010-04-24 17:59:49 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7508$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509fi
7510
7511if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7512then
7513# -pthread, if available, provides the right #defines
7514# and linker options to make pthread_create available
7515# Some compilers won't report that they do not support -pthread,
7516# so we need to run a program to see whether it really made the
7517# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7519$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007520if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522else
7523 ac_save_cc="$CC"
7524CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526 ac_cv_pthread=no
7527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529/* end confdefs.h. */
7530
Stefan Krah7dba5942012-11-22 22:49:11 +01007531#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532#include <pthread.h>
7533
7534void* routine(void* p){return NULL;}
7535
7536int main(){
7537 pthread_t p;
7538 if(pthread_create(&p,NULL,routine,NULL)!=0)
7539 return 1;
7540 (void)pthread_detach(p);
7541 return 0;
7542}
7543
7544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007545if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546 ac_cv_pthread=yes
7547else
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7551 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552fi
7553
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554CC="$ac_save_cc"
7555fi
7556
Matthias Kloseb9621712010-04-24 17:59:49 +00007557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7558$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559fi
7560
7561# If we have set a CC compiler flag for thread support then
7562# check if it works for CXX, too.
7563ac_cv_cxx_thread=no
7564if test ! -z "$CXX"
7565then
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7567$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568ac_save_cxx="$CXX"
7569
7570if test "$ac_cv_kpthread" = "yes"
7571then
7572 CXX="$CXX -Kpthread"
7573 ac_cv_cxx_thread=yes
7574elif test "$ac_cv_kthread" = "yes"
7575then
7576 CXX="$CXX -Kthread"
7577 ac_cv_cxx_thread=yes
7578elif test "$ac_cv_pthread" = "yes"
7579then
7580 CXX="$CXX -pthread"
7581 ac_cv_cxx_thread=yes
7582fi
7583
7584if test $ac_cv_cxx_thread = yes
7585then
7586 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7587 $CXX -c conftest.$ac_ext 2>&5
7588 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7589 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7590 then
7591 ac_cv_cxx_thread=yes
7592 else
7593 ac_cv_cxx_thread=no
7594 fi
7595 rm -fr conftest*
7596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7598$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599fi
7600CXX="$ac_save_cxx"
7601
7602
7603# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7605$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610/* end confdefs.h. */
7611#include <stdlib.h>
7612#include <stdarg.h>
7613#include <string.h>
7614#include <float.h>
7615
7616int
7617main ()
7618{
7619
7620 ;
7621 return 0;
7622}
7623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625 ac_cv_header_stdc=yes
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7630
7631if test $ac_cv_header_stdc = yes; then
7632 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634/* end confdefs.h. */
7635#include <string.h>
7636
7637_ACEOF
7638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $EGREP "memchr" >/dev/null 2>&1; then :
7640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641else
7642 ac_cv_header_stdc=no
7643fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007644rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645
7646fi
7647
7648if test $ac_cv_header_stdc = yes; then
7649 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651/* end confdefs.h. */
7652#include <stdlib.h>
7653
7654_ACEOF
7655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 $EGREP "free" >/dev/null 2>&1; then :
7657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658else
7659 ac_cv_header_stdc=no
7660fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007661rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662
7663fi
7664
7665if test $ac_cv_header_stdc = yes; then
7666 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007667 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668 :
7669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671/* end confdefs.h. */
7672#include <ctype.h>
7673#include <stdlib.h>
7674#if ((' ' & 0x0FF) == 0x020)
7675# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7676# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7677#else
7678# define ISLOWER(c) \
7679 (('a' <= (c) && (c) <= 'i') \
7680 || ('j' <= (c) && (c) <= 'r') \
7681 || ('s' <= (c) && (c) <= 'z'))
7682# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7683#endif
7684
7685#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7686int
7687main ()
7688{
7689 int i;
7690 for (i = 0; i < 256; i++)
7691 if (XOR (islower (i), ISLOWER (i))
7692 || toupper (i) != TOUPPER (i))
7693 return 2;
7694 return 0;
7695}
7696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007697if ac_fn_c_try_run "$LINENO"; then :
7698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704fi
7705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706fi
7707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7709$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710if test $ac_cv_header_stdc = yes; then
7711
Matthias Kloseb9621712010-04-24 17:59:49 +00007712$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713
7714fi
7715
stratakise768c862018-01-23 16:11:24 +01007716for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007717fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007718ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007719sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007720unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007721poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007722sys/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 +01007723sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007724sys/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 +01007725sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007726sys/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 -07007727libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007728linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007729sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007730do :
7731 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7732ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007733if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007735#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007736_ACEOF
7737
7738fi
7739
Guido van Rossum627b2d71993-12-24 10:39:16 +00007740done
7741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007743for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7746$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007747if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007749else
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752#include <sys/types.h>
7753#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755int
7756main ()
7757{
7758if ((DIR *) 0)
7759return 0;
7760 ;
7761 return 0;
7762}
7763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771eval ac_res=\$$as_ac_Header
7772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7773$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007774if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
7778
7779ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007781
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007782done
7783# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7784if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7786$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007787if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007789else
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794/* Override any GCC internal prototype to avoid an error.
7795 Use char because int might match the return type of a GCC
7796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007797#ifdef __cplusplus
7798extern "C"
7799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007800char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ;
7806 return 0;
7807}
7808_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809for ac_lib in '' dir; do
7810 if test -z "$ac_lib"; then
7811 ac_res="none required"
7812 else
7813 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819rm -f core conftest.err conftest.$ac_objext \
7820 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007821 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824done
Victor Stinnere0be4232011-10-25 13:06:09 +02007825if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827else
7828 ac_cv_search_opendir=no
7829fi
7830rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007831LIBS=$ac_func_search_save_LIBS
7832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7834$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007836if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007840
Michael W. Hudson54241132001-12-07 15:38:26 +00007841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7843$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007844if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007846else
7847 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851/* Override any GCC internal prototype to avoid an error.
7852 Use char because int might match the return type of a GCC
7853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007854#ifdef __cplusplus
7855extern "C"
7856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007857char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ;
7863 return 0;
7864}
7865_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866for ac_lib in '' x; do
7867 if test -z "$ac_lib"; then
7868 ac_res="none required"
7869 else
7870 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007871 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876rm -f core conftest.err conftest.$ac_objext \
7877 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007878 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881done
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884else
7885 ac_cv_search_opendir=no
7886fi
7887rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007888LIBS=$ac_func_search_save_LIBS
7889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7891$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007893if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007896fi
7897
7898fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7901$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007904else
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007906/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007907#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007908int
7909main ()
7910{
7911return makedev(0, 0);
7912 ;
7913 return 0;
7914}
7915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007917 ac_cv_header_sys_types_h_makedev=yes
7918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921rm -f core conftest.err conftest.$ac_objext \
7922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007923
7924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7926$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007927
7928if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007929ac_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 +02007930if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007931
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007933
7934fi
7935
7936
7937
7938 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 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 +02007940if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007943
7944fi
7945
7946
7947 fi
7948fi
7949
Michael W. Hudson54241132001-12-07 15:38:26 +00007950
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007951# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7952# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7953SAVE_CFLAGS=$CFLAGS
7954CFLAGS="-std=c99 $CFLAGS"
7955for ac_header in bluetooth/bluetooth.h
7956do :
7957 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7958if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7959 cat >>confdefs.h <<_ACEOF
7960#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7961_ACEOF
7962
7963fi
7964
7965done
7966
7967CFLAGS=$SAVE_CFLAGS
7968
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007969# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7970for ac_header in net/if.h
7971do :
7972 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7973#ifdef STDC_HEADERS
7974# include <stdlib.h>
7975# include <stddef.h>
7976#else
7977# ifdef HAVE_STDLIB_H
7978# include <stdlib.h>
7979# endif
7980#endif
7981#ifdef HAVE_SYS_SOCKET_H
7982# include <sys/socket.h>
7983#endif
7984
7985"
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007987 cat >>confdefs.h <<_ACEOF
7988#define HAVE_NET_IF_H 1
7989_ACEOF
7990
7991fi
7992
7993done
7994
7995
Martin v. Löwis11017b12006-01-14 18:12:57 +00007996# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007997for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007998do :
7999 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 +00008000#ifdef HAVE_ASM_TYPES_H
8001#include <asm/types.h>
8002#endif
8003#ifdef HAVE_SYS_SOCKET_H
8004#include <sys/socket.h>
8005#endif
8006
Matthias Kloseb9621712010-04-24 17:59:49 +00008007"
Victor Stinnere0be4232011-10-25 13:06:09 +02008008if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008009 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008011_ACEOF
8012
8013fi
8014
8015done
8016
8017
caaveryeffc12f2017-09-06 18:18:10 -04008018for ac_header in linux/vm_sockets.h
8019do :
8020 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8021#ifdef HAVE_SYS_SOCKET_H
8022#include <sys/socket.h>
8023#endif
8024
8025"
8026if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8027 cat >>confdefs.h <<_ACEOF
8028#define HAVE_LINUX_VM_SOCKETS_H 1
8029_ACEOF
8030
8031fi
8032
8033done
8034
8035
Charles-François Natali47413c12011-10-06 19:47:44 +02008036# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008037for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008038do :
8039 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8040ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8041#ifdef HAVE_SYS_SOCKET_H
8042#include <sys/socket.h>
8043#endif
8044
8045"
8046if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8047 cat >>confdefs.h <<_ACEOF
8048#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8049_ACEOF
8050
8051fi
8052
8053done
8054
8055
Guido van Rossum627b2d71993-12-24 10:39:16 +00008056# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008057was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8059$as_echo_n "checking for clock_t in time.h... " >&6; }
8060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
8064_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008067 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008068else
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
8070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008072
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008073
Guido van Rossum627b2d71993-12-24 10:39:16 +00008074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008075rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076
Matthias Kloseb9621712010-04-24 17:59:49 +00008077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8078$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8081$as_echo_n "checking for makedev... " >&6; }
8082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008083/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008084
Jesus Cea740f53a2010-04-28 11:35:30 +00008085#if defined(MAJOR_IN_MKDEV)
8086#include <sys/mkdev.h>
8087#elif defined(MAJOR_IN_SYSMACROS)
8088#include <sys/sysmacros.h>
8089#else
8090#include <sys/types.h>
8091#endif
8092
Neal Norwitz11690112002-07-30 01:08:28 +00008093int
8094main ()
8095{
Jesus Cea740f53a2010-04-28 11:35:30 +00008096
8097 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008098 ;
8099 return 0;
8100}
Matthias Kloseb159a552010-04-25 21:00:44 +00008101
Neal Norwitz11690112002-07-30 01:08:28 +00008102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008104 ac_cv_has_makedev=yes
8105else
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108rm -f core conftest.err conftest.$ac_objext \
8109 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8111$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008112if test "$ac_cv_has_makedev" = "yes"; then
8113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008115
8116fi
8117
Christian Heimes985ecdc2013-11-20 11:46:18 +01008118# byte swapping
8119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8120$as_echo_n "checking for le64toh... " >&6; }
8121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8122/* end confdefs.h. */
8123
8124#ifdef HAVE_ENDIAN_H
8125#include <endian.h>
8126#elif defined(HAVE_SYS_ENDIAN_H)
8127#include <sys/endian.h>
8128#endif
8129
8130int
8131main ()
8132{
8133
8134 le64toh(1)
8135 ;
8136 return 0;
8137}
8138
8139_ACEOF
8140if ac_fn_c_try_link "$LINENO"; then :
8141 ac_cv_has_le64toh=yes
8142else
8143 ac_cv_has_le64toh=no
8144fi
8145rm -f core conftest.err conftest.$ac_objext \
8146 conftest$ac_exeext conftest.$ac_ext
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8148$as_echo "$ac_cv_has_le64toh" >&6; }
8149if test "$ac_cv_has_le64toh" = "yes"; then
8150
8151$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8152
8153fi
8154
Martin v. Löwis399a6892002-10-04 10:22:02 +00008155use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008156# Don't use largefile support for GNU/Hurd
8157case $ac_sys_system in GNU*)
8158 use_lfs=no
8159esac
8160
Martin v. Löwis399a6892002-10-04 10:22:02 +00008161if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008162# Two defines needed to enable largefile support on various platforms
8163# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008164case $ac_sys_system/$ac_sys_release in
8165AIX*)
8166
8167$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8168
8169 ;;
8170esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008173
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008176
Martin v. Löwis399a6892002-10-04 10:22:02 +00008177fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008178
Guido van Rossum84e7b241996-08-19 21:59:00 +00008179# Add some code to confdefs.h so that the test for off_t works on SCO
8180cat >> confdefs.h <<\EOF
8181#if defined(SCO_DS)
8182#undef _OFF_T
8183#endif
8184EOF
8185
Guido van Rossumef2255b2000-03-10 22:30:29 +00008186# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008187ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008190else
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
8192cat >>confdefs.h <<_ACEOF
8193#define mode_t int
8194_ACEOF
8195
8196fi
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008201else
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008205_ACEOF
8206
8207fi
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008210if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008212else
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
8214cat >>confdefs.h <<_ACEOF
8215#define pid_t int
8216_ACEOF
8217
8218fi
8219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008220
Martin v. Löwis11437992002-04-12 09:54:03 +00008221cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008222#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008223_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008224
Matthias Kloseb9621712010-04-24 17:59:49 +00008225ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008228else
Martin v. Löwis11437992002-04-12 09:54:03 +00008229
8230cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
8233
8234fi
8235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8237$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008238if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008243#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008244
8245_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008248 ac_cv_type_uid_t=yes
8249else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008250 ac_cv_type_uid_t=no
8251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008252rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8256$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008257if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008263
8264fi
8265
Mark Dickinson983bc162012-12-02 12:11:38 +00008266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008271
8272fi
8273
Stefan Krah1919b7e2012-03-21 18:25:23 +01008274ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8275if test "x$ac_cv_type___uint128_t" = xyes; then :
8276
8277$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8278
8279fi
8280
Jack Jansendd19cf82001-12-06 22:36:17 +00008281
Michael W. Hudson54241132001-12-07 15:38:26 +00008282# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008283# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284# The cast to long int works around a bug in the HP C Compiler
8285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8287# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8289$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008290if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008292else
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 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 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 if test "$ac_cv_type_int" = yes; then
8297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008299as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008300See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301 else
8302 ac_cv_sizeof_int=0
8303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8308$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309
8310
8311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008313#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008314_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008315
8316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8322$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 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 +00008327
Martin v. Löwis11437992002-04-12 09:54:03 +00008328else
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 if test "$ac_cv_type_long" = yes; then
8330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008332as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008333See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334 else
8335 ac_cv_sizeof_long=0
8336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8341$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342
8343
8344
Martin v. Löwis11437992002-04-12 09:54:03 +00008345cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008346#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008347_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008348
8349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350# The cast to long int works around a bug in the HP C Compiler
8351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8355$as_echo_n "checking size of long long... " >&6; }
8356if ${ac_cv_sizeof_long_long+:} false; then :
8357 $as_echo_n "(cached) " >&6
8358else
8359 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8360
8361else
8362 if test "$ac_cv_type_long_long" = yes; then
8363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8365as_fn_error 77 "cannot compute sizeof (long long)
8366See \`config.log' for more details" "$LINENO" 5; }
8367 else
8368 ac_cv_sizeof_long_long=0
8369 fi
8370fi
8371
8372fi
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8374$as_echo "$ac_cv_sizeof_long_long" >&6; }
8375
8376
8377
8378cat >>confdefs.h <<_ACEOF
8379#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8380_ACEOF
8381
8382
8383# The cast to long int works around a bug in the HP C Compiler
8384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8386# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8388$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008389if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008391else
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 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 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 if test "$ac_cv_type_void_p" = yes; then
8396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008398as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008399See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400 else
8401 ac_cv_sizeof_void_p=0
8402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8407$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408
8409
8410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008412#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008413_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008414
8415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416# The cast to long int works around a bug in the HP C Compiler
8417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8419# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8421$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008422if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 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 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427else
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 if test "$ac_cv_type_short" = yes; then
8429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008431as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008432See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433 else
8434 ac_cv_sizeof_short=0
8435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8440$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441
8442
8443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008445#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008446_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008447
8448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449# The cast to long int works around a bug in the HP C Compiler
8450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8452# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8454$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008455if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008457else
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 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 +00008459
Martin v. Löwis11437992002-04-12 09:54:03 +00008460else
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 if test "$ac_cv_type_float" = yes; then
8462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008464as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008465See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466 else
8467 ac_cv_sizeof_float=0
8468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8473$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474
8475
8476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008478#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008479_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008480
8481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482# The cast to long int works around a bug in the HP C Compiler
8483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8485# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8487$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008488if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 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 +00008492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493else
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 if test "$ac_cv_type_double" = yes; then
8495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008497as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008498See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499 else
8500 ac_cv_sizeof_double=0
8501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8506$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507
8508
8509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008511#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008512_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008513
8514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515# The cast to long int works around a bug in the HP C Compiler
8516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8518# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8520$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008521if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 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 +00008525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 if test "$ac_cv_type_fpos_t" = yes; then
8528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008530as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008531See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532 else
8533 ac_cv_sizeof_fpos_t=0
8534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8539$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540
8541
8542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008544#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008545_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008546
Michael W. Hudson54241132001-12-07 15:38:26 +00008547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548# The cast to long int works around a bug in the HP C Compiler
8549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8551# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8553$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 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 +00008558
Martin v. Löwis18e16552006-02-15 17:27:45 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 if test "$ac_cv_type_size_t" = yes; then
8561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008564See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 else
8566 ac_cv_sizeof_size_t=0
8567 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569
Martin v. Löwis18e16552006-02-15 17:27:45 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8572$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574
8575
Martin v. Löwis18e16552006-02-15 17:27:45 +00008576cat >>confdefs.h <<_ACEOF
8577#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8578_ACEOF
8579
8580
Christian Heimes400adb02008-02-01 08:12:03 +00008581# The cast to long int works around a bug in the HP C Compiler
8582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8584# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8586$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008587if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 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 +00008591
Christian Heimes400adb02008-02-01 08:12:03 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 if test "$ac_cv_type_pid_t" = yes; then
8594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008596as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008597See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008598 else
8599 ac_cv_sizeof_pid_t=0
8600 fi
8601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602
Christian Heimes400adb02008-02-01 08:12:03 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8605$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008606
8607
8608
8609cat >>confdefs.h <<_ACEOF
8610#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8611_ACEOF
8612
8613
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008614# The cast to long int works around a bug in the HP C Compiler
8615# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8616# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8617# This bug is HP SR number 8606223364.
8618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8619$as_echo_n "checking size of uintptr_t... " >&6; }
8620if ${ac_cv_sizeof_uintptr_t+:} false; then :
8621 $as_echo_n "(cached) " >&6
8622else
8623 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8624
8625else
8626 if test "$ac_cv_type_uintptr_t" = yes; then
8627 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8628$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8629as_fn_error 77 "cannot compute sizeof (uintptr_t)
8630See \`config.log' for more details" "$LINENO" 5; }
8631 else
8632 ac_cv_sizeof_uintptr_t=0
8633 fi
8634fi
8635
8636fi
8637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8638$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8639
8640
8641
8642cat >>confdefs.h <<_ACEOF
8643#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8644_ACEOF
8645
8646
Michael W. Hudson54241132001-12-07 15:38:26 +00008647
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008648
Eitan Adler3055c942018-05-15 22:58:09 -07008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8650$as_echo_n "checking for long double... " >&6; }
8651if ${ac_cv_type_long_double+:} false; then :
8652 $as_echo_n "(cached) " >&6
8653else
8654 if test "$GCC" = yes; then
8655 ac_cv_type_long_double=yes
8656 else
8657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8658/* end confdefs.h. */
8659/* The Stardent Vistra knows sizeof (long double), but does
8660 not support it. */
8661 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008662int
8663main ()
8664{
Eitan Adler3055c942018-05-15 22:58:09 -07008665static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8666 sizeof (double) <= sizeof (long double))];
8667test_array [0] = 0;
8668return test_array [0];
8669
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008675 ac_cv_type_long_double=yes
8676else
8677 ac_cv_type_long_double=no
8678fi
8679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8680 fi
8681fi
8682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8683$as_echo "$ac_cv_type_long_double" >&6; }
8684 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008685
Matthias Kloseb9621712010-04-24 17:59:49 +00008686$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008687
Eitan Adler3055c942018-05-15 22:58:09 -07008688 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008689
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008690# The cast to long int works around a bug in the HP C Compiler
8691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8695$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008696if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 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 +00008700
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 if test "$ac_cv_type_long_double" = yes; then
8703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008705as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008706See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008707 else
8708 ac_cv_sizeof_long_double=0
8709 fi
8710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8714$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008715
8716
8717
8718cat >>confdefs.h <<_ACEOF
8719#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8720_ACEOF
8721
8722
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724# The cast to long int works around a bug in the HP C Compiler
8725# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8726# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8727# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8729$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008730if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 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 +00008734
Thomas Woutersb2137042007-02-01 18:02:27 +00008735else
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 if test "$ac_cv_type__Bool" = yes; then
8737 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008739as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008740See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741 else
8742 ac_cv_sizeof__Bool=0
8743 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745
Thomas Woutersb2137042007-02-01 18:02:27 +00008746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8748$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749
8750
8751
Thomas Woutersb2137042007-02-01 18:02:27 +00008752cat >>confdefs.h <<_ACEOF
8753#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8754_ACEOF
8755
8756
Thomas Woutersb2137042007-02-01 18:02:27 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758# The cast to long int works around a bug in the HP C Compiler
8759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8763$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008764if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768#ifdef HAVE_SYS_TYPES_H
8769#include <sys/types.h>
8770#endif
8771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if test "$ac_cv_type_off_t" = yes; then
8776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008778as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008779See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780 else
8781 ac_cv_sizeof_off_t=0
8782 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8787$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789
8790
Martin v. Löwis11437992002-04-12 09:54:03 +00008791cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008792#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008793_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008794
Michael W. Hudson54241132001-12-07 15:38:26 +00008795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8798$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008799if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008800 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8805$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8808$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008809fi
8810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008811# The cast to long int works around a bug in the HP C Compiler
8812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8816$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008821#ifdef HAVE_SYS_TYPES_H
8822#include <sys/types.h>
8823#endif
8824#ifdef HAVE_TIME_H
8825#include <time.h>
8826#endif
8827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830else
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 if test "$ac_cv_type_time_t" = yes; then
8832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008834as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008835See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836 else
8837 ac_cv_sizeof_time_t=0
8838 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008840
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8843$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845
8846
Martin v. Löwis11437992002-04-12 09:54:03 +00008847cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008848#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008849_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008850
Michael W. Hudson54241132001-12-07 15:38:26 +00008851
8852
Trent Mick635f6fb2000-08-23 21:33:05 +00008853# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008854ac_save_cc="$CC"
8855if test "$ac_cv_kpthread" = "yes"
8856then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008857elif test "$ac_cv_kthread" = "yes"
8858then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008859elif test "$ac_cv_pthread" = "yes"
8860then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008861fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8864$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008865have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008868
8869 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008870int
8871main ()
8872{
Guido van Rossum12580492000-09-24 16:47:19 +00008873pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ;
8875 return 0;
8876}
Matthias Kloseb159a552010-04-25 21:00:44 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008879if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008880 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8884$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008885if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8889# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8891$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008896#ifdef HAVE_PTHREAD_H
8897#include <pthread.h>
8898#endif
8899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 if test "$ac_cv_type_pthread_t" = yes; then
8904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008906as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008907See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908 else
8909 ac_cv_sizeof_pthread_t=0
8910 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912
Trent Mick635f6fb2000-08-23 21:33:05 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8915$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917
8918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008920#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008921_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923
Trent Mick635f6fb2000-08-23 21:33:05 +00008924fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008925
8926# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8927# This checking will be unnecessary after removing deprecated TLS API.
8928# The cast to long int works around a bug in the HP C Compiler
8929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8931# This bug is HP SR number 8606223364.
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8933$as_echo_n "checking size of pthread_key_t... " >&6; }
8934if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8935 $as_echo_n "(cached) " >&6
8936else
8937 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8938"; then :
8939
8940else
8941 if test "$ac_cv_type_pthread_key_t" = yes; then
8942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8944as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8945See \`config.log' for more details" "$LINENO" 5; }
8946 else
8947 ac_cv_sizeof_pthread_key_t=0
8948 fi
8949fi
8950
8951fi
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8953$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8954
8955
8956
8957cat >>confdefs.h <<_ACEOF
8958#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8959_ACEOF
8960
8961
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8963$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8964if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8966/* end confdefs.h. */
8967#include <pthread.h>
8968int
8969main ()
8970{
8971pthread_key_t k; k * 1;
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976if ac_fn_c_try_compile "$LINENO"; then :
8977 ac_pthread_key_t_is_arithmetic_type=yes
8978else
8979 ac_pthread_key_t_is_arithmetic_type=no
8980
8981fi
8982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8984$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8985 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8986
8987$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8988
8989 fi
8990else
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008994CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008997case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008998 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008999 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9000 ;;
9001 Darwin/*)
9002 OTHER_LIBTOOL_OPT=""
9003 ;;
9004esac
9005
9006
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009007
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009008case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009009 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009010 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9011 if test "${enable_universalsdk}"; then
9012 :
9013 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009014 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009015 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009016 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009017 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009018 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009019 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009020 if test ${gcc_version} '<' 4.0
9021 then
9022 LIBTOOL_CRUFT="-lcc_dynamic"
9023 else
9024 LIBTOOL_CRUFT=""
9025 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009027 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028else
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009030/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009031
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032 #include <unistd.h>
9033 int main(int argc, char*argv[])
9034 {
9035 if (sizeof(long) == 4) {
9036 return 0;
9037 } else {
9038 return 1;
9039 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009040 }
9041
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009043if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009044 ac_osx_32bit=yes
9045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050fi
9051
9052
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009054 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055 i386)
9056 MACOSX_DEFAULT_ARCH="i386"
9057 ;;
9058 ppc)
9059 MACOSX_DEFAULT_ARCH="ppc"
9060 ;;
9061 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009062 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 ;;
9064 esac
9065 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009066 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009067 i386)
9068 MACOSX_DEFAULT_ARCH="x86_64"
9069 ;;
9070 ppc)
9071 MACOSX_DEFAULT_ARCH="ppc64"
9072 ;;
9073 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009074 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 ;;
9076 esac
9077
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009078 fi
9079
9080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009083esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9085$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009086if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009087then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009088 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009090 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009091
Matthias Kloseb9621712010-04-24 17:59:49 +00009092$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9095$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009096 if test $enable_shared = "yes"
9097 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009098 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 +00009099 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009100else
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009103fi
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9106$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009107case $ac_sys_system/$ac_sys_release in
9108 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009111
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9113$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009114 ;;
9115 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009118 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009119esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009120
Guido van Rossum0a516c91994-09-12 10:58:40 +00009121# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009122
Michael W. Hudson54241132001-12-07 15:38:26 +00009123
9124
9125
9126
Benjamin Peterson99f03762010-04-11 22:15:28 +00009127
Thomas Wouters477c8d52006-05-27 19:21:47 +00009128
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009129# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9130# -- usually .so, .sl on HP-UX, .dll on Cygwin
9131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9132$as_echo_n "checking the extension of shared libraries... " >&6; }
9133if test -z "$SHLIB_SUFFIX"; then
9134 case $ac_sys_system in
9135 hp*|HP*)
9136 case `uname -m` in
9137 ia64) SHLIB_SUFFIX=.so;;
9138 *) SHLIB_SUFFIX=.sl;;
9139 esac
9140 ;;
9141 CYGWIN*) SHLIB_SUFFIX=.dll;;
9142 *) SHLIB_SUFFIX=.so;;
9143 esac
9144fi
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9146$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009147
Guido van Rossum0a516c91994-09-12 10:58:40 +00009148# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009149# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009150# (Shared libraries in this instance are shared modules to be loaded into
9151# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9153$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009154if test -z "$LDSHARED"
9155then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009156 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009157 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009158 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009159 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009160 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 if test "$GCC" = "yes" ; then
9163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared'
9165 else
9166 LDSHARED='$(CC) -G'
9167 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009168 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009169 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 if test "$GCC" = "yes" ; then
9171 LDSHARED='$(CC) -shared'
9172 LDCXXSHARED='$(CXX) -shared'
9173 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009174 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009175 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009176 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009177 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009178 LDSHARED='$(CC) -bundle'
9179 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009180 if test "$enable_framework" ; then
9181 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009182 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9183 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009184 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009185 else
9186 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009187 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009189 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009190 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009191 LDSHARED='$(CC) -bundle'
9192 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009193 if test "$enable_framework" ; then
9194 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009195 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9196 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009197 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009198 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009199 # No framework, use the Python app as bundle-loader
9200 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009201 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009202 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009204 Darwin/*)
9205 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9206 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009207
Ned Deily36820b62014-06-25 13:44:22 -07009208 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9209 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9210 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9211 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9212 if test ${dep_target_major} -eq 10 && \
9213 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 then
Ned Deily36820b62014-06-25 13:44:22 -07009215 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009216 LDSHARED='$(CC) -bundle'
9217 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009218 if test "$enable_framework" ; then
9219 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009220 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9221 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009222 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009223 else
9224 # No framework, use the Python app as bundle-loader
9225 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9226 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009228 fi
Ned Deily36820b62014-06-25 13:44:22 -07009229 else
9230 # building for OS X 10.3 and later
9231 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9232 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9233 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 fi
9235 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009236 Linux*|GNU*|QNX*)
9237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009239 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009240 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009241 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009242 LDSHARED='$(CC) -shared'
9243 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009244 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009245 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009246 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009247 OpenBSD*)
9248 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9249 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009250 LDSHARED='$(CC) -shared $(CCSHARED)'
9251 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009252 else
9253 case `uname -r` in
9254 [01].* | 2.[0-7] | 2.[0-7].*)
9255 LDSHARED="ld -Bshareable ${LDFLAGS}"
9256 ;;
9257 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009258 LDSHARED='$(CC) -shared $(CCSHARED)'
9259 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009260 ;;
9261 esac
9262 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009263 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009264 LDSHARED='$(CC) -shared'
9265 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009266 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009267 if test "$GCC" = "yes" ; then
9268 LDSHARED='$(CC) -shared'
9269 LDCXXSHARED='$(CXX) -shared'
9270 else
9271 LDSHARED='$(CC) -G'
9272 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009273 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 SCO_SV*)
9275 LDSHARED='$(CC) -Wl,-G,-Bexport'
9276 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9277 CYGWIN*)
9278 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9279 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280 *) LDSHARED="ld";;
9281 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9284$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009285LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009286BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009287# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009288# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9290$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009291if test -z "$CCSHARED"
9292then
Guido van Rossum07397971997-04-29 21:49:50 +00009293 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009294 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009295 then CCSHARED="-fPIC";
9296 elif test `uname -p` = sparc;
9297 then CCSHARED="-xcode=pic32";
9298 else CCSHARED="-Kpic";
9299 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009300 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009301 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009302 else CCSHARED="+z";
9303 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009304 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009305 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009306 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009307 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009308 if test "$GCC" = "yes"
9309 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009310 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009311 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009312 SCO_SV*)
9313 if test "$GCC" = "yes"
9314 then CCSHARED="-fPIC"
9315 else CCSHARED="-Kpic -belf"
9316 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9320$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009322# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9324$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325if test -z "$LINKFORSHARED"
9326then
Guido van Rossum07397971997-04-29 21:49:50 +00009327 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009328 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009329 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009330 LINKFORSHARED="-Wl,-E -Wl,+s";;
9331# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009332 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009333 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009336 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009337
9338 # Issue #18075: the default maximum stack size (8MBytes) is too
9339 # small for the default recursion limit. Increase the stack size
9340 # to ensure that tests don't crash
9341 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9342
Jack Jansene578a632001-08-15 01:27:14 +00009343 if test "$enable_framework"
9344 then
Jack Jansenda49e192005-01-07 13:08:22 +00009345 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009346 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009347 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009348 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009349 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009350 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009351 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009352 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9353 then
9354 LINKFORSHARED="-Wl,--export-dynamic"
9355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009356 SunOS/5*) case $CC in
9357 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009358 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009359 then
9360 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009361 fi;;
9362 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009363 CYGWIN*)
9364 if test $enable_shared = "no"
9365 then
9366 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9367 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009368 QNX*)
9369 # -Wl,-E causes the symbols to be added to the dynamic
9370 # symbol table so that they can be found when a module
9371 # is loaded. -N 2048K causes the stack size to be set
9372 # to 2048 kilobytes so that the stack doesn't overflow
9373 # when running test_compile.py.
9374 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9378$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9383$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009384if test ! "$LIBRARY" = "$LDLIBRARY"
9385then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009386 case $ac_sys_system in
9387 CYGWIN*)
9388 # Cygwin needs CCSHARED when building extension DLLs
9389 # but not when building the interpreter DLL.
9390 CFLAGSFORSHARED='';;
9391 *)
9392 CFLAGSFORSHARED='$(CCSHARED)'
9393 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9396$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009397
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009398# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9399# library (with --enable-shared).
9400# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009401# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9402# if it is not required, since it creates a dependency of the shared library
9403# to LIBS. This, in turn, means that applications linking the shared libpython
9404# don't need to link LIBS explicitly. The default should be only changed
9405# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9408$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009409case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009410 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009411 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9414$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009415
9416
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9419$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009421 $as_echo_n "(cached) " >&6
9422else
9423 ac_check_lib_save_LIBS=$LIBS
9424LIBS="-lsendfile $LIBS"
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427
9428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431#ifdef __cplusplus
9432extern "C"
9433#endif
9434char sendfile ();
9435int
9436main ()
9437{
9438return sendfile ();
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443if ac_fn_c_try_link "$LINENO"; then :
9444 ac_cv_lib_sendfile_sendfile=yes
9445else
9446 ac_cv_lib_sendfile_sendfile=no
9447fi
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
9450LIBS=$ac_check_lib_save_LIBS
9451fi
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9453$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBSENDFILE 1
9457_ACEOF
9458
9459 LIBS="-lsendfile $LIBS"
9460
9461fi
9462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9464$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9498$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDL 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9509$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518/* Override any GCC internal prototype to avoid an error.
9519 Use char because int might match the return type of a GCC
9520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521#ifdef __cplusplus
9522extern "C"
9523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009524char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525int
9526main ()
9527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9543$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_LIBDLD 1
9547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551fi
9552 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009553
Michael Felt0d3ccb42017-12-30 22:39:20 +01009554# checks for uuid.h location
9555for ac_header in uuid/uuid.h uuid.h
9556do :
9557 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9558ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9559if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9560 cat >>confdefs.h <<_ACEOF
9561#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9562_ACEOF
9563
9564fi
9565
9566done
9567
9568
Berker Peksag9a10ff42017-11-08 23:09:16 +03009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9570$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572/* end confdefs.h. */
9573#include <uuid/uuid.h>
9574int
9575main ()
9576{
9577
9578#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009579void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009580#endif
9581
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586if ac_fn_c_try_compile "$LINENO"; then :
9587
9588$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9589
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9591$as_echo "yes" >&6; }
9592else
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594$as_echo "no" >&6; }
9595
9596fi
9597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9598
Michael Felt0d3ccb42017-12-30 22:39:20 +01009599# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009600# FreeBSD and OpenBSD provides support as well
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9602$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9604/* end confdefs.h. */
9605#include <uuid.h>
9606int
9607main ()
9608{
9609
9610#ifndef uuid_create
9611void *x = uuid_create
9612#endif
9613
9614 ;
9615 return 0;
9616}
9617_ACEOF
9618if ac_fn_c_try_compile "$LINENO"; then :
9619
9620$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9621
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9623$as_echo "yes" >&6; }
9624else
9625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627
9628fi
9629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9630
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009631# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9632# stream in big-endian byte-order
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9634$as_echo_n "checking for uuid_enc_be... " >&6; }
9635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9636/* end confdefs.h. */
9637#include <uuid.h>
9638int
9639main ()
9640{
9641
9642#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009643void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009644#endif
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650if ac_fn_c_try_compile "$LINENO"; then :
9651
9652$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9653
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9655$as_echo "yes" >&6; }
9656else
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658$as_echo "no" >&6; }
9659
9660fi
9661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9662
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009663# 'Real Time' functions on Solaris
9664# posix4 on Solaris 2.6
9665# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009667$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009668if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009670else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009671 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675/* Override any GCC internal prototype to avoid an error.
9676 Use char because int might match the return type of a GCC
9677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009678#ifdef __cplusplus
9679extern "C"
9680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009681char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682int
9683main ()
9684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ;
9687 return 0;
9688}
9689_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690for ac_lib in '' pthread rt posix4; do
9691 if test -z "$ac_lib"; then
9692 ac_res="none required"
9693 else
9694 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009695 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700rm -f core conftest.err conftest.$ac_objext \
9701 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009702 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705done
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708else
9709 ac_cv_search_sem_init=no
9710fi
9711rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009712LIBS=$ac_func_search_save_LIBS
9713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9715$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009717if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009719
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009720fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009721
Martin v. Löwis519adae2003-09-20 10:47:47 +00009722
Martin v. Löwis19d17342003-06-14 21:03:05 +00009723# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9725$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009726if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009728else
9729 ac_check_lib_save_LIBS=$LIBS
9730LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009732/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734/* Override any GCC internal prototype to avoid an error.
9735 Use char because int might match the return type of a GCC
9736 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009737#ifdef __cplusplus
9738extern "C"
9739#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009740char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009741int
9742main ()
9743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009745 ;
9746 return 0;
9747}
9748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009750 ac_cv_lib_intl_textdomain=yes
9751else
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009754rm -f core conftest.err conftest.$ac_objext \
9755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009756LIBS=$ac_check_lib_save_LIBS
9757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9759$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009760if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009761
Matthias Kloseb9621712010-04-24 17:59:49 +00009762$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009763
Brett Cannonc6d936e2009-06-07 20:09:53 +00009764 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009765fi
9766
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009767
9768# checks for system dependent C++ extensions support
9769case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009770 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9771$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009773/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009774
Georg Brandl59e87bd2011-02-15 19:48:59 +00009775 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009779loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ;
9781 return 0;
9782}
Matthias Kloseb159a552010-04-25 21:00:44 +00009783
Martin v. Löwis11437992002-04-12 09:54:03 +00009784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009785if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009786
Matthias Kloseb159a552010-04-25 21:00:44 +00009787
Matthias Kloseb9621712010-04-24 17:59:49 +00009788$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009789
Matthias Kloseb159a552010-04-25 21:00:44 +00009790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009791$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009792
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009793else
Matthias Kloseb159a552010-04-25 21:00:44 +00009794
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009796$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009797
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799rm -f core conftest.err conftest.$ac_objext \
9800 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009801 *) ;;
9802esac
9803
Christian Heimes985ecdc2013-11-20 11:46:18 +01009804# check for systems that require aligned memory access
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9806$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009807if ${ac_cv_aligned_required+:} false; then :
9808 $as_echo_n "(cached) " >&6
9809else
9810 if test "$cross_compiling" = yes; then :
9811 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009812else
9813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9814/* end confdefs.h. */
9815
9816int main()
9817{
9818 char s[16];
9819 int i, *p1, *p2;
9820 for (i=0; i < 16; i++)
9821 s[i] = i;
9822 p1 = (int*)(s+1);
9823 p2 = (int*)(s+2);
9824 if (*p1 == *p2)
9825 return 1;
9826 return 0;
9827}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009828_ACEOF
9829if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009830 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009831else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009832 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009833fi
9834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9835 conftest.$ac_objext conftest.beam conftest.$ac_ext
9836fi
9837
9838
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009839fi
9840
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9842$as_echo "$ac_cv_aligned_required" >&6; }
9843if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009844
9845$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9846
9847fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009848
9849# str, bytes and memoryview hash algorithm
9850
9851
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9853$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9854
9855# Check whether --with-hash_algorithm was given.
9856if test "${with_hash_algorithm+set}" = set; then :
9857 withval=$with_hash_algorithm;
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9859$as_echo "$withval" >&6; }
9860case "$withval" in
9861 siphash24)
9862 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9863
9864 ;;
9865 fnv)
9866 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9867
9868 ;;
9869 *)
9870 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9871 ;;
9872esac
9873
9874else
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9876$as_echo "default" >&6; }
9877fi
9878
9879
Charles-François Natalid30b0222014-05-08 23:08:51 +01009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9881$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9882
9883# Check whether --with-address_sanitizer was given.
9884if test "${with_address_sanitizer+set}" = set; then :
9885 withval=$with_address_sanitizer;
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9887$as_echo "$withval" >&6; }
9888BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9889LDFLAGS="-fsanitize=address $LDFLAGS"
9890
9891else
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
Guido van Rossum70c7f481998-03-26 18:44:10 +00009897# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9899$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009900if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009902else
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009904LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908/* Override any GCC internal prototype to avoid an error.
9909 Use char because int might match the return type of a GCC
9910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009911#ifdef __cplusplus
9912extern "C"
9913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009914char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009915int
9916main ()
9917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 ;
9920 return 0;
9921}
9922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009925else
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009928rm -f core conftest.err conftest.$ac_objext \
9929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9933$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009934if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009935 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009936fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009937 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9939$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009940if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009942else
Martin v. Löwis11437992002-04-12 09:54:03 +00009943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009944LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948/* Override any GCC internal prototype to avoid an error.
9949 Use char because int might match the return type of a GCC
9950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009951#ifdef __cplusplus
9952extern "C"
9953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009954char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009955int
9956main ()
9957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 ;
9960 return 0;
9961}
9962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009965else
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968rm -f core conftest.err conftest.$ac_objext \
9969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009970LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9973$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009974if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009975 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009976fi
9977 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009978
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9980$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9986$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009987LIBS="$withval $LIBS"
9988
9989else
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9991$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992fi
9993
Guido van Rossum7f43da71994-08-01 12:15:30 +00009994
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08009995
9996
9997
9998
9999
10000
10001
10002if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10003 if test -n "$ac_tool_prefix"; then
10004 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10005set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007$as_echo_n "checking for $ac_word... " >&6; }
10008if ${ac_cv_path_PKG_CONFIG+:} false; then :
10009 $as_echo_n "(cached) " >&6
10010else
10011 case $PKG_CONFIG in
10012 [\\/]* | ?:[\\/]*)
10013 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10014 ;;
10015 *)
10016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017for as_dir in $PATH
10018do
10019 IFS=$as_save_IFS
10020 test -z "$as_dir" && as_dir=.
10021 for ac_exec_ext in '' $ac_executable_extensions; do
10022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025 break 2
10026 fi
10027done
10028 done
10029IFS=$as_save_IFS
10030
10031 ;;
10032esac
10033fi
10034PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10035if test -n "$PKG_CONFIG"; then
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10037$as_echo "$PKG_CONFIG" >&6; }
10038else
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041fi
10042
10043
10044fi
10045if test -z "$ac_cv_path_PKG_CONFIG"; then
10046 ac_pt_PKG_CONFIG=$PKG_CONFIG
10047 # Extract the first word of "pkg-config", so it can be a program name with args.
10048set dummy pkg-config; ac_word=$2
10049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10050$as_echo_n "checking for $ac_word... " >&6; }
10051if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10052 $as_echo_n "(cached) " >&6
10053else
10054 case $ac_pt_PKG_CONFIG in
10055 [\\/]* | ?:[\\/]*)
10056 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10057 ;;
10058 *)
10059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10060for as_dir in $PATH
10061do
10062 IFS=$as_save_IFS
10063 test -z "$as_dir" && as_dir=.
10064 for ac_exec_ext in '' $ac_executable_extensions; do
10065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10066 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10068 break 2
10069 fi
10070done
10071 done
10072IFS=$as_save_IFS
10073
10074 ;;
10075esac
10076fi
10077ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10078if test -n "$ac_pt_PKG_CONFIG"; then
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10080$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10081else
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10083$as_echo "no" >&6; }
10084fi
10085
10086 if test "x$ac_pt_PKG_CONFIG" = x; then
10087 PKG_CONFIG=""
10088 else
10089 case $cross_compiling:$ac_tool_warned in
10090yes:)
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10092$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10093ac_tool_warned=yes ;;
10094esac
10095 PKG_CONFIG=$ac_pt_PKG_CONFIG
10096 fi
10097else
10098 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10099fi
10100
10101fi
10102if test -n "$PKG_CONFIG"; then
10103 _pkg_min_version=0.9.0
10104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10105$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10106 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10108$as_echo "yes" >&6; }
10109 else
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111$as_echo "no" >&6; }
10112 PKG_CONFIG=""
10113 fi
10114fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010115
10116# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10118$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010119
10120# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010122 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010123else
10124 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010125fi
10126
10127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10129$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010130
10131# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10133$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010134
10135# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010137 withval=$with_system_ffi;
10138fi
10139
10140
Zachary Waref40d4dd2016-09-17 01:25:24 -050010141if test "$ac_sys_system" = "Darwin"
10142then
10143 case "$with_system_ffi" in
10144 "")
10145 with_system_ffi="no"
10146 ;;
10147 yes|no)
10148 ;;
10149 *)
10150 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10151 ;;
10152 esac
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10154$as_echo "$with_system_ffi" >&6; }
10155else
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10157$as_echo "yes" >&6; }
10158 if test "$with_system_ffi" != ""
10159 then
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10161$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10162 fi
10163 with_system_ffi="yes"
10164fi
Zachary Ware935043d2016-09-09 17:01:21 -070010165
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010166if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010167 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10168else
10169 LIBFFI_INCLUDEDIR=""
10170fi
10171
10172
Stefan Krah60187b52012-03-23 19:06:27 +010010173# Check for use of the system libmpdec library
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10175$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10176
10177# Check whether --with-system_libmpdec was given.
10178if test "${with_system_libmpdec+set}" = set; then :
10179 withval=$with_system_libmpdec;
10180else
10181 with_system_libmpdec="no"
10182fi
10183
10184
10185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10186$as_echo "$with_system_libmpdec" >&6; }
10187
Benjamin Peterson076ed002010-10-31 17:11:02 +000010188# Check for support for loadable sqlite extensions
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10190$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10191# Check whether --enable-loadable-sqlite-extensions was given.
10192if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10193 enableval=$enable_loadable_sqlite_extensions;
10194else
10195 enable_loadable_sqlite_extensions="no"
10196fi
10197
10198
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10200$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10201
Ned Deilyd819b932013-09-06 01:07:05 -070010202# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10203
10204
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10206$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10207
10208# Check whether --with-tcltk-includes was given.
10209if test "${with_tcltk_includes+set}" = set; then :
10210 withval=$with_tcltk_includes;
10211else
10212 with_tcltk_includes="default"
10213fi
10214
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10216$as_echo "$with_tcltk_includes" >&6; }
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10218$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10219
10220# Check whether --with-tcltk-libs was given.
10221if test "${with_tcltk_libs+set}" = set; then :
10222 withval=$with_tcltk_libs;
10223else
10224 with_tcltk_libs="default"
10225fi
10226
10227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10228$as_echo "$with_tcltk_libs" >&6; }
10229if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10230then
10231 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10232 then
10233 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10234 fi
10235 TCLTK_INCLUDES=""
10236 TCLTK_LIBS=""
10237else
10238 TCLTK_INCLUDES="$with_tcltk_includes"
10239 TCLTK_LIBS="$with_tcltk_libs"
10240fi
10241
Matthias Klose55708cc2009-04-30 08:06:49 +000010242# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10244$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010245
10246# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010247if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010248 withval=$with_dbmliborder;
10249if test x$with_dbmliborder = xyes
10250then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010251as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010252else
10253 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10254 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10255 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010256 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010257 fi
10258 done
10259fi
10260fi
10261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10263$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
10267# Templates for things AC_DEFINEd more than once.
10268# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010269
10270
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010271if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010272then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010273 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010275
10276 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010277elif test "$ac_cv_kpthread" = "yes"
10278then
10279 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010280 if test "$ac_cv_cxx_thread" = "yes"; then
10281 CXX="$CXX -Kpthread"
10282 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010283 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010284elif test "$ac_cv_kthread" = "yes"
10285then
10286 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010287 if test "$ac_cv_cxx_thread" = "yes"; then
10288 CXX="$CXX -Kthread"
10289 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010290 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010291elif test "$ac_cv_pthread" = "yes"
10292then
10293 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010294 if test "$ac_cv_cxx_thread" = "yes"; then
10295 CXX="$CXX -pthread"
10296 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010297 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010298else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010299 if test ! -z "$withval" -a -d "$withval"
10300 then LDFLAGS="$LDFLAGS -L$withval"
10301 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010302
10303 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010304 # define _POSIX_THREADS in unistd.h. Some apparently don't
10305 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10307$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010310
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010311#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010312#ifdef _POSIX_THREADS
10313yes
10314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
10316_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010319 unistd_defines_pthreads=yes
10320else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010321 unistd_defines_pthreads=no
10322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010323rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10326$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010329
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010330 # Just looking for pthread_create in libpthread is not enough:
10331 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10332 # So we really have to include pthread.h, and then link.
10333 _libs=$LIBS
10334 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10336$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010339
10340#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010341#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010342
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010343void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
10346{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010347
10348pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10356$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010357 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010358
Guido van Rossum02a1c402000-02-25 19:26:31 +000010359else
Martin v. Löwis11437992002-04-12 09:54:03 +000010360
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010361 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010363if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010364
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010365 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010366
Guido van Rossumad678af1998-10-02 14:42:15 +000010367else
Guido van Rossumad678af1998-10-02 14:42:15 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10370$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010375LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379/* Override any GCC internal prototype to avoid an error.
10380 Use char because int might match the return type of a GCC
10381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010382#ifdef __cplusplus
10383extern "C"
10384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010385char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386int
10387main ()
10388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010399rm -f core conftest.err conftest.$ac_objext \
10400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010401LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10404$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010405if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010407 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010408 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010409
Greg Steinadf63d62000-07-05 10:38:09 +000010410else
Greg Steinadf63d62000-07-05 10:38:09 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10413$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010414if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010418LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422/* Override any GCC internal prototype to avoid an error.
10423 Use char because int might match the return type of a GCC
10424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425#ifdef __cplusplus
10426extern "C"
10427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010428char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010429int
10430main ()
10431{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010439else
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010442rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010444LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10447$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010448if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010450 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010451 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010452
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010453else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010454
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10456$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010457if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010459else
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010461LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465/* Override any GCC internal prototype to avoid an error.
10466 Use char because int might match the return type of a GCC
10467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010468#ifdef __cplusplus
10469extern "C"
10470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010471char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472int
10473main ()
10474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 ;
10477 return 0;
10478}
10479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010482else
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485rm -f core conftest.err conftest.$ac_objext \
10486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010487LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10490$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010491if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010493 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010494 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010495
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010496else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10499$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010500if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502else
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010504LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508/* Override any GCC internal prototype to avoid an error.
10509 Use char because int might match the return type of a GCC
10510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010511#ifdef __cplusplus
10512extern "C"
10513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010514char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010515int
10516main ()
10517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010528rm -f core conftest.err conftest.$ac_objext \
10529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010530LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10533$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010534if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010536 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010537 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010538
Guido van Rossumb93a8621998-05-07 13:27:32 +000010539else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010540
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010541 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10542
Guido van Rossum2d38f911996-06-26 19:47:01 +000010543fi
10544
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010546fi
10547
Guido van Rossum0be3e491997-05-22 20:33:33 +000010548fi
10549
Guido van Rossum49545951997-12-02 19:28:29 +000010550fi
10551
Guido van Rossumb93a8621998-05-07 13:27:32 +000010552fi
10553
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10559$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010560if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010562else
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010564LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568/* Override any GCC internal prototype to avoid an error.
10569 Use char because int might match the return type of a GCC
10570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010571#ifdef __cplusplus
10572extern "C"
10573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010574char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010575int
10576main ()
10577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 ;
10580 return 0;
10581}
10582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010588rm -f core conftest.err conftest.$ac_objext \
10589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010590LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10593$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010594if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595
Martin v. Löwis130fb172001-07-19 11:00:41 +000010596 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010597
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
10599
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010600
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603if test "$posix_threads" = "yes"; then
10604 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607
10608 fi
10609
10610 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10611 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010612 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615 ;;
10616 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010617$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618
10619 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010620 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010622
10623 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624 esac
10625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10627$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010628 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632 ac_cv_pthread_system_supported=no
10633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010636
10637 #include <stdio.h>
10638 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010639 void *foo(void *parm) {
10640 return NULL;
10641 }
10642 main() {
10643 pthread_attr_t attr;
10644 pthread_t id;
10645 if (pthread_attr_init(&attr)) exit(-1);
10646 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10647 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10648 exit(0);
10649 }
10650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010651if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652 ac_cv_pthread_system_supported=yes
10653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010658fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661fi
10662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10664$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665 if test "$ac_cv_pthread_system_supported" = "yes"; then
10666
Matthias Kloseb9621712010-04-24 17:59:49 +000010667$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668
10669 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 for ac_func in pthread_sigmask
10671do :
10672 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010673if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010677 case $ac_sys_system in
10678 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010681
10682 ;;
10683 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684fi
10685done
10686
pdoxe14679c2017-10-05 00:01:56 -070010687 for ac_func in pthread_getcpuclockid
10688do :
10689 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10690if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10691 cat >>confdefs.h <<_ACEOF
10692#define HAVE_PTHREAD_GETCPUCLOCKID 1
10693_ACEOF
10694
10695fi
10696done
10697
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698fi
10699
10700
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10704$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711 ipv6=no
10712 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10714$as_echo "yes" >&6; }
10715 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716
10717 ipv6=yes
10718 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720else
Martin v. Löwis11437992002-04-12 09:54:03 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724 /* AF_INET6 available check */
10725#include <sys/types.h>
10726#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010727int
10728main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010730int domain = AF_INET6;
10731 ;
10732 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733}
Martin v. Löwis11437992002-04-12 09:54:03 +000010734_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010735if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10738$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741else
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010746
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010750if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10752$as_echo_n "checking if RFC2553 API is available... " >&6; }
10753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010754/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010755
10756 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010758int
10759main ()
10760{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010761struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010762 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ;
10764 return 0;
10765}
Matthias Kloseb159a552010-04-25 21:00:44 +000010766
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010768if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 ipv6=yes
10773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774else
Matthias Kloseb159a552010-04-25 21:00:44 +000010775
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010777$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010778 ipv6=no
10779
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782fi
10783
10784if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010786
10787fi
10788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789fi
10790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791
10792ipv6type=unknown
10793ipv6lib=none
10794ipv6trylibc=no
10795
10796if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10798$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010799 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10800 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801 case $i in
10802 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010805
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806#include <netinet/in.h>
10807#ifdef IPV6_INRIA_VERSION
10808yes
10809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010813 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010815rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816
10817 ;;
10818 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822#include <netinet/in.h>
10823#ifdef __KAME__
10824yes
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6type=$i;
10830 ipv6lib=inet6
10831 ipv6libdir=/usr/local/v6/lib
10832 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010834rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835
10836 ;;
10837 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <features.h>
10842#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010851rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852
10853 ;;
10854 linux-inet6)
10855 if test -d /usr/inet6; then
10856 ipv6type=$i
10857 ipv6lib=inet6
10858 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010859 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860 fi
10861 ;;
10862 solaris)
10863 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010864 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865 ipv6type=$i
10866 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 fi
10868 fi
10869 ;;
10870 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874#include <sys/param.h>
10875#ifdef _TOSHIBA_INET6
10876yes
10877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 ipv6type=$i;
10882 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010883 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010885rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886
10887 ;;
10888 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010891
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892#include </usr/local/v6/include/sys/v6config.h>
10893#ifdef __V6D__
10894yes
10895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010896_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899 ipv6type=$i;
10900 ipv6lib=v6;
10901 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010902 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010904rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905
10906 ;;
10907 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include <sys/param.h>
10912#ifdef _ZETA_MINAMI_INET6
10913yes
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918 ipv6type=$i;
10919 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010920 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010922rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923
10924 ;;
10925 esac
10926 if test "$ipv6type" != "unknown"; then
10927 break
10928 fi
10929 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10931$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932fi
10933
10934if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10935 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10936 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10937 echo "using lib$ipv6lib"
10938 else
10939 if test $ipv6trylibc = "yes"; then
10940 echo "using libc"
10941 else
10942 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10943 echo "You need to fetch lib$ipv6lib.a from appropriate"
10944 echo 'ipv6 kit and compile beforehand.'
10945 exit 1
10946 fi
10947 fi
10948fi
10949
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10951$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953/* end confdefs.h. */
10954 /* CAN_RAW_FD_FRAMES available check */
10955#include <linux/can/raw.h>
10956int
10957main ()
10958{
10959int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964if ac_fn_c_try_compile "$LINENO"; then :
10965
10966
10967$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10968
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10970$as_echo "yes" >&6; }
10971
10972else
10973
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
10976
10977fi
10978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10979
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010980# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10982$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986 withval=$with_doc_strings;
10987fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010989
10990if test -z "$with_doc_strings"
10991then with_doc_strings="yes"
10992fi
10993if test "$with_doc_strings" != "no"
10994then
10995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
10998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11000$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011001
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011002# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11004$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011007if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008 withval=$with_pymalloc;
11009fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011010
Neil Schemenauera35c6882001-02-27 04:45:05 +000011011
Neil Schemenauer16c22972002-03-22 15:34:49 +000011012if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011013then
11014 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011015fi
11016if test "$with_pymalloc" != "no"
11017then
Martin v. Löwis11437992002-04-12 09:54:03 +000011018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011020
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011021 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11024$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011025
Nick Coghlan6ea41862017-06-11 13:16:15 +100011026# Check for --with-c-locale-coercion
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11028$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11029
11030# Check whether --with-c-locale-coercion was given.
11031if test "${with_c_locale_coercion+set}" = set; then :
11032 withval=$with_c_locale_coercion;
11033fi
11034
11035
11036if test -z "$with_c_locale_coercion"
11037then
11038 with_c_locale_coercion="yes"
11039fi
11040if test "$with_c_locale_coercion" != "no"
11041then
11042
11043$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11044
11045fi
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11047$as_echo "$with_c_locale_coercion" >&6; }
11048
11049# Check for --with-c-locale-warning
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11051$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11052
11053# Check whether --with-c-locale-warning was given.
11054if test "${with_c_locale_warning+set}" = set; then :
11055 withval=$with_c_locale_warning;
11056fi
11057
11058
11059if test -z "$with_c_locale_warning"
11060then
11061 with_c_locale_warning="yes"
11062fi
11063if test "$with_c_locale_warning" != "no"
11064then
11065
11066$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11067
11068fi
11069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11070$as_echo "$with_c_locale_warning" >&6; }
11071
Benjamin Peterson05159c42009-12-03 03:01:27 +000011072# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11074$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075
11076# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011077if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011078 withval=$with_valgrind;
11079else
11080 with_valgrind=no
11081fi
11082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11084$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011085if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 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 +020011087if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011088
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011090
11091else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011092 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011093
11094fi
11095
11096
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011097 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011098fi
11099
Łukasz Langaa785c872016-09-09 17:37:37 -070011100# Check for DTrace support
11101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11102$as_echo_n "checking for --with-dtrace... " >&6; }
11103
11104# Check whether --with-dtrace was given.
11105if test "${with_dtrace+set}" = set; then :
11106 withval=$with_dtrace;
11107else
11108 with_dtrace=no
11109fi
11110
11111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11112$as_echo "$with_dtrace" >&6; }
11113
11114
11115
11116
11117
11118DTRACE=
11119DFLAGS=
11120DTRACE_HEADERS=
11121DTRACE_OBJS=
11122
11123if test "$with_dtrace" = "yes"
11124then
11125 # Extract the first word of "dtrace", so it can be a program name with args.
11126set dummy dtrace; ac_word=$2
11127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11128$as_echo_n "checking for $ac_word... " >&6; }
11129if ${ac_cv_path_DTRACE+:} false; then :
11130 $as_echo_n "(cached) " >&6
11131else
11132 case $DTRACE in
11133 [\\/]* | ?:[\\/]*)
11134 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11135 ;;
11136 *)
11137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11138for as_dir in $PATH
11139do
11140 IFS=$as_save_IFS
11141 test -z "$as_dir" && as_dir=.
11142 for ac_exec_ext in '' $ac_executable_extensions; do
11143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11144 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11146 break 2
11147 fi
11148done
11149 done
11150IFS=$as_save_IFS
11151
11152 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11153 ;;
11154esac
11155fi
11156DTRACE=$ac_cv_path_DTRACE
11157if test -n "$DTRACE"; then
11158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11159$as_echo "$DTRACE" >&6; }
11160else
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11162$as_echo "no" >&6; }
11163fi
11164
11165
11166 if test "$DTRACE" = "not found"; then
11167 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11168 fi
11169
11170$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11171
11172 DTRACE_HEADERS="Include/pydtrace_probes.h"
11173
11174 # On OS X, DTrace providers do not need to be explicitly compiled and
11175 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11176 # generation flag '-G'. We check for presence of this flag, rather than
11177 # hardcoding support by OS, in the interest of robustness.
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11179$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11180if ${ac_cv_dtrace_link+:} false; then :
11181 $as_echo_n "(cached) " >&6
11182else
11183 ac_cv_dtrace_link=no
11184 echo 'BEGIN' > conftest.d
11185 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11186 ac_cv_dtrace_link=yes
11187
11188fi
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11190$as_echo "$ac_cv_dtrace_link" >&6; }
11191 if test "$ac_cv_dtrace_link" = "yes"; then
11192 DTRACE_OBJS="Python/pydtrace.o"
11193 fi
11194fi
11195
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011196# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011197
Guido van Rossum98935bf2001-09-05 19:13:16 +000011198DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011199
Guido van Rossume97ee181999-12-20 21:27:22 +000011200# the dlopen() function means we might want to use dynload_shlib.o. some
11201# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011202for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011203do :
11204 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011205if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011206 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011207#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011209
Guido van Rossume97ee181999-12-20 21:27:22 +000011210fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011211done
Guido van Rossume97ee181999-12-20 21:27:22 +000011212
Michael W. Hudson54241132001-12-07 15:38:26 +000011213
Guido van Rossume97ee181999-12-20 21:27:22 +000011214# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11215# loading of modules.
11216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11218$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011219if test -z "$DYNLOADFILE"
11220then
11221 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011222 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11223 if test "$ac_cv_func_dlopen" = yes
11224 then DYNLOADFILE="dynload_shlib.o"
11225 else DYNLOADFILE="dynload_aix.o"
11226 fi
11227 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011228 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011229 *)
11230 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11231 # out any dynamic loading
11232 if test "$ac_cv_func_dlopen" = yes
11233 then DYNLOADFILE="dynload_shlib.o"
11234 else DYNLOADFILE="dynload_stub.o"
11235 fi
11236 ;;
11237 esac
11238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11240$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011241if test "$DYNLOADFILE" != "dynload_stub.o"
11242then
Martin v. Löwis11437992002-04-12 09:54:03 +000011243
Matthias Kloseb9621712010-04-24 17:59:49 +000011244$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011245
11246fi
11247
Neil Schemenauer4e425612001-06-19 15:44:15 +000011248# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11249
Michael W. Hudson54241132001-12-07 15:38:26 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11252$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011253if test -z "$MACHDEP_OBJS"
11254then
Jack Jansene578a632001-08-15 01:27:14 +000011255 MACHDEP_OBJS=$extra_machdep_objs
11256else
11257 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011258fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011259if test -z "$MACHDEP_OBJS"; then
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11261$as_echo "none" >&6; }
11262else
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11264$as_echo "$MACHDEP_OBJS" >&6; }
11265fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011266
Guido van Rossum627b2d71993-12-24 10:39:16 +000011267# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011268for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011269 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011270 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011271 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011272 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011273 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011274 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011275 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011276 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011277 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011278 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011279 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011280 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011281 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011282 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011283 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11284 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011285 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011286 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011287 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011288 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011289 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011290do :
11291 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11292ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011293if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011294 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011296_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011297
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011298fi
11299done
11300
Michael W. Hudson54241132001-12-07 15:38:26 +000011301
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011302ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11303 #include <dirent.h>
11304"
11305if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11306
11307$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11308
11309fi
11310
11311
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312# For some functions, having a definition is not sufficient, since
11313# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11315$as_echo_n "checking for chroot... " >&6; }
11316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319int
11320main ()
11321{
11322void *x=chroot
11323 ;
11324 return 0;
11325}
11326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
Matthias Kloseb159a552010-04-25 21:00:44 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333else
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011336
11337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11340$as_echo_n "checking for link... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344int
11345main ()
11346{
11347void *x=link
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358else
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011361
11362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11365$as_echo_n "checking for symlink... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369int
11370main ()
11371{
11372void *x=symlink
11373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380
Matthias Kloseb159a552010-04-25 21:00:44 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011383else
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386
11387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11390$as_echo_n "checking for fchdir... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393#include <unistd.h>
11394int
11395main ()
11396{
11397void *x=fchdir
11398 ;
11399 return 0;
11400}
11401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408else
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011411
11412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11415$as_echo_n "checking for fsync... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011417/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418#include <unistd.h>
11419int
11420main ()
11421{
11422void *x=fsync
11423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
Matthias Kloseb159a552010-04-25 21:00:44 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011436
11437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11440$as_echo_n "checking for fdatasync... " >&6; }
11441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011442/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443#include <unistd.h>
11444int
11445main ()
11446{
11447void *x=fdatasync
11448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455
Matthias Kloseb159a552010-04-25 21:00:44 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011458else
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011461
11462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11465$as_echo_n "checking for epoll... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467/* end confdefs.h. */
11468#include <sys/epoll.h>
11469int
11470main ()
11471{
11472void *x=epoll_create
11473 ;
11474 return 0;
11475}
11476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011480
Matthias Kloseb159a552010-04-25 21:00:44 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011482$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483else
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011486
11487fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11490$as_echo_n "checking for epoll_create1... " >&6; }
11491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11492/* end confdefs.h. */
11493#include <sys/epoll.h>
11494int
11495main ()
11496{
11497void *x=epoll_create1
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502if ac_fn_c_try_compile "$LINENO"; then :
11503
11504$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11505
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11507$as_echo "yes" >&6; }
11508else
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
11511
11512fi
11513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11515$as_echo_n "checking for kqueue... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011517/* end confdefs.h. */
11518
11519#include <sys/types.h>
11520#include <sys/event.h>
11521
11522int
11523main ()
11524{
11525int x=kqueue()
11526 ;
11527 return 0;
11528}
11529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011533
Matthias Kloseb159a552010-04-25 21:00:44 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011535$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011536else
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11538$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011539
11540fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11543$as_echo_n "checking for prlimit... " >&6; }
11544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11545/* end confdefs.h. */
11546
11547#include <sys/time.h>
11548#include <sys/resource.h>
11549
11550int
11551main ()
11552{
11553void *x=prlimit
11554 ;
11555 return 0;
11556}
11557_ACEOF
11558if ac_fn_c_try_compile "$LINENO"; then :
11559
11560$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11561
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11563$as_echo "yes" >&6; }
11564else
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11566$as_echo "no" >&6; }
11567
11568fi
11569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11570
Martin v. Löwisd5843682002-11-21 20:41:28 +000011571# On some systems (eg. FreeBSD 5), we would find a definition of the
11572# functions ctermid_r, setgroups in the library, but no prototype
11573# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11574# address to avoid compiler warnings and potential miscompilations
11575# because of the missing prototypes.
11576
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11578$as_echo_n "checking for ctermid_r... " >&6; }
11579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011580/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011581
Martin v. Löwisd5843682002-11-21 20:41:28 +000011582#include <stdio.h>
11583
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584int
11585main ()
11586{
11587void* p = ctermid_r
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11604
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11606$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608 $as_echo_n "(cached) " >&6
11609else
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011612#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011613int
11614main ()
11615{
11616void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011617
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011623 ac_cv_flock_decl=yes
11624else
11625 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011629
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011630fi
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11632$as_echo "$ac_cv_flock_decl" >&6; }
11633if test "x${ac_cv_flock_decl}" = xyes; then
11634 for ac_func in flock
11635do :
11636 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011637if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011638 cat >>confdefs.h <<_ACEOF
11639#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011640_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011641
Antoine Pitroua3000072010-09-07 14:52:42 +000011642else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011644$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011645if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011646 $as_echo_n "(cached) " >&6
11647else
11648 ac_check_lib_save_LIBS=$LIBS
11649LIBS="-lbsd $LIBS"
11650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651/* end confdefs.h. */
11652
11653/* Override any GCC internal prototype to avoid an error.
11654 Use char because int might match the return type of a GCC
11655 builtin and then its argument prototype would still apply. */
11656#ifdef __cplusplus
11657extern "C"
11658#endif
11659char flock ();
11660int
11661main ()
11662{
11663return flock ();
11664 ;
11665 return 0;
11666}
11667_ACEOF
11668if ac_fn_c_try_link "$LINENO"; then :
11669 ac_cv_lib_bsd_flock=yes
11670else
11671 ac_cv_lib_bsd_flock=no
11672fi
11673rm -f core conftest.err conftest.$ac_objext \
11674 conftest$ac_exeext conftest.$ac_ext
11675LIBS=$ac_check_lib_save_LIBS
11676fi
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11678$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011679if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011680 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011681
11682
11683$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11684
11685
11686fi
11687
11688
11689fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011690done
11691
Antoine Pitroua3000072010-09-07 14:52:42 +000011692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11695$as_echo_n "checking for getpagesize... " >&6; }
11696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011698
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011699#include <unistd.h>
11700
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701int
11702main ()
11703{
11704void* p = getpagesize
11705 ;
11706 return 0;
11707}
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011712
Matthias Kloseb159a552010-04-25 21:00:44 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011718
11719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011721
Victor Stinner984890f2011-11-24 13:53:38 +010011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11723$as_echo_n "checking for broken unsetenv... " >&6; }
11724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11725/* end confdefs.h. */
11726
11727#include <stdlib.h>
11728
11729int
11730main ()
11731{
11732int res = unsetenv("DUMMY")
11733 ;
11734 return 0;
11735}
11736_ACEOF
11737if ac_fn_c_try_compile "$LINENO"; then :
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
11740else
11741
11742$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11743
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11745$as_echo "yes" >&6; }
11746
11747fi
11748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11749
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011750for ac_prog in true
11751do
11752 # Extract the first word of "$ac_prog", so it can be a program name with args.
11753set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011758else
11759 if test -n "$TRUE"; then
11760 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11761else
11762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765 IFS=$as_save_IFS
11766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011769 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 $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 +000011771 break 2
11772 fi
11773done
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011776
11777fi
11778fi
11779TRUE=$ac_cv_prog_TRUE
11780if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11782$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11785$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011786fi
11787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011788
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011789 test -n "$TRUE" && break
11790done
11791test -n "$TRUE" || TRUE="/bin/true"
11792
11793
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11795$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798else
11799 ac_check_lib_save_LIBS=$LIBS
11800LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804/* Override any GCC internal prototype to avoid an error.
11805 Use char because int might match the return type of a GCC
11806 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011807#ifdef __cplusplus
11808extern "C"
11809#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811int
11812main ()
11813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815 ;
11816 return 0;
11817}
11818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011819if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820 ac_cv_lib_c_inet_aton=yes
11821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011824rm -f core conftest.err conftest.$ac_objext \
11825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826LIBS=$ac_check_lib_save_LIBS
11827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11829$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011831 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11834$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837else
11838 ac_check_lib_save_LIBS=$LIBS
11839LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011841/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843/* Override any GCC internal prototype to avoid an error.
11844 Use char because int might match the return type of a GCC
11845 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011846#ifdef __cplusplus
11847extern "C"
11848#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011850int
11851main ()
11852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854 ;
11855 return 0;
11856}
11857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011859 ac_cv_lib_resolv_inet_aton=yes
11860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011863rm -f core conftest.err conftest.$ac_objext \
11864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011865LIBS=$ac_check_lib_save_LIBS
11866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11868$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011870 cat >>confdefs.h <<_ACEOF
11871#define HAVE_LIBRESOLV 1
11872_ACEOF
11873
11874 LIBS="-lresolv $LIBS"
11875
11876fi
11877
11878
11879fi
11880
11881
Christian Heimesd0764e22007-12-04 15:00:33 +000011882# On Tru64, chflags seems to be present, but calling it will
11883# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11885$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011890 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011891else
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011893/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011894
Christian Heimesd0764e22007-12-04 15:00:33 +000011895#include <sys/stat.h>
11896#include <unistd.h>
11897int main(int argc, char*argv[])
11898{
11899 if(chflags(argv[0], 0) != 0)
11900 return 1;
11901 return 0;
11902}
Ned Deily3eb67d52011-06-28 00:00:28 -070011903
Christian Heimesd0764e22007-12-04 15:00:33 +000011904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011912fi
11913
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11917$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011918if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011921 ac_cv_have_chflags="yes"
11922else
11923 ac_cv_have_chflags="no"
11924fi
11925
11926fi
11927if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011930
11931fi
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11934$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011939 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011942/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011943
Christian Heimesd0764e22007-12-04 15:00:33 +000011944#include <sys/stat.h>
11945#include <unistd.h>
11946int main(int argc, char*argv[])
11947{
11948 if(lchflags(argv[0], 0) != 0)
11949 return 1;
11950 return 0;
11951}
Ned Deily3eb67d52011-06-28 00:00:28 -070011952
Christian Heimesd0764e22007-12-04 15:00:33 +000011953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011954if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011961fi
11962
11963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11966$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011967if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011970 ac_cv_have_lchflags="yes"
11971else
11972 ac_cv_have_lchflags="no"
11973fi
11974
11975fi
11976if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979
11980fi
11981
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011982case $ac_sys_system/$ac_sys_release in
11983Darwin/*)
11984 _CUR_CFLAGS="${CFLAGS}"
11985 _CUR_LDFLAGS="${LDFLAGS}"
11986 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11987 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11988 ;;
11989esac
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11992$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011993if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011995else
11996 ac_check_lib_save_LIBS=$LIBS
11997LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999/* end confdefs.h. */
12000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001/* Override any GCC internal prototype to avoid an error.
12002 Use char because int might match the return type of a GCC
12003 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012004#ifdef __cplusplus
12005extern "C"
12006#endif
12007char inflateCopy ();
12008int
12009main ()
12010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012012 ;
12013 return 0;
12014}
12015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012016if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012017 ac_cv_lib_z_inflateCopy=yes
12018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012021rm -f core conftest.err conftest.$ac_objext \
12022 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012023LIBS=$ac_check_lib_save_LIBS
12024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12026$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012027if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012030
12031fi
12032
12033
12034case $ac_sys_system/$ac_sys_release in
12035Darwin/*)
12036 CFLAGS="${_CUR_CFLAGS}"
12037 LDFLAGS="${_CUR_LDFLAGS}"
12038 ;;
12039esac
12040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12042$as_echo_n "checking for hstrerror... " >&6; }
12043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012044/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012045
Martin v. Löwise9416172003-05-03 10:12:45 +000012046#include <netdb.h>
12047
Martin v. Löwise9416172003-05-03 10:12:45 +000012048int
12049main ()
12050{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012051void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012059
Matthias Kloseb159a552010-04-25 21:00:44 +000012060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012061$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12064$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012065
12066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012067rm -f core conftest.err conftest.$ac_objext \
12068 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12071$as_echo_n "checking for inet_aton... " >&6; }
12072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012074
Martin v. Löwis86d66262006-02-17 08:40:11 +000012075#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012076#include <sys/socket.h>
12077#include <netinet/in.h>
12078#include <arpa/inet.h>
12079
Martin v. Löwise9416172003-05-03 10:12:45 +000012080int
12081main ()
12082{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012084 ;
12085 return 0;
12086}
12087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012091
Matthias Kloseb159a552010-04-25 21:00:44 +000012092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12096$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012097
12098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099rm -f core conftest.err conftest.$ac_objext \
12100 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12103$as_echo_n "checking for inet_pton... " >&6; }
12104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012105/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012106
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012107#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012108#include <sys/socket.h>
12109#include <netinet/in.h>
12110#include <arpa/inet.h>
12111
Martin v. Löwise9416172003-05-03 10:12:45 +000012112int
12113main ()
12114{
12115void* p = inet_pton
12116 ;
12117 return 0;
12118}
12119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012120if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012123
Matthias Kloseb159a552010-04-25 21:00:44 +000012124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012125$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12128$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012129
12130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012132
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012133# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12135$as_echo_n "checking for setgroups... " >&6; }
12136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012139#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012140#ifdef HAVE_GRP_H
12141#include <grp.h>
12142#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
Martin v. Löwisd5843682002-11-21 20:41:28 +000012144int
12145main ()
12146{
12147void* p = setgroups
12148 ;
12149 return 0;
12150}
12151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012155
Matthias Kloseb159a552010-04-25 21:00:44 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012161
12162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012164
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012165# check for openpty and forkpty
12166
12167for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012168do :
12169 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012170if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012172#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012173_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012174
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12177$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012180else
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186/* Override any GCC internal prototype to avoid an error.
12187 Use char because int might match the return type of a GCC
12188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012189#ifdef __cplusplus
12190extern "C"
12191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012192char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012193int
12194main ()
12195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 ;
12198 return 0;
12199}
12200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012206rm -f core conftest.err conftest.$ac_objext \
12207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012208LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12211$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012212if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215else
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12217$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012218if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220else
12221 ac_check_lib_save_LIBS=$LIBS
12222LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012224/* end confdefs.h. */
12225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226/* Override any GCC internal prototype to avoid an error.
12227 Use char because int might match the return type of a GCC
12228 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012229#ifdef __cplusplus
12230extern "C"
12231#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012232char openpty ();
12233int
12234main ()
12235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012237 ;
12238 return 0;
12239}
12240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242 ac_cv_lib_bsd_openpty=yes
12243else
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246rm -f core conftest.err conftest.$ac_objext \
12247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012248LIBS=$ac_check_lib_save_LIBS
12249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12251$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254 LIBS="$LIBS -lbsd"
12255fi
12256
12257
12258fi
12259
Fred Drake8cef4cf2000-06-28 16:40:38 +000012260
12261fi
12262done
12263
12264for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012265do :
12266 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012267if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012271
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12274$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012277else
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283/* Override any GCC internal prototype to avoid an error.
12284 Use char because int might match the return type of a GCC
12285 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012286#ifdef __cplusplus
12287extern "C"
12288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012289char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012290int
12291main ()
12292{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 ;
12295 return 0;
12296}
12297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012298if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012300else
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012303rm -f core conftest.err conftest.$ac_objext \
12304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012305LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12308$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12314$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012315if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012317else
12318 ac_check_lib_save_LIBS=$LIBS
12319LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321/* end confdefs.h. */
12322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323/* Override any GCC internal prototype to avoid an error.
12324 Use char because int might match the return type of a GCC
12325 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012326#ifdef __cplusplus
12327extern "C"
12328#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012329char forkpty ();
12330int
12331main ()
12332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012339 ac_cv_lib_bsd_forkpty=yes
12340else
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012343rm -f core conftest.err conftest.$ac_objext \
12344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012345LIBS=$ac_check_lib_save_LIBS
12346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12348$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012349if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012351 LIBS="$LIBS -lbsd"
12352fi
12353
12354
12355fi
12356
Fred Drake8cef4cf2000-06-28 16:40:38 +000012357
12358fi
12359done
12360
Jack Jansendd19cf82001-12-06 22:36:17 +000012361
Michael W. Hudson54241132001-12-07 15:38:26 +000012362# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012363for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012364do :
12365 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12366ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012367if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012371
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373done
12374
Michael W. Hudson54241132001-12-07 15:38:26 +000012375
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012376ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012378 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012379
Martin v. Löwis1142de32002-03-29 16:28:31 +000012380else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012382 *" dup2.$ac_objext "* ) ;;
12383 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012385esac
12386
Martin v. Löwis1142de32002-03-29 16:28:31 +000012387fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012388
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012389ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012390if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012391 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12392
12393else
12394 case " $LIBOBJS " in
12395 *" strdup.$ac_objext "* ) ;;
12396 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12397 ;;
12398esac
12399
12400fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012401
12402
12403for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012404do :
12405 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012407 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012411/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012413int
12414main ()
12415{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012424
Guido van Rossum627b2d71993-12-24 10:39:16 +000012425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012429done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430
Jack Jansen150753c2003-03-29 22:07:47 +000012431for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012432do :
12433 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012434if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012440#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012441int
12442main ()
12443{
12444setpgrp(0,0);
12445 ;
12446 return 0;
12447}
12448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012452
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012455
12456fi
12457done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012458
Thomas Wouters3a584202000-08-05 23:28:51 +000012459for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012460do :
12461 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012462if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012469int
12470main ()
12471{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012472gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_compile "$LINENO"; then :
12478
Guido van Rossum627b2d71993-12-24 10:39:16 +000012479else
Skip Montanaro6dead952003-09-25 14:50:04 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Guido van Rossum627b2d71993-12-24 10:39:16 +000012484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012488done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489
Michael W. Hudson54241132001-12-07 15:38:26 +000012490
Victor Stinnere0be4232011-10-25 13:06:09 +020012491for ac_func in clock_gettime
12492do :
12493 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12494if test "x$ac_cv_func_clock_gettime" = xyes; then :
12495 cat >>confdefs.h <<_ACEOF
12496#define HAVE_CLOCK_GETTIME 1
12497_ACEOF
12498
12499else
12500
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12502$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12503if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12504 $as_echo_n "(cached) " >&6
12505else
12506 ac_check_lib_save_LIBS=$LIBS
12507LIBS="-lrt $LIBS"
12508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509/* end confdefs.h. */
12510
12511/* Override any GCC internal prototype to avoid an error.
12512 Use char because int might match the return type of a GCC
12513 builtin and then its argument prototype would still apply. */
12514#ifdef __cplusplus
12515extern "C"
12516#endif
12517char clock_gettime ();
12518int
12519main ()
12520{
12521return clock_gettime ();
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_lib_rt_clock_gettime=yes
12528else
12529 ac_cv_lib_rt_clock_gettime=no
12530fi
12531rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
12533LIBS=$ac_check_lib_save_LIBS
12534fi
12535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12536$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12537if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12538
Victor Stinner7efb8332014-08-29 15:41:08 +020012539 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012540 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12541
12542
12543$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12544
12545
12546fi
12547
12548
12549fi
12550done
12551
12552
12553for ac_func in clock_getres
12554do :
12555 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12556if test "x$ac_cv_func_clock_getres" = xyes; then :
12557 cat >>confdefs.h <<_ACEOF
12558#define HAVE_CLOCK_GETRES 1
12559_ACEOF
12560
12561else
12562
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12564$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12565if ${ac_cv_lib_rt_clock_getres+:} false; then :
12566 $as_echo_n "(cached) " >&6
12567else
12568 ac_check_lib_save_LIBS=$LIBS
12569LIBS="-lrt $LIBS"
12570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571/* end confdefs.h. */
12572
12573/* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
12576#ifdef __cplusplus
12577extern "C"
12578#endif
12579char clock_getres ();
12580int
12581main ()
12582{
12583return clock_getres ();
12584 ;
12585 return 0;
12586}
12587_ACEOF
12588if ac_fn_c_try_link "$LINENO"; then :
12589 ac_cv_lib_rt_clock_getres=yes
12590else
12591 ac_cv_lib_rt_clock_getres=no
12592fi
12593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
12595LIBS=$ac_check_lib_save_LIBS
12596fi
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12598$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12599if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12600
12601 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12602
12603
12604fi
12605
12606
12607fi
12608done
12609
12610
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012611for ac_func in clock_settime
12612do :
12613 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12614if test "x$ac_cv_func_clock_settime" = xyes; then :
12615 cat >>confdefs.h <<_ACEOF
12616#define HAVE_CLOCK_SETTIME 1
12617_ACEOF
12618
12619else
12620
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12622$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12623if ${ac_cv_lib_rt_clock_settime+:} false; then :
12624 $as_echo_n "(cached) " >&6
12625else
12626 ac_check_lib_save_LIBS=$LIBS
12627LIBS="-lrt $LIBS"
12628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12629/* end confdefs.h. */
12630
12631/* Override any GCC internal prototype to avoid an error.
12632 Use char because int might match the return type of a GCC
12633 builtin and then its argument prototype would still apply. */
12634#ifdef __cplusplus
12635extern "C"
12636#endif
12637char clock_settime ();
12638int
12639main ()
12640{
12641return clock_settime ();
12642 ;
12643 return 0;
12644}
12645_ACEOF
12646if ac_fn_c_try_link "$LINENO"; then :
12647 ac_cv_lib_rt_clock_settime=yes
12648else
12649 ac_cv_lib_rt_clock_settime=no
12650fi
12651rm -f core conftest.err conftest.$ac_objext \
12652 conftest$ac_exeext conftest.$ac_ext
12653LIBS=$ac_check_lib_save_LIBS
12654fi
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12656$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12657if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12658
12659 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12660
12661
12662fi
12663
12664
12665fi
12666done
12667
12668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12670$as_echo_n "checking for major... " >&6; }
12671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012672/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012673
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012674#if defined(MAJOR_IN_MKDEV)
12675#include <sys/mkdev.h>
12676#elif defined(MAJOR_IN_SYSMACROS)
12677#include <sys/sysmacros.h>
12678#else
12679#include <sys/types.h>
12680#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012682int
12683main ()
12684{
12685
12686 makedev(major(0),minor(0));
12687
12688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012693
12694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12698$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012699
12700else
Skip Montanaro6dead952003-09-25 14:50:04 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12703$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012704
12705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012706rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012708
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012709# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012710# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12712$as_echo_n "checking for getaddrinfo... " >&6; }
12713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012715
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012716#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012717#include <sys/socket.h>
12718#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012719#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012724getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ;
12726 return 0;
12727}
12728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012730 have_getaddrinfo=yes
12731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012734rm -f core conftest.err conftest.$ac_objext \
12735 conftest$ac_exeext conftest.$ac_ext
12736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12737$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012738if test $have_getaddrinfo = yes
12739then
Matthias Kloseb9621712010-04-24 17:59:49 +000012740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12741$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012742 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012746
12747if test "${enable_ipv6+set}" = set; then
12748 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12749else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012750 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012751fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012755
Stefan Krah19c21392012-11-22 23:47:32 +010012756#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012757#include <sys/types.h>
12758#include <netdb.h>
12759#include <string.h>
12760#include <sys/socket.h>
12761#include <netinet/in.h>
12762
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012763int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012764{
12765 int passive, gaierr, inet4 = 0, inet6 = 0;
12766 struct addrinfo hints, *ai, *aitop;
12767 char straddr[INET6_ADDRSTRLEN], strport[16];
12768
12769 for (passive = 0; passive <= 1; passive++) {
12770 memset(&hints, 0, sizeof(hints));
12771 hints.ai_family = AF_UNSPEC;
12772 hints.ai_flags = passive ? AI_PASSIVE : 0;
12773 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012774 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12776 (void)gai_strerror(gaierr);
12777 goto bad;
12778 }
12779 for (ai = aitop; ai; ai = ai->ai_next) {
12780 if (ai->ai_addr == NULL ||
12781 ai->ai_addrlen == 0 ||
12782 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12783 straddr, sizeof(straddr), strport, sizeof(strport),
12784 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12785 goto bad;
12786 }
12787 switch (ai->ai_family) {
12788 case AF_INET:
12789 if (strcmp(strport, "54321") != 0) {
12790 goto bad;
12791 }
12792 if (passive) {
12793 if (strcmp(straddr, "0.0.0.0") != 0) {
12794 goto bad;
12795 }
12796 } else {
12797 if (strcmp(straddr, "127.0.0.1") != 0) {
12798 goto bad;
12799 }
12800 }
12801 inet4++;
12802 break;
12803 case AF_INET6:
12804 if (strcmp(strport, "54321") != 0) {
12805 goto bad;
12806 }
12807 if (passive) {
12808 if (strcmp(straddr, "::") != 0) {
12809 goto bad;
12810 }
12811 } else {
12812 if (strcmp(straddr, "::1") != 0) {
12813 goto bad;
12814 }
12815 }
12816 inet6++;
12817 break;
12818 case AF_UNSPEC:
12819 goto bad;
12820 break;
12821 default:
12822 /* another family support? */
12823 break;
12824 }
12825 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012826 freeaddrinfo(aitop);
12827 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012828 }
12829
12830 if (!(inet4 == 0 || inet4 == 2))
12831 goto bad;
12832 if (!(inet6 == 0 || inet6 == 2))
12833 goto bad;
12834
12835 if (aitop)
12836 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012837 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012838
12839 bad:
12840 if (aitop)
12841 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012842 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012843}
12844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012847 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012855fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012856
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12860$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12861
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012862if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012863then
12864 if test $ipv6 = yes
12865 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012866 echo 'Fatal: You must get working getaddrinfo() function.'
12867 echo ' or you can specify "--disable-ipv6"'.
12868 exit 1
12869 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012870else
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012873
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012874fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012875
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012876for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012877do :
12878 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012879if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012882_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012883
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012884fi
12885done
12886
Michael W. Hudson54241132001-12-07 15:38:26 +000012887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12890$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012891if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012892 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893else
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896#include <sys/types.h>
12897#include <sys/time.h>
12898#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900int
12901main ()
12902{
12903if ((struct tm *) 0)
12904return 0;
12905 ;
12906 return 0;
12907}
12908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012909if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012910 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12917$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012918if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921
12922fi
12923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12925$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012926if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931#include <sys/types.h>
12932#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934int
12935main ()
12936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937struct tm tm;
12938 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ;
12941 return 0;
12942}
12943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945 ac_cv_struct_tm=time.h
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12952$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012953if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956
12957fi
12958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959ac_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 +000012960#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962"
Victor Stinnere0be4232011-10-25 13:06:09 +020012963if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
12965cat >>confdefs.h <<_ACEOF
12966#define HAVE_STRUCT_TM_TM_ZONE 1
12967_ACEOF
12968
12969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975
12976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12978"
Victor Stinnere0be4232011-10-25 13:06:09 +020012979if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983fi
12984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987_ACEOF
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12990$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012991if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012995/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012996#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997#if !HAVE_DECL_TZNAME
12998extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
13003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013010 ac_cv_var_tzname=yes
13011else
Matthias Kloseb9621712010-04-24 17:59:49 +000013012 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13018$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013019 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023 fi
13024fi
13025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026ac_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 +020013027if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029cat >>confdefs.h <<_ACEOF
13030#define HAVE_STRUCT_STAT_ST_RDEV 1
13031_ACEOF
13032
13033
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013034fi
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036ac_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 +020013037if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013038
Martin v. Löwis11437992002-04-12 09:54:03 +000013039cat >>confdefs.h <<_ACEOF
13040#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13041_ACEOF
13042
13043
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013044fi
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046ac_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 +020013047if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_STRUCT_STAT_ST_FLAGS 1
13051_ACEOF
13052
13053
13054fi
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056ac_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 +020013057if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013058
13059cat >>confdefs.h <<_ACEOF
13060#define HAVE_STRUCT_STAT_ST_GEN 1
13061_ACEOF
13062
13063
13064fi
13065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066ac_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 +020013067if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013068
13069cat >>confdefs.h <<_ACEOF
13070#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13071_ACEOF
13072
13073
13074fi
13075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076ac_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 +020013077if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013078
Martin v. Löwis11437992002-04-12 09:54:03 +000013079cat >>confdefs.h <<_ACEOF
13080#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13081_ACEOF
13082
13083
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013084fi
13085
Stefan Krah267b6392016-04-26 01:09:18 +020013086ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13087 #include <sys/types.h>
13088 #include <pwd.h>
13089
13090"
13091if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13092
13093cat >>confdefs.h <<_ACEOF
13094#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13095_ACEOF
13096
13097
13098fi
13099ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13100 #include <sys/types.h>
13101 #include <pwd.h>
13102
13103"
13104if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13105
13106cat >>confdefs.h <<_ACEOF
13107#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13108_ACEOF
13109
13110
13111fi
13112
Zachary Ware6a6967e2016-10-01 00:47:27 -050013113# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13114ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13115"
13116if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_SIGINFO_T_SI_BAND 1
13120_ACEOF
13121
13122
13123fi
13124
Michael W. Hudson54241132001-12-07 15:38:26 +000013125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13127$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013128if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130else
Matthias Kloseb159a552010-04-25 21:00:44 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013134#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013135int
13136main ()
13137{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013138return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 ;
13140 return 0;
13141}
13142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013143if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013144 ac_cv_header_time_altzone=yes
13145else
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150fi
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13153$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157
13158fi
13159
Guido van Rossumda88dad1995-01-26 00:46:29 +000013160was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13162$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013164/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013165
13166#include <sys/types.h>
13167#include <sys/select.h>
13168#include <sys/time.h>
13169
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173;
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ;
13175 return 0;
13176}
13177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013183 was_it_defined=yes
13184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13188$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13191$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013192if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013194else
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013197#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013198int
13199main ()
13200{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013201struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 ;
13203 return 0;
13204}
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207 ac_cv_struct_addrinfo=yes
13208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13212fi
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13215$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013219
13220fi
13221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13223$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013224if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013228/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229
13230# include <sys/types.h>
13231# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013232int
13233main ()
13234{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241 ac_cv_struct_sockaddr_storage=yes
13242else
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13246fi
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13249$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253
13254fi
13255
Christian Heimesdffa3942016-09-05 23:54:41 +020013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13257$as_echo_n "checking for sockaddr_alg... " >&6; }
13258if ${ac_cv_struct_sockaddr_alg+:} false; then :
13259 $as_echo_n "(cached) " >&6
13260else
13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13262/* end confdefs.h. */
13263
13264# include <sys/types.h>
13265# include <sys/socket.h>
13266# include <linux/if_alg.h>
13267int
13268main ()
13269{
13270struct sockaddr_alg s
13271 ;
13272 return 0;
13273}
13274_ACEOF
13275if ac_fn_c_try_compile "$LINENO"; then :
13276 ac_cv_struct_sockaddr_alg=yes
13277else
13278 ac_cv_struct_sockaddr_alg=no
13279fi
13280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13281fi
13282
13283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13284$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13285if test $ac_cv_struct_sockaddr_alg = yes; then
13286
13287$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13288
13289fi
13290
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13294$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013295if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013300$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
13304static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013305test_array [0] = 0;
13306return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
13308 ;
13309 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013310}
Martin v. Löwis11437992002-04-12 09:54:03 +000013311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013313 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13320$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323
13324fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13327$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013328if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013332/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013339 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013341 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343 char const *const *pcpcc;
13344 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 /* NEC SVR4.0.2 mips cc rejects this. */
13346 struct point {int x, y;};
13347 static struct point const zero = {0,0};
13348 /* AIX XL C 1.02.0.0 rejects this.
13349 It does not let you subtract one const X* pointer from another in
13350 an arm of an if-expression whose if-part is not a constant
13351 expression */
13352 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355 ++pcpcc;
13356 ppc = (char**) pcpcc;
13357 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013358 { /* SCO 3.2v4 cc rejects this sort of thing. */
13359 char tx;
13360 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 }
13366 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13367 int x[] = {25, 17};
13368 const int *foo = &x[0];
13369 ++foo;
13370 }
13371 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13372 typedef const int *iptr;
13373 iptr p = 0;
13374 ++p;
13375 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013376 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013378 struct s { int j; const int *ap[3]; } bx;
13379 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 }
13381 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13382 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013386#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 ;
13389 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390}
Martin v. Löwis11437992002-04-12 09:54:03 +000013391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393 ac_cv_c_const=yes
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13400$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404
13405fi
13406
Michael W. Hudson54241132001-12-07 15:38:26 +000013407
Guido van Rossumda88dad1995-01-26 00:46:29 +000013408works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13410$as_echo_n "checking for working signed char... " >&6; }
13411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013412/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013413
Martin v. Löwis11437992002-04-12 09:54:03 +000013414int
13415main ()
13416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ;
13419 return 0;
13420}
13421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013422if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013423 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013424else
Skip Montanaro6dead952003-09-25 14:50:04 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013427
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013428
Guido van Rossum7f43da71994-08-01 12:15:30 +000013429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13432$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013433
Guido van Rossumda88dad1995-01-26 00:46:29 +000013434have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13436$as_echo_n "checking for prototypes... " >&6; }
13437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013439int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440int
13441main ()
13442{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 ;
13445 return 0;
13446}
13447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
Matthias Kloseb159a552010-04-25 21:00:44 +000013452 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13456$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457
Guido van Rossumda88dad1995-01-26 00:46:29 +000013458works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13460$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013462/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013463
13464#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013465int foo(int x, ...) {
13466 va_list va;
13467 va_start(va, x);
13468 va_arg(va, int);
13469 va_arg(va, char *);
13470 va_arg(va, double);
13471 return 0;
13472}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474int
13475main ()
13476{
Guido van Rossum90eea071996-08-30 20:58:57 +000013477return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013487 works=yes
13488
Guido van Rossum627b2d71993-12-24 10:39:16 +000013489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13492$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013493
Martin v. Löwisd6320502004-08-12 13:45:08 +000013494# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13496$as_echo_n "checking for socketpair... " >&6; }
13497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013498/* end confdefs.h. */
13499
13500#include <sys/types.h>
13501#include <sys/socket.h>
13502
13503int
13504main ()
13505{
13506void *x=socketpair
13507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013514
Matthias Kloseb159a552010-04-25 21:00:44 +000013515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013520
13521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013523
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013524# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13526$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529#include <sys/types.h>
13530#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013531int
13532main ()
13533{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534struct sockaddr x;
13535x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_compile "$LINENO"; then :
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13542$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013545
13546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13548$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013549
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013553# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013557if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13562$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013563 OLD_CFLAGS=$CFLAGS
13564 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013566/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013567
13568# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570int
13571main ()
13572{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013573
13574 char *name;
13575 struct hostent *he, *res;
13576 char buffer[2048];
13577 int buflen = 2048;
13578 int h_errnop;
13579
13580 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
13582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013589
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13594$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013596else
Skip Montanaro6dead952003-09-25 14:50:04 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599$as_echo "no" >&6; }
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13601$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013603/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013605# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Martin v. Löwis11437992002-04-12 09:54:03 +000013607int
13608main ()
13609{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610
13611 char *name;
13612 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013613 char buffer[2048];
13614 int buflen = 2048;
13615 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616
Matthias Kloseb159a552010-04-25 21:00:44 +000013617 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
13619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013626
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Matthias Kloseb159a552010-04-25 21:00:44 +000013628$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13631$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013633else
Skip Montanaro6dead952003-09-25 14:50:04 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13636$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13638$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13640/* end confdefs.h. */
13641
13642# include <netdb.h>
13643
13644int
13645main ()
13646{
13647
13648 char *name;
13649 struct hostent *he;
13650 struct hostent_data data;
13651
13652 (void) gethostbyname_r(name, he, &data);
13653
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658if ac_fn_c_try_compile "$LINENO"; then :
13659
13660 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13661
13662
13663$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13664
13665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13666$as_echo "yes" >&6; }
13667
13668else
13669
13670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013681 CFLAGS=$OLD_CFLAGS
13682
13683else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 for ac_func in gethostbyname
13686do :
13687 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013691_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013693fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013694done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013695
Michael W. Hudson54241132001-12-07 15:38:26 +000013696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013697fi
13698
Michael W. Hudson54241132001-12-07 15:38:26 +000013699
13700
13701
13702
13703
13704
Guido van Rossum627b2d71993-12-24 10:39:16 +000013705# checks for system services
13706# (none yet)
13707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013709ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013710if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013711
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013712else
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13714$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013715if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717else
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013719LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723/* Override any GCC internal prototype to avoid an error.
13724 Use char because int might match the return type of a GCC
13725 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013726#ifdef __cplusplus
13727extern "C"
13728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013729char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013730int
13731main ()
13732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013743rm -f core conftest.err conftest.$ac_objext \
13744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013745LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13748$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013749if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 cat >>confdefs.h <<_ACEOF
13751#define HAVE_LIBIEEE 1
13752_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013754 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755
Guido van Rossum627b2d71993-12-24 10:39:16 +000013756fi
13757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013759fi
13760
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762# check for --with-libm=...
13763
Guido van Rossum563e7081996-09-10 18:20:48 +000013764case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013765Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013766*) LIBM=-lm
13767esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13769$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013771# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013773 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013774if test "$withval" = no
13775then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13777$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013778elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013779then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13781$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013782else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013783fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013784else
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13786$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787fi
13788
Guido van Rossum7f43da71994-08-01 12:15:30 +000013789
13790# check for --with-libc=...
13791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13793$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013798if test "$withval" = no
13799then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13801$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013802elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013803then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13805$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013806else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013807fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13810$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811fi
13812
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813
Stefan Krah1919b7e2012-03-21 18:25:23 +010013814# **************************************
13815# * Check for gcc x64 inline assembler *
13816# **************************************
13817
13818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13819$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822
13823int
13824main ()
13825{
13826
13827 __asm__ __volatile__ ("movq %rcx, %rax");
13828
13829 ;
13830 return 0;
13831}
13832_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013833if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013834 have_gcc_asm_for_x64=yes
13835else
13836 have_gcc_asm_for_x64=no
13837fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013838rm -f core conftest.err conftest.$ac_objext \
13839 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13841$as_echo "$have_gcc_asm_for_x64" >&6; }
13842if test "$have_gcc_asm_for_x64" = yes
13843then
13844
13845$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13846
13847fi
13848
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849# **************************************************
13850# * Check for various properties of floating point *
13851# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13854$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013855if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857else
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860 ac_cv_little_endian_double=no
13861else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863/* end confdefs.h. */
13864
13865#include <string.h>
13866int main() {
13867 double x = 9006104071832581.0;
13868 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13869 return 0;
13870 else
13871 return 1;
13872}
13873
13874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876 ac_cv_little_endian_double=yes
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882fi
13883
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884fi
13885
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13887$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888if test "$ac_cv_little_endian_double" = yes
13889then
13890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892
13893fi
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13896$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899else
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902 ac_cv_big_endian_double=no
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905/* end confdefs.h. */
13906
13907#include <string.h>
13908int main() {
13909 double x = 9006104071832581.0;
13910 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13911 return 0;
13912 else
13913 return 1;
13914}
13915
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918 ac_cv_big_endian_double=yes
13919else
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924fi
13925
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926fi
13927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13929$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930if test "$ac_cv_big_endian_double" = yes
13931then
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934
13935fi
13936
13937# Some ARM platforms use a mixed-endian representation for doubles.
13938# While Python doesn't currently have full support for these platforms
13939# (see e.g., issue 1762561), we can at least make sure that float <-> string
13940# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13942$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945else
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948 ac_cv_mixed_endian_double=no
13949else
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951/* end confdefs.h. */
13952
13953#include <string.h>
13954int main() {
13955 double x = 9006104071832581.0;
13956 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13957 return 0;
13958 else
13959 return 1;
13960}
13961
13962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013963if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964 ac_cv_mixed_endian_double=yes
13965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970fi
13971
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972fi
13973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13975$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976if test "$ac_cv_mixed_endian_double" = yes
13977then
13978
Matthias Kloseb9621712010-04-24 17:59:49 +000013979$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980
13981fi
13982
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013983# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013984# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013985# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013986# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013987# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013988# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013989
13990# This inline assembler syntax may also work for suncc and icc,
13991# so we try it on all platforms.
13992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13994$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996/* end confdefs.h. */
13997
13998int
13999main ()
14000{
14001
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014002 unsigned short cw;
14003 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14004 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014005
14006 ;
14007 return 0;
14008}
14009_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014010if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011 have_gcc_asm_for_x87=yes
14012else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014015rm -f core conftest.err conftest.$ac_objext \
14016 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14018$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014019if test "$have_gcc_asm_for_x87" = yes
14020then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014023
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14027$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14029/* end confdefs.h. */
14030
14031int
14032main ()
14033{
14034
14035 unsigned int fpcr;
14036 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14037 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14038
14039 ;
14040 return 0;
14041}
14042_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014043if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014044 have_gcc_asm_for_mc68881=yes
14045else
14046 have_gcc_asm_for_mc68881=no
14047fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014048rm -f core conftest.err conftest.$ac_objext \
14049 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14051$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14052if test "$have_gcc_asm_for_mc68881" = yes
14053then
14054
14055$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14056
14057fi
14058
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014059# Detect whether system arithmetic is subject to x87-style double
14060# rounding issues. The result of this test has little meaning on non
14061# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14062# mode is round-to-nearest and double rounding issues are present, and
14063# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14065$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014066# $BASECFLAGS may affect the result
14067ac_save_cc="$CC"
14068CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014070 ac_cv_x87_double_rounding=no
14071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073/* end confdefs.h. */
14074
14075#include <stdlib.h>
14076#include <math.h>
14077int main() {
14078 volatile double x, y, z;
14079 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14080 x = 0.99999999999999989; /* 1-2**-53 */
14081 y = 1./x;
14082 if (y != 1.)
14083 exit(0);
14084 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14085 x = 1e16;
14086 y = 2.99999;
14087 z = x + y;
14088 if (z != 1e16+4.)
14089 exit(0);
14090 /* both tests show evidence of double rounding */
14091 exit(1);
14092}
14093
14094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096 ac_cv_x87_double_rounding=no
14097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014102fi
14103
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014104CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14106$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014107if test "$ac_cv_x87_double_rounding" = yes
14108then
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014111
14112fi
14113
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014114# ************************************
14115# * Check for mathematical functions *
14116# ************************************
14117
14118LIBS_SAVE=$LIBS
14119LIBS="$LIBS $LIBM"
14120
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014121for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14122do :
14123 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14124ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014125if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014126 cat >>confdefs.h <<_ACEOF
14127#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14128_ACEOF
14129
14130fi
14131done
14132
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014133for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014134do :
14135 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14136ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014137if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 cat >>confdefs.h <<_ACEOF
14139#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14140_ACEOF
14141
14142fi
14143done
14144
14145ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14146"
Victor Stinnere0be4232011-10-25 13:06:09 +020014147if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014148 ac_have_decl=1
14149else
14150 ac_have_decl=0
14151fi
14152
14153cat >>confdefs.h <<_ACEOF
14154#define HAVE_DECL_ISINF $ac_have_decl
14155_ACEOF
14156ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14157"
Victor Stinnere0be4232011-10-25 13:06:09 +020014158if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014159 ac_have_decl=1
14160else
14161 ac_have_decl=0
14162fi
14163
14164cat >>confdefs.h <<_ACEOF
14165#define HAVE_DECL_ISNAN $ac_have_decl
14166_ACEOF
14167ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14168"
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014170 ac_have_decl=1
14171else
14172 ac_have_decl=0
14173fi
14174
14175cat >>confdefs.h <<_ACEOF
14176#define HAVE_DECL_ISFINITE $ac_have_decl
14177_ACEOF
14178
14179
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014180# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14181# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14183$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014184if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014186else
14187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014189 ac_cv_tanh_preserves_zero_sign=no
14190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014192/* end confdefs.h. */
14193
14194#include <math.h>
14195#include <stdlib.h>
14196int main() {
14197 /* return 0 if either negative zeros don't exist
14198 on this platform or if negative zeros exist
14199 and tanh(-0.) == -0. */
14200 if (atan2(0., -1.) == atan2(-0., -1.) ||
14201 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14202 else exit(1);
14203}
14204
14205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014206if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014207 ac_cv_tanh_preserves_zero_sign=yes
14208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014213fi
14214
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014215fi
14216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14218$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014219if test "$ac_cv_tanh_preserves_zero_sign" = yes
14220then
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014223
14224fi
14225
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226if test "$ac_cv_func_log1p" = yes
14227then
14228 # On some versions of AIX, log1p(-0.) returns 0. instead of
14229 # -0. See issue #9920.
14230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14231$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014232 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014233 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014234else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014235
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 if test "$cross_compiling" = yes; then :
14237 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14240/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014241
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014242 #include <math.h>
14243 #include <stdlib.h>
14244 int main() {
14245 /* Fail if the signs of log1p(-0.) and -0. can be
14246 distinguished. */
14247 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14248 return 0;
14249 else
14250 return 1;
14251 }
14252
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014253_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014254if ac_fn_c_try_run "$LINENO"; then :
14255 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014256else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014257 ac_cv_log1p_drops_zero_sign=yes
14258fi
14259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14260 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014261fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014262
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014263fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014264
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14266$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14267fi
14268if test "$ac_cv_log1p_drops_zero_sign" = yes
14269then
14270
14271$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14272
14273fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014274
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014275LIBS=$LIBS_SAVE
14276
Mark Dickinsona614f042009-11-28 12:48:43 +000014277# For multiprocessing module, check that sem_open
14278# actually works. For FreeBSD versions <= 7.2,
14279# the kernel module that provides POSIX semaphores
14280# isn't loaded by default, so an attempt to call
14281# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14283$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014288 ac_cv_posix_semaphores_enabled=yes
14289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014291/* end confdefs.h. */
14292
14293#include <unistd.h>
14294#include <fcntl.h>
14295#include <stdio.h>
14296#include <semaphore.h>
14297#include <sys/stat.h>
14298
14299int main(void) {
14300 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14301 if (a == SEM_FAILED) {
14302 perror("sem_open");
14303 return 1;
14304 }
14305 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014306 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014307 return 0;
14308}
14309
14310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014312 ac_cv_posix_semaphores_enabled=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014318fi
14319
14320
Mark Dickinsona614f042009-11-28 12:48:43 +000014321fi
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14324$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014325if test $ac_cv_posix_semaphores_enabled = no
14326then
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014329
14330fi
14331
Mark Dickinson10683072009-04-18 21:18:19 +000014332# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14334$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014339 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014340else
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014342/* end confdefs.h. */
14343
14344#include <unistd.h>
14345#include <fcntl.h>
14346#include <stdio.h>
14347#include <semaphore.h>
14348#include <sys/stat.h>
14349
14350int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014351 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014352 int count;
14353 int res;
14354 if(a==SEM_FAILED){
14355 perror("sem_open");
14356 return 1;
14357
14358 }
14359 res = sem_getvalue(a, &count);
14360 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014361 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014362 return res==-1 ? 1 : 0;
14363}
14364
Mark Dickinson10683072009-04-18 21:18:19 +000014365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014373fi
14374
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014375
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376fi
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14379$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380if test $ac_cv_broken_sem_getvalue = yes
14381then
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384
14385fi
14386
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014387ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14388"
14389if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14390 ac_have_decl=1
14391else
14392 ac_have_decl=0
14393fi
14394
14395cat >>confdefs.h <<_ACEOF
14396#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14397_ACEOF
14398ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14399"
14400if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14401 ac_have_decl=1
14402else
14403 ac_have_decl=0
14404fi
14405
14406cat >>confdefs.h <<_ACEOF
14407#define HAVE_DECL_RTLD_NOW $ac_have_decl
14408_ACEOF
14409ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14410"
14411if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14412 ac_have_decl=1
14413else
14414 ac_have_decl=0
14415fi
14416
14417cat >>confdefs.h <<_ACEOF
14418#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14419_ACEOF
14420ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14421"
14422if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14423 ac_have_decl=1
14424else
14425 ac_have_decl=0
14426fi
14427
14428cat >>confdefs.h <<_ACEOF
14429#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14430_ACEOF
14431ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14432"
14433if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14434 ac_have_decl=1
14435else
14436 ac_have_decl=0
14437fi
14438
14439cat >>confdefs.h <<_ACEOF
14440#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14441_ACEOF
14442ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14443"
14444if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14445 ac_have_decl=1
14446else
14447 ac_have_decl=0
14448fi
14449
14450cat >>confdefs.h <<_ACEOF
14451#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14452_ACEOF
14453ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14454"
14455if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14456 ac_have_decl=1
14457else
14458 ac_have_decl=0
14459fi
14460
14461cat >>confdefs.h <<_ACEOF
14462#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14463_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014464ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14465"
14466if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14467 ac_have_decl=1
14468else
14469 ac_have_decl=0
14470fi
14471
14472cat >>confdefs.h <<_ACEOF
14473#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14474_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014475
14476
Mark Dickinsonbd792642009-03-18 20:06:12 +000014477# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14479$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014480# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014481if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014482 enableval=$enable_big_digits; case $enable_big_digits in
14483yes)
14484 enable_big_digits=30 ;;
14485no)
14486 enable_big_digits=15 ;;
1448715|30)
14488 ;;
14489*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014490 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 +000014491esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14493$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014494
14495cat >>confdefs.h <<_ACEOF
14496#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14497_ACEOF
14498
14499
14500else
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14502$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014503fi
14504
14505
Guido van Rossumef2255b2000-03-10 22:30:29 +000014506# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014507ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014508if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014513 wchar_h="yes"
14514
Guido van Rossumef2255b2000-03-10 22:30:29 +000014515else
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014517
14518fi
14519
Michael W. Hudson54241132001-12-07 15:38:26 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014522# determine wchar_t size
14523if test "$wchar_h" = yes
14524then
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14528# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14530$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014531if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14535"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Martin v. Löwis11437992002-04-12 09:54:03 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 if test "$ac_cv_type_wchar_t" = yes; then
14539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014541as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014542See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543 else
14544 ac_cv_sizeof_wchar_t=0
14545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014547
Martin v. Löwis11437992002-04-12 09:54:03 +000014548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14550$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551
14552
14553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014555#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014556_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014557
Michael W. Hudson54241132001-12-07 15:38:26 +000014558
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014559fi
14560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14562$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014563have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014565/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014566
14567#include <tcl.h>
14568#if TCL_UTF_MAX != 6
14569# error "NOT UCS4_TCL"
14570#endif
14571int
14572main ()
14573{
14574
14575 ;
14576 return 0;
14577}
14578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014580
14581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014583
14584 have_ucs4_tcl=yes
14585
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14589$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014590
Skip Montanaro6dead952003-09-25 14:50:04 +000014591# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592if test "$wchar_h" = yes
14593then
14594 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14596$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014597 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014599else
14600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014602 ac_cv_wchar_t_signed=yes
14603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014605/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014606
14607 #include <wchar.h>
14608 int main()
14609 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014610 /* Success: exit code 0 */
14611 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014612 }
14613
14614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014615if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014616 ac_cv_wchar_t_signed=yes
14617else
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014622fi
14623
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014624fi
14625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14627$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628fi
14629
Georg Brandl52d168a2008-01-07 18:10:24 +000014630# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014631if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014632 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014633then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014634 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Georg Brandl52d168a2008-01-07 18:10:24 +000014638else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014639 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014640fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14642$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014643
14644# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14646$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014647if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014649else
Matthias Kloseb9621712010-04-24 17:59:49 +000014650 ac_cv_c_bigendian=unknown
14651 # See if we're dealing with a universal compiler.
14652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653/* end confdefs.h. */
14654#ifndef __APPLE_CC__
14655 not a universal capable compiler
14656 #endif
14657 typedef int dummy;
14658
Skip Montanaro6dead952003-09-25 14:50:04 +000014659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_compile "$LINENO"; then :
14661
14662 # Check for potential -arch flags. It is not universal unless
14663 # there are at least two -arch flags with different values.
14664 ac_arch=
14665 ac_prev=
14666 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14667 if test -n "$ac_prev"; then
14668 case $ac_word in
14669 i?86 | x86_64 | ppc | ppc64)
14670 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14671 ac_arch=$ac_word
14672 else
14673 ac_cv_c_bigendian=universal
14674 break
14675 fi
14676 ;;
14677 esac
14678 ac_prev=
14679 elif test "x$ac_word" = "x-arch"; then
14680 ac_prev=arch
14681 fi
14682 done
14683fi
14684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685 if test $ac_cv_c_bigendian = unknown; then
14686 # See if sys/param.h defines the BYTE_ORDER macro.
14687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014688/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014689#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014691
Martin v. Löwis11437992002-04-12 09:54:03 +000014692int
14693main ()
14694{
Matthias Kloseb9621712010-04-24 17:59:49 +000014695#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14696 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14697 && LITTLE_ENDIAN)
14698 bogus endian macros
14699 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014700
14701 ;
14702 return 0;
14703}
14704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014708/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014709#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711
Martin v. Löwis11437992002-04-12 09:54:03 +000014712int
14713main ()
14714{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 not big endian
14717 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
14719 ;
14720 return 0;
14721}
14722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014723if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014724 ac_cv_c_bigendian=yes
14725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014729fi
14730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731 fi
14732 if test $ac_cv_c_bigendian = unknown; then
14733 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014735/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014736#include <limits.h>
14737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738int
14739main ()
14740{
Matthias Kloseb9621712010-04-24 17:59:49 +000014741#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14742 bogus endian macros
14743 #endif
14744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 ;
14746 return 0;
14747}
14748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014749if ac_fn_c_try_compile "$LINENO"; then :
14750 # It does; now see whether it defined to _BIG_ENDIAN or not.
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752/* end confdefs.h. */
14753#include <limits.h>
14754
14755int
14756main ()
14757{
14758#ifndef _BIG_ENDIAN
14759 not big endian
14760 #endif
14761
14762 ;
14763 return 0;
14764}
14765_ACEOF
14766if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014767 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14772fi
14773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14774 fi
14775 if test $ac_cv_c_bigendian = unknown; then
14776 # Compile a test program.
14777 if test "$cross_compiling" = yes; then :
14778 # Try to guess by grepping values from an object file.
14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780/* end confdefs.h. */
14781short int ascii_mm[] =
14782 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14783 short int ascii_ii[] =
14784 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14785 int use_ascii (int i) {
14786 return ascii_mm[i] + ascii_ii[i];
14787 }
14788 short int ebcdic_ii[] =
14789 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14790 short int ebcdic_mm[] =
14791 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14792 int use_ebcdic (int i) {
14793 return ebcdic_mm[i] + ebcdic_ii[i];
14794 }
14795 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797int
14798main ()
14799{
14800return use_ascii (foo) == use_ebcdic (foo);
14801 ;
14802 return 0;
14803}
14804_ACEOF
14805if ac_fn_c_try_compile "$LINENO"; then :
14806 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14807 ac_cv_c_bigendian=yes
14808 fi
14809 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14810 if test "$ac_cv_c_bigendian" = unknown; then
14811 ac_cv_c_bigendian=no
14812 else
14813 # finding both strings is unlikely to happen, but who knows?
14814 ac_cv_c_bigendian=unknown
14815 fi
14816 fi
14817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014823int
14824main ()
14825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 /* Are we little or big endian? From Harbison&Steele. */
14828 union
14829 {
14830 long int l;
14831 char c[sizeof (long int)];
14832 } u;
14833 u.l = 1;
14834 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
14836 ;
14837 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014838}
Martin v. Löwis11437992002-04-12 09:54:03 +000014839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014840if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014841 ac_cv_c_bigendian=no
14842else
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14852$as_echo "$ac_cv_c_bigendian" >&6; }
14853 case $ac_cv_c_bigendian in #(
14854 yes)
14855 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14856;; #(
14857 no)
14858 ;; #(
14859 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 ;; #(
14864 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014865 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014866 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014868
Michael W. Hudson54241132001-12-07 15:38:26 +000014869
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014870# ABI version string for Python extension modules. This appears between the
14871# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14872# from the following attributes which affect the ABI of this Python build (in
14873# this order):
14874#
14875# * The Python implementation (always 'cpython-' for us)
14876# * The major and minor version numbers
14877# * --with-pydebug (adds a 'd')
14878# * --with-pymalloc (adds a 'm')
14879# * --with-wide-unicode (adds a 'u')
14880#
14881# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014882# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14883# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014884
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14886$as_echo_n "checking ABIFLAGS... " >&6; }
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14888$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14890$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014891SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14893$as_echo "$SOABI" >&6; }
14894
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014895
14896case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014897 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014898 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14899 *)
14900 EXT_SUFFIX=${SHLIB_SUFFIX};;
14901esac
14902
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14904$as_echo_n "checking LDVERSION... " >&6; }
14905LDVERSION='$(VERSION)$(ABIFLAGS)'
14906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14907$as_echo "$LDVERSION" >&6; }
14908
doko@python.org87421192013-01-26 11:39:31 +010014909
doko@ubuntu.com55532312016-06-14 08:55:19 +020014910if test x$PLATFORM_TRIPLET = x; then
14911 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14912else
14913 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14914fi
doko@python.org87421192013-01-26 11:39:31 +010014915
14916
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014917# Check whether right shifting a negative integer extends the sign bit
14918# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14920$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014921if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014923else
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014926 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014929/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014930
14931int main()
14932{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014933 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014934}
14935
Martin v. Löwis11437992002-04-12 09:54:03 +000014936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014937if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014938 ac_cv_rshift_extends_sign=yes
14939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14943 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014944fi
14945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946fi
14947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14949$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014950if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014951then
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014954
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014955fi
14956
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014957# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14959$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014960if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014962else
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Matthias Kloseb9621712010-04-24 17:59:49 +000014964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014965/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014966#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014967int
14968main ()
14969{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014970
14971 FILE *f = fopen("/dev/null", "r");
14972 flockfile(f);
14973 getc_unlocked(f);
14974 funlockfile(f);
14975
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 ;
14977 return 0;
14978}
14979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014980if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014981 ac_cv_have_getc_unlocked=yes
14982else
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 ac_cv_have_getc_unlocked=no
14984fi
14985rm -f core conftest.err conftest.$ac_objext \
14986 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14990$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014991if test "$ac_cv_have_getc_unlocked" = yes
14992then
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Matthias Kloseb9621712010-04-24 17:59:49 +000014994$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014995
14996fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014997
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014998# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014999# save the value of LIBS so we don't actually link Python with readline
15000LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015001
Gregory P. Smith18820942008-09-07 06:24:49 +000015002# On some systems we need to link readline to a termcap compatible
15003# library. NOTE: Keep the precedence of listed libraries synchronised
15004# with setup.py.
15005py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15007$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015008for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015009 if test -z "$py_libtermcap"; then
15010 READLINE_LIBS="-lreadline"
15011 else
15012 READLINE_LIBS="-lreadline -l$py_libtermcap"
15013 fi
15014 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015016/* end confdefs.h. */
15017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018/* Override any GCC internal prototype to avoid an error.
15019 Use char because int might match the return type of a GCC
15020 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015021#ifdef __cplusplus
15022extern "C"
15023#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015024char readline ();
15025int
15026main ()
15027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015029 ;
15030 return 0;
15031}
15032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015033if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015034 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015038 if test $py_cv_lib_readline = yes; then
15039 break
15040 fi
15041done
15042# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15043#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015044if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15046$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015047else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15049$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015052
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015053fi
15054
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015055# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015057/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015058#include <readline/readline.h>
15059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015061 have_readline=yes
15062else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015063 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015064
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015065fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015066rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015067if test $have_readline = yes
15068then
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015071#include <readline/readline.h>
15072
15073_ACEOF
15074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015076
Matthias Kloseb9621712010-04-24 17:59:49 +000015077$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015078
15079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015080rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015081
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015083/* end confdefs.h. */
15084#include <readline/readline.h>
15085
15086_ACEOF
15087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015091
15092fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015093rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015094
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015095fi
15096
Martin v. Löwis0daad592001-09-30 21:09:59 +000015097# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15099$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015100if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015104LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108/* Override any GCC internal prototype to avoid an error.
15109 Use char because int might match the return type of a GCC
15110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015111#ifdef __cplusplus
15112extern "C"
15113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015114char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015115int
15116main ()
15117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ;
15120 return 0;
15121}
15122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015125else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015128rm -f core conftest.err conftest.$ac_objext \
15129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015130LIBS=$ac_check_lib_save_LIBS
15131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15133$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015134if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015135
Matthias Kloseb9621712010-04-24 17:59:49 +000015136$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015137
Martin v. Löwis0daad592001-09-30 21:09:59 +000015138fi
15139
Michael W. Hudson54241132001-12-07 15:38:26 +000015140
Thomas Wouters89d996e2007-09-08 17:39:28 +000015141# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15143$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015144if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015146else
15147 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015148LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015150/* end confdefs.h. */
15151
15152/* Override any GCC internal prototype to avoid an error.
15153 Use char because int might match the return type of a GCC
15154 builtin and then its argument prototype would still apply. */
15155#ifdef __cplusplus
15156extern "C"
15157#endif
15158char rl_completion_display_matches_hook ();
15159int
15160main ()
15161{
15162return rl_completion_display_matches_hook ();
15163 ;
15164 return 0;
15165}
15166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015167if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015168 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15169else
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015172rm -f core conftest.err conftest.$ac_objext \
15173 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015174LIBS=$ac_check_lib_save_LIBS
15175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15177$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015181
15182fi
15183
15184
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015185# also in 4.0, but not in editline
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15187$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15188if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15189 $as_echo_n "(cached) " >&6
15190else
15191 ac_check_lib_save_LIBS=$LIBS
15192LIBS="-lreadline $READLINE_LIBS $LIBS"
15193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15194/* end confdefs.h. */
15195
15196/* Override any GCC internal prototype to avoid an error.
15197 Use char because int might match the return type of a GCC
15198 builtin and then its argument prototype would still apply. */
15199#ifdef __cplusplus
15200extern "C"
15201#endif
15202char rl_resize_terminal ();
15203int
15204main ()
15205{
15206return rl_resize_terminal ();
15207 ;
15208 return 0;
15209}
15210_ACEOF
15211if ac_fn_c_try_link "$LINENO"; then :
15212 ac_cv_lib_readline_rl_resize_terminal=yes
15213else
15214 ac_cv_lib_readline_rl_resize_terminal=no
15215fi
15216rm -f core conftest.err conftest.$ac_objext \
15217 conftest$ac_exeext conftest.$ac_ext
15218LIBS=$ac_check_lib_save_LIBS
15219fi
15220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15221$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15222if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15223
15224$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15225
15226fi
15227
15228
Martin v. Löwis0daad592001-09-30 21:09:59 +000015229# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15231$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015232if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015234else
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015236LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240/* Override any GCC internal prototype to avoid an error.
15241 Use char because int might match the return type of a GCC
15242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015243#ifdef __cplusplus
15244extern "C"
15245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015246char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015247int
15248main ()
15249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ;
15252 return 0;
15253}
15254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015255if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015260rm -f core conftest.err conftest.$ac_objext \
15261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015262LIBS=$ac_check_lib_save_LIBS
15263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15265$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015269
Guido van Rossum353ae582001-07-10 16:45:32 +000015270fi
15271
Jack Jansendd19cf82001-12-06 22:36:17 +000015272
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015273# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015275/* end confdefs.h. */
15276#include <readline/readline.h>
15277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015278if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015279 have_readline=yes
15280else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015281 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015282
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015283fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015284rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015285if test $have_readline = yes
15286then
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015288/* end confdefs.h. */
15289#include <readline/readline.h>
15290
15291_ACEOF
15292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015294
Matthias Kloseb9621712010-04-24 17:59:49 +000015295$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015296
15297fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015298rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015299
15300fi
15301
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15303$as_echo_n "checking for append_history in -lreadline... " >&6; }
15304if ${ac_cv_lib_readline_append_history+:} false; then :
15305 $as_echo_n "(cached) " >&6
15306else
15307 ac_check_lib_save_LIBS=$LIBS
15308LIBS="-lreadline $READLINE_LIBS $LIBS"
15309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310/* end confdefs.h. */
15311
15312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
15315#ifdef __cplusplus
15316extern "C"
15317#endif
15318char append_history ();
15319int
15320main ()
15321{
15322return append_history ();
15323 ;
15324 return 0;
15325}
15326_ACEOF
15327if ac_fn_c_try_link "$LINENO"; then :
15328 ac_cv_lib_readline_append_history=yes
15329else
15330 ac_cv_lib_readline_append_history=no
15331fi
15332rm -f core conftest.err conftest.$ac_objext \
15333 conftest$ac_exeext conftest.$ac_ext
15334LIBS=$ac_check_lib_save_LIBS
15335fi
15336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15337$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15338if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15339
15340$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15341
15342fi
15343
15344
Martin v. Löwis82bca632006-02-10 20:49:30 +000015345# End of readline checks: restore LIBS
15346LIBS=$LIBS_no_readline
15347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15349$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015352else
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
Matthias Kloseb9621712010-04-24 17:59:49 +000015354if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015355 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015358/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015359
15360int main()
15361{
15362 int val1 = nice(1);
15363 if (val1 != -1 && val1 == nice(2))
15364 exit(0);
15365 exit(1);
15366}
15367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015369if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015370 ac_cv_broken_nice=yes
15371else
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015376fi
15377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378fi
15379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15381$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015382if test "$ac_cv_broken_nice" = yes
15383then
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015386
15387fi
15388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15390$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015391if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015393else
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015395 ac_cv_broken_poll=no
15396else
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015398/* end confdefs.h. */
15399
15400#include <poll.h>
15401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015402int main()
15403{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015404 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015405 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015406
15407 close (42);
15408
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015409 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015410 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015411 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015412 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015413 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015414 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015415 return 1;
15416}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015417
15418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015419if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015420 ac_cv_broken_poll=yes
15421else
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015428fi
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15431$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015432if test "$ac_cv_broken_poll" = yes
15433then
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015436
15437fi
15438
Brett Cannon43802422005-02-10 20:48:03 +000015439# 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 +000015440# (which is not required by ISO C or UNIX spec) and/or if we support
15441# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015442ac_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 +000015443#include <$ac_cv_struct_tm>
15444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445"
Victor Stinnere0be4232011-10-25 13:06:09 +020015446if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015447
15448cat >>confdefs.h <<_ACEOF
15449#define HAVE_STRUCT_TM_TM_ZONE 1
15450_ACEOF
15451
15452
15453fi
15454
15455if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15456
Matthias Kloseb9621712010-04-24 17:59:49 +000015457$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015458
15459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15461"
Victor Stinnere0be4232011-10-25 13:06:09 +020015462if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466fi
15467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015469#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470_ACEOF
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15473$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015478/* end confdefs.h. */
15479#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480#if !HAVE_DECL_TZNAME
15481extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015482#endif
15483
15484int
15485main ()
15486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015488 ;
15489 return 0;
15490}
15491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015493 ac_cv_var_tzname=yes
15494else
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015497rm -f core conftest.err conftest.$ac_objext \
15498 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15501$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015502 if test $ac_cv_var_tzname = yes; then
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015505
15506 fi
15507fi
15508
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015509
Martin v. Löwis1d459062005-03-14 21:23:33 +000015510# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15512$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015513if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015515else
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015518 ac_cv_working_tzset=no
15519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015521/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015522
15523#include <stdlib.h>
15524#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015525#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015526
15527#if HAVE_TZNAME
15528extern char *tzname[];
15529#endif
15530
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015531int main()
15532{
Brett Cannon18367812003-09-19 00:59:16 +000015533 /* Note that we need to ensure that not only does tzset(3)
15534 do 'something' with localtime, but it works as documented
15535 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015536 This includes making sure that tzname is set properly if
15537 tm->tm_zone does not exist since it is the alternative way
15538 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015539
15540 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015541 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015542 */
15543
Martin v. Löwis1d459062005-03-14 21:23:33 +000015544 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015545 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15546
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015547 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015548 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015549 if (localtime(&groundhogday)->tm_hour != 0)
15550 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015551#if HAVE_TZNAME
15552 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15553 if (strcmp(tzname[0], "UTC") ||
15554 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15555 exit(1);
15556#endif
Brett Cannon18367812003-09-19 00:59:16 +000015557
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015558 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015559 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015560 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015561 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015562#if HAVE_TZNAME
15563 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15564 exit(1);
15565#endif
Brett Cannon18367812003-09-19 00:59:16 +000015566
15567 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15568 tzset();
15569 if (localtime(&groundhogday)->tm_hour != 11)
15570 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015571#if HAVE_TZNAME
15572 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15573 exit(1);
15574#endif
15575
15576#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015577 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15578 exit(1);
15579 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15580 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015581#endif
Brett Cannon18367812003-09-19 00:59:16 +000015582
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015583 exit(0);
15584}
15585
15586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015587if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015588 ac_cv_working_tzset=yes
15589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015594fi
15595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596fi
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15599$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015600if test "$ac_cv_working_tzset" = yes
15601then
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015604
15605fi
15606
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015607# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15609$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015610if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015611 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015614/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015615#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015616int
15617main ()
15618{
15619
15620struct stat st;
15621st.st_mtim.tv_nsec = 1;
15622
15623 ;
15624 return 0;
15625}
15626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015628 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15633fi
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15636$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015637if test "$ac_cv_stat_tv_nsec" = yes
15638then
15639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015641
15642fi
15643
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015644# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15646$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015651/* end confdefs.h. */
15652#include <sys/stat.h>
15653int
15654main ()
15655{
15656
15657struct stat st;
15658st.st_mtimespec.tv_nsec = 1;
15659
15660 ;
15661 return 0;
15662}
15663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015665 ac_cv_stat_tv_nsec2=yes
15666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670fi
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15673$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015674if test "$ac_cv_stat_tv_nsec2" = yes
15675then
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015678
15679fi
15680
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015681# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015682ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015683if test "$cross_compiling" = no; then
15684 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15685fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015686
15687for ac_header in curses.h ncurses.h
15688do :
15689 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15690ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15691if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15692 cat >>confdefs.h <<_ACEOF
15693#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15694_ACEOF
15695
15696fi
15697
15698done
15699
15700
15701# On Solaris, term.h requires curses.h
15702for ac_header in term.h
15703do :
15704 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15705#ifdef HAVE_CURSES_H
15706#include <curses.h>
15707#endif
15708
15709"
15710if test "x$ac_cv_header_term_h" = xyes; then :
15711 cat >>confdefs.h <<_ACEOF
15712#define HAVE_TERM_H 1
15713_ACEOF
15714
15715fi
15716
15717done
15718
15719
Jack Jansen666b1e72001-10-31 12:11:48 +000015720# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15722$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015723if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015725else
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015727/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015728#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015729int
15730main ()
15731{
Jack Jansen666b1e72001-10-31 12:11:48 +000015732
15733 int rtn;
15734 rtn = mvwdelch(0,0,0);
15735
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ;
15737 return 0;
15738}
15739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015740if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015741 ac_cv_mvwdelch_is_expression=yes
15742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15746fi
15747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15749$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015750
15751if test "$ac_cv_mvwdelch_is_expression" = yes
15752then
Martin v. Löwis11437992002-04-12 09:54:03 +000015753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015755
15756fi
15757
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015758# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15759# structs since version 5.7. If the macro is defined as zero before including
15760# [n]curses.h, ncurses will expose fields of the structs regardless of the
15761# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15763$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015764if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015766else
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015768/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015769
15770 #define NCURSES_OPAQUE 0
15771 #include <curses.h>
15772
Martin v. Löwis11437992002-04-12 09:54:03 +000015773int
15774main ()
15775{
Jack Jansen666b1e72001-10-31 12:11:48 +000015776
15777 WINDOW *w;
15778 w->_flags = 0;
15779
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 ;
15781 return 0;
15782}
15783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015784if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015785 ac_cv_window_has_flags=yes
15786else
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15790fi
15791
Matthias Kloseb9621712010-04-24 17:59:49 +000015792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15793$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015794
Jack Jansen666b1e72001-10-31 12:11:48 +000015795
15796if test "$ac_cv_window_has_flags" = yes
15797then
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015800
15801fi
15802
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15804$as_echo_n "checking for is_pad... " >&6; }
15805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15806/* end confdefs.h. */
15807#include <curses.h>
15808int
15809main ()
15810{
15811
15812#ifndef is_pad
15813void *x=is_pad
15814#endif
15815
15816 ;
15817 return 0;
15818}
15819_ACEOF
15820if ac_fn_c_try_compile "$LINENO"; then :
15821
15822$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15823
15824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15825$as_echo "yes" >&6; }
15826else
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15828$as_echo "no" >&6; }
15829
15830fi
15831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15834$as_echo_n "checking for is_term_resized... " >&6; }
15835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015836/* end confdefs.h. */
15837#include <curses.h>
15838int
15839main ()
15840{
15841void *x=is_term_resized
15842 ;
15843 return 0;
15844}
15845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015846if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015849
Matthias Kloseb159a552010-04-25 21:00:44 +000015850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015851$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015852else
Matthias Kloseb9621712010-04-24 17:59:49 +000015853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15854$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015855
15856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15860$as_echo_n "checking for resize_term... " >&6; }
15861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015862/* end confdefs.h. */
15863#include <curses.h>
15864int
15865main ()
15866{
15867void *x=resize_term
15868 ;
15869 return 0;
15870}
15871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015872if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015875
Matthias Kloseb159a552010-04-25 21:00:44 +000015876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015877$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015878else
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15880$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015881
15882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15886$as_echo_n "checking for resizeterm... " >&6; }
15887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015888/* end confdefs.h. */
15889#include <curses.h>
15890int
15891main ()
15892{
15893void *x=resizeterm
15894 ;
15895 return 0;
15896}
15897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015898if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015901
Matthias Kloseb159a552010-04-25 21:00:44 +000015902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015903$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015904else
Matthias Kloseb9621712010-04-24 17:59:49 +000015905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15906$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015907
15908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015910
15911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15912$as_echo_n "checking for immedok... " >&6; }
15913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914/* end confdefs.h. */
15915#include <curses.h>
15916int
15917main ()
15918{
15919
15920#ifndef immedok
15921void *x=immedok
15922#endif
15923
15924 ;
15925 return 0;
15926}
15927_ACEOF
15928if ac_fn_c_try_compile "$LINENO"; then :
15929
15930$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15931
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15933$as_echo "yes" >&6; }
15934else
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15936$as_echo "no" >&6; }
15937
15938fi
15939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15940
15941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15942$as_echo_n "checking for syncok... " >&6; }
15943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15944/* end confdefs.h. */
15945#include <curses.h>
15946int
15947main ()
15948{
15949
15950#ifndef syncok
15951void *x=syncok
15952#endif
15953
15954 ;
15955 return 0;
15956}
15957_ACEOF
15958if ac_fn_c_try_compile "$LINENO"; then :
15959
15960$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15961
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15963$as_echo "yes" >&6; }
15964else
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15966$as_echo "no" >&6; }
15967
15968fi
15969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15970
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15972$as_echo_n "checking for wchgat... " >&6; }
15973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15974/* end confdefs.h. */
15975#include <curses.h>
15976int
15977main ()
15978{
15979
15980#ifndef wchgat
15981void *x=wchgat
15982#endif
15983
15984 ;
15985 return 0;
15986}
15987_ACEOF
15988if ac_fn_c_try_compile "$LINENO"; then :
15989
15990$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15991
15992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15993$as_echo "yes" >&6; }
15994else
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15996$as_echo "no" >&6; }
15997
15998fi
15999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16000
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16002$as_echo_n "checking for filter... " >&6; }
16003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16004/* end confdefs.h. */
16005#include <curses.h>
16006int
16007main ()
16008{
16009
16010#ifndef filter
16011void *x=filter
16012#endif
16013
16014 ;
16015 return 0;
16016}
16017_ACEOF
16018if ac_fn_c_try_compile "$LINENO"; then :
16019
16020$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16021
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16023$as_echo "yes" >&6; }
16024else
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16026$as_echo "no" >&6; }
16027
16028fi
16029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16030
16031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16032$as_echo_n "checking for has_key... " >&6; }
16033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16034/* end confdefs.h. */
16035#include <curses.h>
16036int
16037main ()
16038{
16039
16040#ifndef has_key
16041void *x=has_key
16042#endif
16043
16044 ;
16045 return 0;
16046}
16047_ACEOF
16048if ac_fn_c_try_compile "$LINENO"; then :
16049
16050$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16051
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16053$as_echo "yes" >&6; }
16054else
16055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16056$as_echo "no" >&6; }
16057
16058fi
16059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16060
16061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16062$as_echo_n "checking for typeahead... " >&6; }
16063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16064/* end confdefs.h. */
16065#include <curses.h>
16066int
16067main ()
16068{
16069
16070#ifndef typeahead
16071void *x=typeahead
16072#endif
16073
16074 ;
16075 return 0;
16076}
16077_ACEOF
16078if ac_fn_c_try_compile "$LINENO"; then :
16079
16080$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16081
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16083$as_echo "yes" >&6; }
16084else
16085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16086$as_echo "no" >&6; }
16087
16088fi
16089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16090
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16092$as_echo_n "checking for use_env... " >&6; }
16093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16094/* end confdefs.h. */
16095#include <curses.h>
16096int
16097main ()
16098{
16099
16100#ifndef use_env
16101void *x=use_env
16102#endif
16103
16104 ;
16105 return 0;
16106}
16107_ACEOF
16108if ac_fn_c_try_compile "$LINENO"; then :
16109
16110$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16111
16112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16113$as_echo "yes" >&6; }
16114else
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16116$as_echo "no" >&6; }
16117
16118fi
16119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016120# last curses configure check
16121CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16124$as_echo "$as_me: checking for device files" >&6;}
16125
16126if test "x$cross_compiling" = xyes; then
16127 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16129$as_echo_n "checking for /dev/ptmx... " >&6; }
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16131$as_echo "not set" >&6; }
16132 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16133 fi
16134 if test "${ac_cv_file__dev_ptc+set}" != set; then
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16136$as_echo_n "checking for /dev/ptc... " >&6; }
16137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16138$as_echo "not set" >&6; }
16139 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16140 fi
16141fi
16142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16144$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016145if ${ac_cv_file__dev_ptmx+:} false; then :
16146 $as_echo_n "(cached) " >&6
16147else
16148 test "$cross_compiling" = yes &&
16149 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16150if test -r "/dev/ptmx"; then
16151 ac_cv_file__dev_ptmx=yes
16152else
16153 ac_cv_file__dev_ptmx=no
16154fi
16155fi
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16157$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16158if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016159
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016160fi
16161
16162if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016165
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16168$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016169if ${ac_cv_file__dev_ptc+:} false; then :
16170 $as_echo_n "(cached) " >&6
16171else
16172 test "$cross_compiling" = yes &&
16173 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16174if test -r "/dev/ptc"; then
16175 ac_cv_file__dev_ptc=yes
16176else
16177 ac_cv_file__dev_ptc=no
16178fi
16179fi
16180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16181$as_echo "$ac_cv_file__dev_ptc" >&6; }
16182if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016183
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016184fi
16185
16186if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016187
Matthias Kloseb9621712010-04-24 17:59:49 +000016188$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016189
Neal Norwitz865400f2003-03-21 01:42:58 +000016190fi
16191
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016192if test $ac_sys_system = Darwin
16193then
16194 LIBS="$LIBS -framework CoreFoundation"
16195fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16198$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016199if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016201else
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016203 ac_cv_have_size_t_format="cross -- assuming yes"
16204
Thomas Wouters477c8d52006-05-27 19:21:47 +000016205else
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016207/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016208
Thomas Wouters477c8d52006-05-27 19:21:47 +000016209#include <stdio.h>
16210#include <stddef.h>
16211#include <string.h>
16212
Christian Heimes2c181612007-12-17 20:04:13 +000016213#ifdef HAVE_SYS_TYPES_H
16214#include <sys/types.h>
16215#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016216
16217#ifdef HAVE_SSIZE_T
16218typedef ssize_t Py_ssize_t;
16219#elif SIZEOF_VOID_P == SIZEOF_LONG
16220typedef long Py_ssize_t;
16221#else
16222typedef int Py_ssize_t;
16223#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016224
Christian Heimes2c181612007-12-17 20:04:13 +000016225int main()
16226{
16227 char buffer[256];
16228
Thomas Wouters477c8d52006-05-27 19:21:47 +000016229 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16230 return 1;
16231
Thomas Wouters89f507f2006-12-13 04:49:30 +000016232 if (strcmp(buffer, "123"))
16233 return 1;
16234
16235 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16236 return 1;
16237
16238 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016239 return 1;
16240
16241 return 0;
16242}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016243
Thomas Wouters477c8d52006-05-27 19:21:47 +000016244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016245if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016246 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016247else
Matthias Kloseb9621712010-04-24 17:59:49 +000016248 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016252fi
16253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16256$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016257if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016258
Matthias Kloseb9621712010-04-24 17:59:49 +000016259$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016260
16261fi
16262
Matthias Kloseb9621712010-04-24 17:59:49 +000016263ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016264#ifdef HAVE_SYS_TYPES_H
16265#include <sys/types.h>
16266#endif
16267#ifdef HAVE_SYS_SOCKET_H
16268#include <sys/socket.h>
16269#endif
16270
Matthias Kloseb9621712010-04-24 17:59:49 +000016271"
Victor Stinnere0be4232011-10-25 13:06:09 +020016272if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016273
Martin v. Löwis11437992002-04-12 09:54:03 +000016274else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016275
Matthias Kloseb9621712010-04-24 17:59:49 +000016276$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016277
16278fi
16279
Michael W. Hudson54241132001-12-07 15:38:26 +000016280
Matthias Kloseb9621712010-04-24 17:59:49 +000016281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16282$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016283if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016285else
Matthias Kloseb9621712010-04-24 17:59:49 +000016286 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016287 ac_cv_broken_mbstowcs=no
16288else
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016290/* end confdefs.h. */
16291
Stefan Krah19c21392012-11-22 23:47:32 +010016292#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016293#include<stdlib.h>
16294int main() {
16295 size_t len = -1;
16296 const char *str = "text";
16297 len = mbstowcs(NULL, str, 0);
16298 return (len != 4);
16299}
16300
16301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016302if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016303 ac_cv_broken_mbstowcs=no
16304else
Matthias Kloseb9621712010-04-24 17:59:49 +000016305 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016309fi
16310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016311fi
16312
Matthias Kloseb9621712010-04-24 17:59:49 +000016313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16314$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016315if test "$ac_cv_broken_mbstowcs" = yes
16316then
16317
Matthias Kloseb9621712010-04-24 17:59:49 +000016318$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016319
16320fi
16321
Antoine Pitroub52ec782009-01-25 16:34:23 +000016322# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16324$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016325
16326# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016327if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016328 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016329if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016330then
16331
Matthias Kloseb9621712010-04-24 17:59:49 +000016332$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016333
Matthias Kloseb9621712010-04-24 17:59:49 +000016334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16335$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016336fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016337if test "$withval" = no
16338then
16339
16340$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16341
Matthias Kloseb9621712010-04-24 17:59:49 +000016342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16343$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016344fi
16345
Antoine Pitrou042b1282010-08-13 21:15:58 +000016346else
16347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16348$as_echo "no value specified" >&6; }
16349fi
16350
Antoine Pitroub52ec782009-01-25 16:34:23 +000016351
Matthias Kloseb17289e2012-03-15 19:51:34 +010016352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16353$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16354if ${ac_cv_computed_gotos+:} false; then :
16355 $as_echo_n "(cached) " >&6
16356else
16357 if test "$cross_compiling" = yes; then :
16358 if test "${with_computed_gotos+set}" = set; then
16359 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16360 else
16361 ac_cv_computed_gotos=no
16362 fi
16363else
16364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16365/* end confdefs.h. */
16366
16367int main(int argc, char **argv)
16368{
16369 static void *targets[1] = { &&LABEL1 };
16370 goto LABEL2;
16371LABEL1:
16372 return 0;
16373LABEL2:
16374 goto *targets[0];
16375 return 1;
16376}
16377
16378_ACEOF
16379if ac_fn_c_try_run "$LINENO"; then :
16380 ac_cv_computed_gotos=yes
16381else
16382 ac_cv_computed_gotos=no
16383fi
16384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16385 conftest.$ac_objext conftest.beam conftest.$ac_ext
16386fi
16387
16388fi
16389
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16391$as_echo "$ac_cv_computed_gotos" >&6; }
16392case "$ac_cv_computed_gotos" in yes*)
16393
16394$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16395
16396esac
16397
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016398case $ac_sys_system in
16399AIX*)
16400
16401$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16402 ;;
16403esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016404
Michael W. Hudson54241132001-12-07 15:38:26 +000016405
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016406
16407
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016408for h in `(cd $srcdir;echo Python/thread_*.h)`
16409do
16410 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16411done
16412
Michael W. Hudson54241132001-12-07 15:38:26 +000016413
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016414SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16416$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016417for dir in $SRCDIRS; do
16418 if test ! -d $dir; then
16419 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016420 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016421done
Matthias Kloseb9621712010-04-24 17:59:49 +000016422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16423$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016424
Stefan Krah1919b7e2012-03-21 18:25:23 +010016425# Availability of -O2:
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16427$as_echo_n "checking for -O2... " >&6; }
16428saved_cflags="$CFLAGS"
16429CFLAGS="-O2"
16430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431/* end confdefs.h. */
16432
16433int
16434main ()
16435{
16436
16437
16438 ;
16439 return 0;
16440}
16441_ACEOF
16442if ac_fn_c_try_compile "$LINENO"; then :
16443 have_O2=yes
16444else
16445 have_O2=no
16446fi
16447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16449$as_echo "$have_O2" >&6; }
16450CFLAGS="$saved_cflags"
16451
16452# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16453# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16455$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16456saved_cflags="$CFLAGS"
16457CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16458if test "$have_O2" = no; then
16459 CFLAGS=""
16460fi
16461if test "$cross_compiling" = yes; then :
16462 have_glibc_memmove_bug=undefined
16463else
16464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16465/* end confdefs.h. */
16466
16467#include <stdio.h>
16468#include <stdlib.h>
16469#include <string.h>
16470void foo(void *p, void *q) { memmove(p, q, 19); }
16471int main() {
16472 char a[32] = "123456789000000000";
16473 foo(&a[9], a);
16474 if (strcmp(a, "123456789123456789000000000") != 0)
16475 return 1;
16476 foo(a, &a[9]);
16477 if (strcmp(a, "123456789000000000") != 0)
16478 return 1;
16479 return 0;
16480}
16481
16482_ACEOF
16483if ac_fn_c_try_run "$LINENO"; then :
16484 have_glibc_memmove_bug=no
16485else
16486 have_glibc_memmove_bug=yes
16487fi
16488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16489 conftest.$ac_objext conftest.beam conftest.$ac_ext
16490fi
16491
16492CFLAGS="$saved_cflags"
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16494$as_echo "$have_glibc_memmove_bug" >&6; }
16495if test "$have_glibc_memmove_bug" = yes; then
16496
16497$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16498
16499fi
16500
16501if test "$have_gcc_asm_for_x87" = yes; then
16502 # Some versions of gcc miscompile inline asm:
16503 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16504 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16505 case $CC in
16506 *gcc*)
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16508$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16509 saved_cflags="$CFLAGS"
16510 CFLAGS="-O2"
16511 if test "$cross_compiling" = yes; then :
16512 have_ipa_pure_const_bug=undefined
16513else
16514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515/* end confdefs.h. */
16516
16517 __attribute__((noinline)) int
16518 foo(int *p) {
16519 int r;
16520 asm ( "movl \$6, (%1)\n\t"
16521 "xorl %0, %0\n\t"
16522 : "=r" (r) : "r" (p) : "memory"
16523 );
16524 return r;
16525 }
16526 int main() {
16527 int p = 8;
16528 if ((foo(&p) ? : p) != 6)
16529 return 1;
16530 return 0;
16531 }
16532
16533_ACEOF
16534if ac_fn_c_try_run "$LINENO"; then :
16535 have_ipa_pure_const_bug=no
16536else
16537 have_ipa_pure_const_bug=yes
16538fi
16539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16540 conftest.$ac_objext conftest.beam conftest.$ac_ext
16541fi
16542
16543 CFLAGS="$saved_cflags"
16544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16545$as_echo "$have_ipa_pure_const_bug" >&6; }
16546 if test "$have_ipa_pure_const_bug" = yes; then
16547
16548$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16549
16550 fi
16551 ;;
16552 esac
16553fi
16554
Victor Stinner4f5366e2015-01-09 02:13:19 +010016555# Check for stdatomic.h
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16557$as_echo_n "checking for stdatomic.h... " >&6; }
16558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559/* end confdefs.h. */
16560
16561
16562 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016563 atomic_int value = ATOMIC_VAR_INIT(1);
16564 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016565 int main() {
16566 int loaded_value = atomic_load(&value);
16567 return 0;
16568 }
16569
16570
16571_ACEOF
16572if ac_fn_c_try_link "$LINENO"; then :
16573 have_stdatomic_h=yes
16574else
16575 have_stdatomic_h=no
16576fi
16577rm -f core conftest.err conftest.$ac_objext \
16578 conftest$ac_exeext conftest.$ac_ext
16579
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16581$as_echo "$have_stdatomic_h" >&6; }
16582
16583if test "$have_stdatomic_h" = yes; then
16584
16585$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16586
16587fi
16588
16589# Check for GCC >= 4.7 __atomic builtins
16590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16591$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593/* end confdefs.h. */
16594
16595
16596 volatile int val = 1;
16597 int main() {
16598 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16599 return 0;
16600 }
16601
16602
16603_ACEOF
16604if ac_fn_c_try_link "$LINENO"; then :
16605 have_builtin_atomic=yes
16606else
16607 have_builtin_atomic=no
16608fi
16609rm -f core conftest.err conftest.$ac_objext \
16610 conftest$ac_exeext conftest.$ac_ext
16611
16612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16613$as_echo "$have_builtin_atomic" >&6; }
16614
16615if test "$have_builtin_atomic" = yes; then
16616
16617$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16618
16619fi
16620
Ned Deily322f5ba2013-11-21 23:01:59 -080016621# ensurepip option
16622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16623$as_echo_n "checking for ensurepip... " >&6; }
16624
16625# Check whether --with-ensurepip was given.
16626if test "${with_ensurepip+set}" = set; then :
16627 withval=$with_ensurepip;
16628else
16629 with_ensurepip=upgrade
16630fi
16631
16632case $with_ensurepip in #(
16633 yes|upgrade) :
16634 ENSUREPIP=upgrade ;; #(
16635 install) :
16636 ENSUREPIP=install ;; #(
16637 no) :
16638 ENSUREPIP=no ;; #(
16639 *) :
16640 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16641esac
16642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16643$as_echo "$ENSUREPIP" >&6; }
16644
16645
Victor Stinner35a97c02015-03-08 02:59:09 +010016646# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16648$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16650/* end confdefs.h. */
16651
16652
16653 #include <dirent.h>
16654
16655 int main() {
16656 struct dirent entry;
16657 return entry.d_type == DT_UNKNOWN;
16658 }
16659
16660
16661_ACEOF
16662if ac_fn_c_try_link "$LINENO"; then :
16663 have_dirent_d_type=yes
16664else
16665 have_dirent_d_type=no
16666fi
16667rm -f core conftest.err conftest.$ac_objext \
16668 conftest$ac_exeext conftest.$ac_ext
16669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16670$as_echo "$have_dirent_d_type" >&6; }
16671
16672if test "$have_dirent_d_type" = yes; then
16673
16674$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16675
16676fi
16677
Victor Stinner9eb57c52015-03-19 22:21:49 +010016678# check if the Linux getrandom() syscall is available
16679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16680$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16682/* end confdefs.h. */
16683
16684
Victor Stinner1b80b242016-04-12 22:34:58 +020016685 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016686 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016687 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016688
16689 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016690 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016691 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016692 const int flags = GRND_NONBLOCK;
16693 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016694 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016695 return 0;
16696 }
16697
16698
16699_ACEOF
16700if ac_fn_c_try_link "$LINENO"; then :
16701 have_getrandom_syscall=yes
16702else
16703 have_getrandom_syscall=no
16704fi
16705rm -f core conftest.err conftest.$ac_objext \
16706 conftest$ac_exeext conftest.$ac_ext
16707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16708$as_echo "$have_getrandom_syscall" >&6; }
16709
16710if test "$have_getrandom_syscall" = yes; then
16711
16712$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16713
16714fi
16715
Victor Stinner3abf44e2015-09-18 15:38:37 +020016716# check if the getrandom() function is available
16717# the test was written for the Solaris function of <sys/random.h>
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16719$as_echo_n "checking for the getrandom() function... " >&6; }
16720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721/* end confdefs.h. */
16722
16723
16724 #include <sys/random.h>
16725
16726 int main() {
16727 char buffer[1];
16728 const size_t buflen = sizeof(buffer);
16729 const int flags = 0;
16730 /* ignore the result, Python checks for ENOSYS at runtime */
16731 (void)getrandom(buffer, buflen, flags);
16732 return 0;
16733 }
16734
16735
16736_ACEOF
16737if ac_fn_c_try_link "$LINENO"; then :
16738 have_getrandom=yes
16739else
16740 have_getrandom=no
16741fi
16742rm -f core conftest.err conftest.$ac_objext \
16743 conftest$ac_exeext conftest.$ac_ext
16744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16745$as_echo "$have_getrandom" >&6; }
16746
16747if test "$have_getrandom" = yes; then
16748
16749$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16750
16751fi
16752
Christian Heimesff5be6e2018-01-20 13:19:21 +010016753# Check for usable OpenSSL
16754
16755 found=false
16756
16757# Check whether --with-openssl was given.
16758if test "${with_openssl+set}" = set; then :
16759 withval=$with_openssl;
16760 case "$withval" in
16761 "" | y | ye | yes | n | no)
16762 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16763 ;;
16764 *) ssldirs="$withval"
16765 ;;
16766 esac
16767
16768else
16769
16770 # if pkg-config is installed and openssl has installed a .pc file,
16771 # then use that information and don't search ssldirs
16772 if test -n "$ac_tool_prefix"; then
16773 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16774set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16776$as_echo_n "checking for $ac_word... " >&6; }
16777if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16778 $as_echo_n "(cached) " >&6
16779else
16780 if test -n "$PKG_CONFIG"; then
16781 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16782else
16783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16784for as_dir in $PATH
16785do
16786 IFS=$as_save_IFS
16787 test -z "$as_dir" && as_dir=.
16788 for ac_exec_ext in '' $ac_executable_extensions; do
16789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16790 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16792 break 2
16793 fi
16794done
16795 done
16796IFS=$as_save_IFS
16797
16798fi
16799fi
16800PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16801if test -n "$PKG_CONFIG"; then
16802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16803$as_echo "$PKG_CONFIG" >&6; }
16804else
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16806$as_echo "no" >&6; }
16807fi
16808
16809
16810fi
16811if test -z "$ac_cv_prog_PKG_CONFIG"; then
16812 ac_ct_PKG_CONFIG=$PKG_CONFIG
16813 # Extract the first word of "pkg-config", so it can be a program name with args.
16814set dummy pkg-config; ac_word=$2
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16816$as_echo_n "checking for $ac_word... " >&6; }
16817if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16818 $as_echo_n "(cached) " >&6
16819else
16820 if test -n "$ac_ct_PKG_CONFIG"; then
16821 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16822else
16823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16824for as_dir in $PATH
16825do
16826 IFS=$as_save_IFS
16827 test -z "$as_dir" && as_dir=.
16828 for ac_exec_ext in '' $ac_executable_extensions; do
16829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16830 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16832 break 2
16833 fi
16834done
16835 done
16836IFS=$as_save_IFS
16837
16838fi
16839fi
16840ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16841if test -n "$ac_ct_PKG_CONFIG"; then
16842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16843$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16844else
16845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16846$as_echo "no" >&6; }
16847fi
16848
16849 if test "x$ac_ct_PKG_CONFIG" = x; then
16850 PKG_CONFIG=""
16851 else
16852 case $cross_compiling:$ac_tool_warned in
16853yes:)
16854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16856ac_tool_warned=yes ;;
16857esac
16858 PKG_CONFIG=$ac_ct_PKG_CONFIG
16859 fi
16860else
16861 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16862fi
16863
16864 if test x"$PKG_CONFIG" != x""; then
16865 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16866 if test $? = 0; then
16867 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16868 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16869 found=true
16870 fi
16871 fi
16872
16873 # no such luck; use some default ssldirs
16874 if ! $found; then
16875 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16876 fi
16877
16878
16879fi
16880
16881
16882
16883 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16884 # an 'openssl' subdirectory
16885
16886 if ! $found; then
16887 OPENSSL_INCLUDES=
16888 for ssldir in $ssldirs; do
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16890$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16891 if test -f "$ssldir/include/openssl/ssl.h"; then
16892 OPENSSL_INCLUDES="-I$ssldir/include"
16893 OPENSSL_LDFLAGS="-L$ssldir/lib"
16894 OPENSSL_LIBS="-lssl -lcrypto"
16895 found=true
16896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16897$as_echo "yes" >&6; }
16898 break
16899 else
16900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16901$as_echo "no" >&6; }
16902 fi
16903 done
16904
16905 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16906 # it will just work!
16907 fi
16908
16909 # try the preprocessor and linker with our new flags,
16910 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16911
16912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16913$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16914 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16915 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16916
16917 save_LIBS="$LIBS"
16918 save_LDFLAGS="$LDFLAGS"
16919 save_CPPFLAGS="$CPPFLAGS"
16920 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16921 LIBS="$OPENSSL_LIBS $LIBS"
16922 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16924/* end confdefs.h. */
16925#include <openssl/ssl.h>
16926int
16927main ()
16928{
16929SSL_new(NULL)
16930 ;
16931 return 0;
16932}
16933_ACEOF
16934if ac_fn_c_try_link "$LINENO"; then :
16935
16936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16937$as_echo "yes" >&6; }
16938 have_openssl=yes
16939
16940else
16941
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16943$as_echo "no" >&6; }
16944 have_openssl=no
16945
16946fi
16947rm -f core conftest.err conftest.$ac_objext \
16948 conftest$ac_exeext conftest.$ac_ext
16949 CPPFLAGS="$save_CPPFLAGS"
16950 LDFLAGS="$save_LDFLAGS"
16951 LIBS="$save_LIBS"
16952
16953
16954
16955
16956
16957
16958if test "$have_openssl" = yes; then
16959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16960$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16961
16962 save_LIBS="$LIBS"
16963 save_LDFLAGS="$LDFLAGS"
16964 save_CPPFLAGS="$CPPFLAGS"
16965 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16966 LIBS="$OPENSSL_LIBS $LIBS"
16967 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16968
16969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16970/* end confdefs.h. */
16971
16972 #include <openssl/x509_vfy.h>
16973
16974int
16975main ()
16976{
16977
16978 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16979 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16980 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16981 X509_VERIFY_PARAM_set_hostflags(p, 0);
16982
16983 ;
16984 return 0;
16985}
16986
16987_ACEOF
16988if ac_fn_c_try_link "$LINENO"; then :
16989
16990 ac_cv_has_x509_verify_param_set1_host=yes
16991
16992else
16993
16994 ac_cv_has_x509_verify_param_set1_host=no
16995
16996fi
16997rm -f core conftest.err conftest.$ac_objext \
16998 conftest$ac_exeext conftest.$ac_ext
16999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17000$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17001 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17002
17003$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17004
17005 fi
17006
17007 CPPFLAGS="$save_CPPFLAGS"
17008 LDFLAGS="$save_LDFLAGS"
17009 LIBS="$save_LIBS"
17010fi
17011
Christian Heimes892d66e2018-01-29 14:10:18 +010017012# ssl module default cipher suite string
17013
17014
17015
17016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17017$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17018
17019# Check whether --with-ssl-default-suites was given.
17020if test "${with_ssl_default_suites+set}" = set; then :
17021 withval=$with_ssl_default_suites;
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17023$as_echo "$withval" >&6; }
17024case "$withval" in
17025 python)
17026 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17027
17028 ;;
17029 openssl)
17030 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17031
17032 ;;
17033 *)
17034 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17035
17036 cat >>confdefs.h <<_ACEOF
17037#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17038_ACEOF
17039
17040 ;;
17041esac
17042
17043else
17044
17045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17046$as_echo "python" >&6; }
17047$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17048
17049
17050fi
17051
17052
17053
Guido van Rossum627b2d71993-12-24 10:39:16 +000017054# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017055ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017056
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017057ac_config_files="$ac_config_files Modules/ld_so_aix"
17058
Martin v. Löwis11437992002-04-12 09:54:03 +000017059cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017060# This file is a shell script that caches the results of configure
17061# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017062# scripts and configure runs, see configure's option --config-cache.
17063# It is not useful on other systems. If it contains results you don't
17064# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017065#
Martin v. Löwis11437992002-04-12 09:54:03 +000017066# config.status only pays attention to the cache file if you give it
17067# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017068#
Skip Montanaro6dead952003-09-25 14:50:04 +000017069# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017070# loading this file, other *unset* `ac_cv_foo' will be assigned the
17071# following values.
17072
17073_ACEOF
17074
Guido van Rossumf78abae1997-01-21 22:02:36 +000017075# The following way of writing the cache mishandles newlines in values,
17076# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017078# Ultrix sh set writes to stderr and can't be redirected directly,
17079# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080(
17081 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17082 eval ac_val=\$$ac_var
17083 case $ac_val in #(
17084 *${as_nl}*)
17085 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17087$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 esac
17089 case $ac_var in #(
17090 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17092 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 esac ;;
17094 esac
17095 done
17096
Martin v. Löwis11437992002-04-12 09:54:03 +000017097 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17099 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 # `set' does not quote correctly, so add quotes: double-quote
17101 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017103 "s/'/'\\\\''/g;
17104 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017106 *)
17107 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 esac |
17111 sort
17112) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017113 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17118 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17120 :end' >>confcache
17121if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17122 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017123 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017124 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17125$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017126 if test ! -f "$cache_file" || test -h "$cache_file"; then
17127 cat confcache >"$cache_file"
17128 else
17129 case $cache_file in #(
17130 */* | ?:*)
17131 mv -f confcache "$cache_file"$$ &&
17132 mv -f "$cache_file"$$ "$cache_file" ;; #(
17133 *)
17134 mv -f confcache "$cache_file" ;;
17135 esac
17136 fi
17137 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017138 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17140$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017142fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017143rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017144
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017145test "x$prefix" = xNONE && prefix=$ac_default_prefix
17146# Let make expand exec_prefix.
17147test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017148
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017149DEFS=-DHAVE_CONFIG_H
17150
Skip Montanaro6dead952003-09-25 14:50:04 +000017151ac_libobjs=
17152ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017153U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017154for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17155 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17159 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017160 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17161 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017162done
17163LIBOBJS=$ac_libobjs
17164
17165LTLIBOBJS=$ac_ltlibobjs
17166
17167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169
Victor Stinnere0be4232011-10-25 13:06:09 +020017170: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017171ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017172ac_clean_files_save=$ac_clean_files
17173ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017174{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17175$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17176as_write_fail=0
17177cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017178#! $SHELL
17179# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017180# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017181# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017182# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017183
Martin v. Löwis11437992002-04-12 09:54:03 +000017184debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017185ac_cs_recheck=false
17186ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017187
Matthias Kloseb9621712010-04-24 17:59:49 +000017188SHELL=\${CONFIG_SHELL-$SHELL}
17189export SHELL
17190_ASEOF
17191cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17192## -------------------- ##
17193## M4sh Initialization. ##
17194## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196# Be more Bourne compatible
17197DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017198if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 emulate sh
17200 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017201 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017202 # is contrary to our usage. Disable this feature.
17203 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017205else
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 case `(set -o) 2>/dev/null` in #(
17207 *posix*) :
17208 set -o posix ;; #(
17209 *) :
17210 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017212fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017213
17214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215as_nl='
17216'
17217export as_nl
17218# Printing a long string crashes Solaris 7 /usr/bin/printf.
17219as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17220as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17221as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17222# Prefer a ksh shell builtin over an external printf program on Solaris,
17223# but without wasting forks for bash or zsh.
17224if test -z "$BASH_VERSION$ZSH_VERSION" \
17225 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17226 as_echo='print -r --'
17227 as_echo_n='print -rn --'
17228elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17229 as_echo='printf %s\n'
17230 as_echo_n='printf %s'
17231else
17232 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17233 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17234 as_echo_n='/usr/ucb/echo -n'
17235 else
17236 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17237 as_echo_n_body='eval
17238 arg=$1;
17239 case $arg in #(
17240 *"$as_nl"*)
17241 expr "X$arg" : "X\\(.*\\)$as_nl";
17242 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17243 esac;
17244 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17245 '
17246 export as_echo_n_body
17247 as_echo_n='sh -c $as_echo_n_body as_echo'
17248 fi
17249 export as_echo_body
17250 as_echo='sh -c $as_echo_body as_echo'
17251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017252
17253# The user is always right.
17254if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017255 PATH_SEPARATOR=:
17256 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17257 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17258 PATH_SEPARATOR=';'
17259 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262
17263# IFS
17264# We need space, tab and new line, in precisely that order. Quoting is
17265# there to prevent editors from complaining about space-tab.
17266# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17267# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268IFS=" "" $as_nl"
17269
17270# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017271as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017272case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273 *[\\/]* ) as_myself=$0 ;;
17274 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017275for as_dir in $PATH
17276do
17277 IFS=$as_save_IFS
17278 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017279 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17280 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 ;;
17284esac
17285# We did not find ourselves, most probably we were run as `sh COMMAND'
17286# in which case we are not to be found in the path.
17287if test "x$as_myself" = x; then
17288 as_myself=$0
17289fi
17290if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17292 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293fi
17294
Matthias Kloseb9621712010-04-24 17:59:49 +000017295# Unset variables that we do not need and which cause bugs (e.g. in
17296# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17297# suppresses any "Segmentation fault" message there. '((' could
17298# trigger a bug in pdksh 5.2.14.
17299for as_var in BASH_ENV ENV MAIL MAILPATH
17300do eval test x\${$as_var+set} = xset \
17301 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302done
17303PS1='$ '
17304PS2='> '
17305PS4='+ '
17306
17307# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017308LC_ALL=C
17309export LC_ALL
17310LANGUAGE=C
17311export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312
Matthias Kloseb9621712010-04-24 17:59:49 +000017313# CDPATH.
17314(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17315
17316
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017317# as_fn_error STATUS ERROR [LINENO LOG_FD]
17318# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017319# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17320# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017321# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017322as_fn_error ()
17323{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017324 as_status=$1; test $as_status -eq 0 && as_status=1
17325 if test "$4"; then
17326 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17327 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017329 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017330 as_fn_exit $as_status
17331} # as_fn_error
17332
17333
17334# as_fn_set_status STATUS
17335# -----------------------
17336# Set $? to STATUS, without forking.
17337as_fn_set_status ()
17338{
17339 return $1
17340} # as_fn_set_status
17341
17342# as_fn_exit STATUS
17343# -----------------
17344# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17345as_fn_exit ()
17346{
17347 set +e
17348 as_fn_set_status $1
17349 exit $1
17350} # as_fn_exit
17351
17352# as_fn_unset VAR
17353# ---------------
17354# Portably unset VAR.
17355as_fn_unset ()
17356{
17357 { eval $1=; unset $1;}
17358}
17359as_unset=as_fn_unset
17360# as_fn_append VAR VALUE
17361# ----------------------
17362# Append the text in VALUE to the end of the definition contained in VAR. Take
17363# advantage of any shell optimizations that allow amortized linear growth over
17364# repeated appends, instead of the typical quadratic growth present in naive
17365# implementations.
17366if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17367 eval 'as_fn_append ()
17368 {
17369 eval $1+=\$2
17370 }'
17371else
17372 as_fn_append ()
17373 {
17374 eval $1=\$$1\$2
17375 }
17376fi # as_fn_append
17377
17378# as_fn_arith ARG...
17379# ------------------
17380# Perform arithmetic evaluation on the ARGs, and store the result in the
17381# global $as_val. Take advantage of shells that can avoid forks. The arguments
17382# must be portable across $(()) and expr.
17383if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17384 eval 'as_fn_arith ()
17385 {
17386 as_val=$(( $* ))
17387 }'
17388else
17389 as_fn_arith ()
17390 {
17391 as_val=`expr "$@" || test $? -eq 1`
17392 }
17393fi # as_fn_arith
17394
17395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396if expr a : '\(a\)' >/dev/null 2>&1 &&
17397 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17398 as_expr=expr
17399else
17400 as_expr=false
17401fi
17402
17403if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17404 as_basename=basename
17405else
17406 as_basename=false
17407fi
17408
Matthias Kloseb9621712010-04-24 17:59:49 +000017409if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17410 as_dirname=dirname
17411else
17412 as_dirname=false
17413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415as_me=`$as_basename -- "$0" ||
17416$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17417 X"$0" : 'X\(//\)$' \| \
17418 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017419$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 sed '/^.*\/\([^/][^/]*\)\/*$/{
17421 s//\1/
17422 q
17423 }
17424 /^X\/\(\/\/\)$/{
17425 s//\1/
17426 q
17427 }
17428 /^X\/\(\/\).*/{
17429 s//\1/
17430 q
17431 }
17432 s/.*/./; q'`
17433
Matthias Kloseb9621712010-04-24 17:59:49 +000017434# Avoid depending upon Character Ranges.
17435as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17436as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17437as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17438as_cr_digits='0123456789'
17439as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440
17441ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017442case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 xy) ECHO_C='\c';;
17447 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17448 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 esac;;
17450*)
17451 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017453
Martin v. Löwis11437992002-04-12 09:54:03 +000017454rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455if test -d conf$$.dir; then
17456 rm -f conf$$.dir/conf$$.file
17457else
17458 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017461if (echo >conf$$.file) 2>/dev/null; then
17462 if ln -s conf$$.file conf$$ 2>/dev/null; then
17463 as_ln_s='ln -s'
17464 # ... but there are two gotchas:
17465 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17466 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017467 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017468 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017469 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 elif ln conf$$.file conf$$ 2>/dev/null; then
17471 as_ln_s=ln
17472 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017473 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017475else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017476 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17479rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017480
Matthias Kloseb9621712010-04-24 17:59:49 +000017481
17482# as_fn_mkdir_p
17483# -------------
17484# Create "$as_dir" as a directory, including parents if necessary.
17485as_fn_mkdir_p ()
17486{
17487
17488 case $as_dir in #(
17489 -*) as_dir=./$as_dir;;
17490 esac
17491 test -d "$as_dir" || eval $as_mkdir_p || {
17492 as_dirs=
17493 while :; do
17494 case $as_dir in #(
17495 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17496 *) as_qdir=$as_dir;;
17497 esac
17498 as_dirs="'$as_qdir' $as_dirs"
17499 as_dir=`$as_dirname -- "$as_dir" ||
17500$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17501 X"$as_dir" : 'X\(//\)[^/]' \| \
17502 X"$as_dir" : 'X\(//\)$' \| \
17503 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17504$as_echo X"$as_dir" |
17505 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17506 s//\1/
17507 q
17508 }
17509 /^X\(\/\/\)[^/].*/{
17510 s//\1/
17511 q
17512 }
17513 /^X\(\/\/\)$/{
17514 s//\1/
17515 q
17516 }
17517 /^X\(\/\).*/{
17518 s//\1/
17519 q
17520 }
17521 s/.*/./; q'`
17522 test -d "$as_dir" && break
17523 done
17524 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017525 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017526
17527
17528} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017529if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017531else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017532 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017533 as_mkdir_p=false
17534fi
17535
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017536
17537# as_fn_executable_p FILE
17538# -----------------------
17539# Test if FILE is an executable regular file.
17540as_fn_executable_p ()
17541{
17542 test -f "$1" && test -x "$1"
17543} # as_fn_executable_p
17544as_test_x='test -x'
17545as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017546
17547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017548as_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 +000017549
17550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017552
17553
Martin v. Löwis11437992002-04-12 09:54:03 +000017554exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017555## ----------------------------------- ##
17556## Main body of $CONFIG_STATUS script. ##
17557## ----------------------------------- ##
17558_ASEOF
17559test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017560
Matthias Kloseb9621712010-04-24 17:59:49 +000017561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17562# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017563# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564# values after options handling.
17565ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017566This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017567generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017568
17569 CONFIG_FILES = $CONFIG_FILES
17570 CONFIG_HEADERS = $CONFIG_HEADERS
17571 CONFIG_LINKS = $CONFIG_LINKS
17572 CONFIG_COMMANDS = $CONFIG_COMMANDS
17573 $ $0 $@
17574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575on `(hostname || uname -n) 2>/dev/null | sed 1q`
17576"
17577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578_ACEOF
17579
Matthias Kloseb9621712010-04-24 17:59:49 +000017580case $ac_config_files in *"
17581"*) set x $ac_config_files; shift; ac_config_files=$*;;
17582esac
17583
17584case $ac_config_headers in *"
17585"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17586esac
17587
17588
17589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017590# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017591config_files="$ac_config_files"
17592config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017595
Matthias Kloseb9621712010-04-24 17:59:49 +000017596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017597ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017598\`$as_me' instantiates files and other configuration actions
17599from templates according to the current configuration. Unless the files
17600and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
Matthias Kloseb9621712010-04-24 17:59:49 +000017602Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017603
17604 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 --config print configuration, then exit
17607 -q, --quiet, --silent
17608 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 -d, --debug don't remove temporary files
17610 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 --file=FILE[:TEMPLATE]
17612 instantiate the configuration file FILE
17613 --header=FILE[:TEMPLATE]
17614 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017615
17616Configuration files:
17617$config_files
17618
17619Configuration headers:
17620$config_headers
17621
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017622Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17626ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017627ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017628python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017629configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017633This config.status script is free software; the Free Software Foundation
17634gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635
17636ac_pwd='$ac_pwd'
17637srcdir='$srcdir'
17638INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017639MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017640test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017641_ACEOF
17642
Matthias Kloseb9621712010-04-24 17:59:49 +000017643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17644# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017645ac_need_defaults=:
17646while test $# != 0
17647do
17648 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017649 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17651 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017652 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017654 --*=)
17655 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17656 ac_optarg=
17657 ac_shift=:
17658 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017660 ac_option=$1
17661 ac_optarg=$2
17662 ac_shift=shift
17663 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 esac
17665
Skip Montanaro6dead952003-09-25 14:50:04 +000017666 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017668 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17669 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017671 $as_echo "$ac_cs_version"; exit ;;
17672 --config | --confi | --conf | --con | --co | --c )
17673 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 debug=: ;;
17676 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017677 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017678 case $ac_optarg in
17679 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017680 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017681 esac
17682 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 ac_need_defaults=false;;
17684 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017686 case $ac_optarg in
17687 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17688 esac
17689 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 --he | --h)
17692 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017693 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017694Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017697 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17698 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17699 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017700
17701 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017702 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017703Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017704
Matthias Kloseb9621712010-04-24 17:59:49 +000017705 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017707
17708 esac
17709 shift
17710done
17711
Skip Montanaro6dead952003-09-25 14:50:04 +000017712ac_configure_extra_args=
17713
17714if $ac_cs_silent; then
17715 exec 6>/dev/null
17716 ac_configure_extra_args="$ac_configure_extra_args --silent"
17717fi
17718
17719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017720cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017721if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017722 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 shift
17724 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17725 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017727 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017728fi
17729
Martin v. Löwis11437992002-04-12 09:54:03 +000017730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732exec 5>>config.log
17733{
17734 echo
17735 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17736## Running $as_me. ##
17737_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017744
Matthias Kloseb9621712010-04-24 17:59:49 +000017745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746
17747# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017748for ac_config_target in $ac_config_targets
17749do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 case $ac_config_target in
17751 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17752 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17753 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017754 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17755 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017757 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017758 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017759 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760
Victor Stinnere0be4232011-10-25 13:06:09 +020017761 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 esac
17763done
17764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765
Martin v. Löwis11437992002-04-12 09:54:03 +000017766# If the user did not use the arguments to specify the items to instantiate,
17767# then the envvar interface is used. Set only those that are not.
17768# We use the long form for the default assignment because of an extremely
17769# bizarre bug on SunOS 4.1.3.
17770if $ac_need_defaults; then
17771 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17772 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17773fi
17774
Skip Montanaro6dead952003-09-25 14:50:04 +000017775# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017777# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778# Hook for its removal unless debugging.
17779# Note that there is a small window in which the directory will not be cleaned:
17780# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017781$debug ||
17782{
Victor Stinnere0be4232011-10-25 13:06:09 +020017783 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017785 : "${ac_tmp:=$tmp}"
17786 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017788 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017789}
Martin v. Löwis11437992002-04-12 09:54:03 +000017790# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017791
Martin v. Löwis11437992002-04-12 09:54:03 +000017792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017794 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017795} ||
17796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797 tmp=./conf$$-$RANDOM
17798 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017799} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017800ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017801
Matthias Kloseb9621712010-04-24 17:59:49 +000017802# Set up the scripts for CONFIG_FILES section.
17803# No need to generate them if there are no CONFIG_FILES.
17804# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017806
Matthias Kloseb9621712010-04-24 17:59:49 +000017807
17808ac_cr=`echo X | tr X '\015'`
17809# On cygwin, bash can eat \r inside `` if the user requested igncr.
17810# But we know of no other shell where ac_cr would be empty at this
17811# point, so we can use a bashism as a fallback.
17812if test "x$ac_cr" = x; then
17813 eval ac_cr=\$\'\\r\'
17814fi
17815ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17816if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017817 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017818else
17819 ac_cs_awk_cr=$ac_cr
17820fi
17821
Victor Stinnere0be4232011-10-25 13:06:09 +020017822echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017823_ACEOF
17824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825
Matthias Kloseb9621712010-04-24 17:59:49 +000017826{
17827 echo "cat >conf$$subs.awk <<_ACEOF" &&
17828 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17829 echo "_ACEOF"
17830} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017831 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17832ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833ac_delim='%!_!# '
17834for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017835 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017836 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837
Matthias Kloseb9621712010-04-24 17:59:49 +000017838 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17839 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840 break
17841 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017842 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843 else
17844 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017846done
Matthias Kloseb9621712010-04-24 17:59:49 +000017847rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848
Matthias Kloseb9621712010-04-24 17:59:49 +000017849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017850cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017852sed -n '
17853h
17854s/^/S["/; s/!.*/"]=/
17855p
17856g
17857s/^[^!]*!//
17858:repl
17859t repl
17860s/'"$ac_delim"'$//
17861t delim
17862:nl
17863h
17864s/\(.\{148\}\)..*/\1/
17865t more1
17866s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17867p
17868n
17869b repl
17870:more1
17871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17872p
17873g
17874s/.\{148\}//
17875t nl
17876:delim
17877h
17878s/\(.\{148\}\)..*/\1/
17879t more2
17880s/["\\]/\\&/g; s/^/"/; s/$/"/
17881p
17882b
17883:more2
17884s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17885p
17886g
17887s/.\{148\}//
17888t delim
17889' <conf$$subs.awk | sed '
17890/^[^""]/{
17891 N
17892 s/\n//
17893}
17894' >>$CONFIG_STATUS || ac_write_fail=1
17895rm -f conf$$subs.awk
17896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17897_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017898cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017899 for (key in S) S_is_set[key] = 1
17900 FS = ""
17901
17902}
17903{
17904 line = $ 0
17905 nfields = split(line, field, "@")
17906 substed = 0
17907 len = length(field[1])
17908 for (i = 2; i < nfields; i++) {
17909 key = field[i]
17910 keylen = length(key)
17911 if (S_is_set[key]) {
17912 value = S[key]
17913 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17914 len += length(value) + length(field[++i])
17915 substed = 1
17916 } else
17917 len += 1 + keylen
17918 }
17919
17920 print line
17921}
17922
17923_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17926if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17927 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17928else
17929 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017930fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017931 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017932_ACEOF
17933
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017934# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17935# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936# trailing colons and then remove the whole line if VPATH becomes empty
17937# (actually we leave an empty line to preserve line numbers).
17938if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017939 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17940h
17941s///
17942s/^/:/
17943s/[ ]*$/:/
17944s/:\$(srcdir):/:/g
17945s/:\${srcdir}:/:/g
17946s/:@srcdir@:/:/g
17947s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017949x
17950s/\(=[ ]*\).*/\1/
17951G
17952s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953s/^[^=]*=[ ]*$//
17954}'
17955fi
17956
Matthias Kloseb9621712010-04-24 17:59:49 +000017957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017958fi # test -n "$CONFIG_FILES"
17959
Matthias Kloseb9621712010-04-24 17:59:49 +000017960# Set up the scripts for CONFIG_HEADERS section.
17961# No need to generate them if there are no CONFIG_HEADERS.
17962# This happens for instance with `./config.status Makefile'.
17963if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017964cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017965BEGIN {
17966_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967
Matthias Kloseb9621712010-04-24 17:59:49 +000017968# Transform confdefs.h into an awk script `defines.awk', embedded as
17969# here-document in config.status, that substitutes the proper values into
17970# config.h.in to produce config.h.
17971
17972# Create a delimiter string that does not exist in confdefs.h, to ease
17973# handling of long lines.
17974ac_delim='%!_!# '
17975for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017976 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17977 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017978 break
17979 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017980 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 else
17982 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17983 fi
17984done
17985
17986# For the awk script, D is an array of macro values keyed by name,
17987# likewise P contains macro parameters if any. Preserve backslash
17988# newline sequences.
17989
17990ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17991sed -n '
17992s/.\{148\}/&'"$ac_delim"'/g
17993t rset
17994:rset
17995s/^[ ]*#[ ]*define[ ][ ]*/ /
17996t def
17997d
17998:def
17999s/\\$//
18000t bsnl
18001s/["\\]/\\&/g
18002s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18003D["\1"]=" \3"/p
18004s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18005d
18006:bsnl
18007s/["\\]/\\&/g
18008s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18009D["\1"]=" \3\\\\\\n"\\/p
18010t cont
18011s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18012t cont
18013d
18014:cont
18015n
18016s/.\{148\}/&'"$ac_delim"'/g
18017t clear
18018:clear
18019s/\\$//
18020t bsnlc
18021s/["\\]/\\&/g; s/^/"/; s/$/"/p
18022d
18023:bsnlc
18024s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18025b cont
18026' <confdefs.h | sed '
18027s/'"$ac_delim"'/"\\\
18028"/g' >>$CONFIG_STATUS || ac_write_fail=1
18029
18030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18031 for (key in D) D_is_set[key] = 1
18032 FS = ""
18033}
18034/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18035 line = \$ 0
18036 split(line, arg, " ")
18037 if (arg[1] == "#") {
18038 defundef = arg[2]
18039 mac1 = arg[3]
18040 } else {
18041 defundef = substr(arg[1], 2)
18042 mac1 = arg[2]
18043 }
18044 split(mac1, mac2, "(") #)
18045 macro = mac2[1]
18046 prefix = substr(line, 1, index(line, defundef) - 1)
18047 if (D_is_set[macro]) {
18048 # Preserve the white space surrounding the "#".
18049 print prefix "define", macro P[macro] D[macro]
18050 next
18051 } else {
18052 # Replace #undef with comments. This is necessary, for example,
18053 # in the case of _POSIX_SOURCE, which is predefined and required
18054 # on some systems where configure will not decide to define it.
18055 if (defundef == "undef") {
18056 print "/*", prefix defundef, macro, "*/"
18057 next
18058 }
18059 }
18060}
18061{ print }
18062_ACAWK
18063_ACEOF
18064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018065 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018066fi # test -n "$CONFIG_HEADERS"
18067
18068
18069eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18070shift
18071for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072do
18073 case $ac_tag in
18074 :[FHLC]) ac_mode=$ac_tag; continue;;
18075 esac
18076 case $ac_mode$ac_tag in
18077 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018078 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 :[FH]-) ac_tag=-:-;;
18080 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18081 esac
18082 ac_save_IFS=$IFS
18083 IFS=:
18084 set x $ac_tag
18085 IFS=$ac_save_IFS
18086 shift
18087 ac_file=$1
18088 shift
18089
18090 case $ac_mode in
18091 :L) ac_source=$1;;
18092 :[FH])
18093 ac_file_inputs=
18094 for ac_f
18095 do
18096 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018097 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 *) # Look for the file first in the build tree, then in the source tree
18099 # (if the path is not absolute). The absolute path cannot be DOS-style,
18100 # because $ac_f cannot contain `:'.
18101 test -f "$ac_f" ||
18102 case $ac_f in
18103 [\\/$]*) false;;
18104 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18105 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018106 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18109 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 done
18111
18112 # Let's still pretend it is `configure' which instantiates (i.e., don't
18113 # use $as_me), people would be surprised to read:
18114 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018115 configure_input='Generated from '`
18116 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18117 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118 if test x"$ac_file" != x-; then
18119 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018120 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18121$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018123 # Neutralize special characters interpreted by sed in replacement strings.
18124 case $configure_input in #(
18125 *\&* | *\|* | *\\* )
18126 ac_sed_conf_input=`$as_echo "$configure_input" |
18127 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18128 *) ac_sed_conf_input=$configure_input;;
18129 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130
18131 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018132 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134 esac
18135 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 esac
18137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018139$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018140 X"$ac_file" : 'X\(//\)[^/]' \| \
18141 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018143$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18145 s//\1/
18146 q
18147 }
18148 /^X\(\/\/\)[^/].*/{
18149 s//\1/
18150 q
18151 }
18152 /^X\(\/\/\)$/{
18153 s//\1/
18154 q
18155 }
18156 /^X\(\/\).*/{
18157 s//\1/
18158 q
18159 }
18160 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018161 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 ac_builddir=.
18163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164case "$ac_dir" in
18165.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18166*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018167 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018169 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170 case $ac_top_builddir_sub in
18171 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18172 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18173 esac ;;
18174esac
18175ac_abs_top_builddir=$ac_pwd
18176ac_abs_builddir=$ac_pwd$ac_dir_suffix
18177# for backward compatibility:
18178ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
18180case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018183 ac_top_srcdir=$ac_top_builddir_sub
18184 ac_abs_top_srcdir=$ac_pwd ;;
18185 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018186 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018187 ac_top_srcdir=$srcdir
18188 ac_abs_top_srcdir=$srcdir ;;
18189 *) # Relative name.
18190 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18191 ac_top_srcdir=$ac_top_build_prefix$srcdir
18192 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018193esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018195
Martin v. Löwis11437992002-04-12 09:54:03 +000018196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197 case $ac_mode in
18198 :F)
18199 #
18200 # CONFIG_FILE
18201 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018202
18203 case $INSTALL in
18204 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018206 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018207 ac_MKDIR_P=$MKDIR_P
18208 case $MKDIR_P in
18209 [\\/$]* | ?:[\\/]* ) ;;
18210 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18211 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018212_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213
Matthias Kloseb9621712010-04-24 17:59:49 +000018214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215# If the template does not know about datarootdir, expand it.
18216# FIXME: This hack should be removed a few years after 2.60.
18217ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018218ac_sed_dataroot='
18219/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220 p
18221 q
18222}
18223/@datadir@/p
18224/@docdir@/p
18225/@infodir@/p
18226/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018227/@mandir@/p'
18228case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229*datarootdir*) ac_datarootdir_seen=yes;;
18230*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18232$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 ac_datarootdir_hack='
18236 s&@datadir@&$datadir&g
18237 s&@docdir@&$docdir&g
18238 s&@infodir@&$infodir&g
18239 s&@localedir@&$localedir&g
18240 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018241 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242esac
18243_ACEOF
18244
18245# Neutralize VPATH when `$srcdir' = `.'.
18246# Shell code in configure.ac might set extrasub.
18247# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18249ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018250$extrasub
18251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018253:t
18254/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018255s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018257s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258s&@srcdir@&$ac_srcdir&;t t
18259s&@abs_srcdir@&$ac_abs_srcdir&;t t
18260s&@top_srcdir@&$ac_top_srcdir&;t t
18261s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18262s&@builddir@&$ac_builddir&;t t
18263s&@abs_builddir@&$ac_abs_builddir&;t t
18264s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18265s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018266s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018267$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018268"
Victor Stinnere0be4232011-10-25 13:06:09 +020018269eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18270 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018273 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18274 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18275 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018277which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018278$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018279which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018280
Victor Stinnere0be4232011-10-25 13:06:09 +020018281 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018282 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018283 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18284 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018285 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018286 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287 ;;
18288 :H)
18289 #
18290 # CONFIG_HEADER
18291 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018293 {
18294 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018295 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18296 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018297 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018298 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018299 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18300$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018302 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018303 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018304 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018305 fi
18306 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018307 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018308 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018309 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313
18314 esac
18315
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018316
18317 case $ac_file$ac_mode in
18318 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18319
18320 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321done # for ac_tag
18322
Guido van Rossum627b2d71993-12-24 10:39:16 +000018323
Matthias Kloseb9621712010-04-24 17:59:49 +000018324as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018325_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018326ac_clean_files=$ac_clean_files_save
18327
Matthias Kloseb9621712010-04-24 17:59:49 +000018328test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018329 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018330
Martin v. Löwis11437992002-04-12 09:54:03 +000018331
18332# configure is writing to config.log, and then calls config.status.
18333# config.status does its own redirection, appending to config.log.
18334# Unfortunately, on DOS this fails, as config.log is still kept open
18335# by configure, so config.status won't be able to write to it; its
18336# output is simply discarded. So we exec the FD to /dev/null,
18337# effectively closing config.log, so it can be properly (re)opened and
18338# appended to by config.status. When coming back to configure, we
18339# need to make the FD available again.
18340if test "$no_create" != yes; then
18341 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018342 ac_config_status_args=
18343 test "$silent" = yes &&
18344 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018346 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018347 exec 5>>config.log
18348 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18349 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018350 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018351fi
18352if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18354$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018355fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018356
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018357
Christian Heimes75ed8902013-11-20 01:11:18 +010018358echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018359if test ! -f Modules/Setup
18360then
18361 cp $srcdir/Modules/Setup.dist Modules/Setup
18362fi
18363
Christian Heimes75ed8902013-11-20 01:11:18 +010018364echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018365if test ! -f Modules/Setup.local
18366then
18367 echo "# Edit this file for local setup changes" >Modules/Setup.local
18368fi
18369
Christian Heimes75ed8902013-11-20 01:11:18 +010018370echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018371$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018372 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018373 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018374mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018375
18376if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18377 echo "" >&6
18378 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018379 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 +000018380 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018381 echo "" >&6
18382 echo "" >&6
18383fi
18384