blob: 36bac4d4c409aa2594b5acd0e5f101e79ac5f505 [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 Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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 Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_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
Miss Islington (bot)3fc12f02018-07-15 17:44:11 -0700784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
811with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600812with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_libs
824with_system_expat
825with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100826with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000827enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700828with_tcltk_includes
829with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000831enable_ipv6
832with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000834with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700836with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_libm
838with_libc
839enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800841with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100842with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100843with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000844'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 ac_precious_vars='build_alias
846host_alias
847target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100848MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849CC
850CFLAGS
851LDFLAGS
852LIBS
853CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100854CPP
855PKG_CONFIG
856PKG_CONFIG_PATH
857PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861ac_init_help=
862ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000863ac_unrecognized_opts=
864ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# The variables have the same names as the options, with
866# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870no_recursion=
871prefix=NONE
872program_prefix=NONE
873program_suffix=NONE
874program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879x_includes=NONE
880x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000881
882# Installation directory options.
883# These are left unexpanded so users can "make install exec_prefix=/foo"
884# and all the variables that are supposed to be based on exec_prefix
885# by default will actually change.
886# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888bindir='${exec_prefix}/bin'
889sbindir='${exec_prefix}/sbin'
890libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891datarootdir='${prefix}/share'
892datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893sysconfdir='${prefix}/etc'
894sharedstatedir='${prefix}/com'
895localstatedir='${prefix}/var'
Miss Islington (bot)3fc12f02018-07-15 17:44:11 -0700896runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Miss Islington (bot)3fc12f02018-07-15 17:44:11 -07001149 -runstatedir | --runstatedir | --runstatedi | --runstated \
1150 | --runstate | --runstat | --runsta | --runst | --runs \
1151 | --run | --ru | --r)
1152 ac_prev=runstatedir ;;
1153 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1154 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1155 | --run=* | --ru=* | --r=*)
1156 runstatedir=$ac_optarg ;;
1157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1159 ac_prev=sbindir ;;
1160 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1161 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
1164 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1165 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1166 | --sharedst | --shareds | --shared | --share | --shar \
1167 | --sha | --sh)
1168 ac_prev=sharedstatedir ;;
1169 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1170 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1171 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1172 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 -site | --site | --sit)
1176 ac_prev=site ;;
1177 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1181 ac_prev=srcdir ;;
1182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1186 | --syscon | --sysco | --sysc | --sys | --sy)
1187 ac_prev=sysconfdir ;;
1188 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1189 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1198 verbose=yes ;;
1199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 -version | --version | --versio | --versi | --vers | -V)
1201 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt_orig=$ac_useropt
1209 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210 case $ac_user_opts in
1211 *"
1212"with_$ac_useropt"
1213"*) ;;
1214 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215 ac_unrecognized_sep=', ';;
1216 esac
1217 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt_orig=$ac_useropt
1225 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226 case $ac_user_opts in
1227 *"
1228"with_$ac_useropt"
1229"*) ;;
1230 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1231 ac_unrecognized_sep=', ';;
1232 esac
1233 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 --x)
1236 # Obsolete; use --with-x.
1237 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1240 | --x-incl | --x-inc | --x-in | --x-i)
1241 ac_prev=x_includes ;;
1242 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1243 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1247 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1248 ac_prev=x_libraries ;;
1249 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1250 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1254Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 *=*)
1258 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1259 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 case $ac_envvar in #(
1261 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 export $ac_envvar ;;
1266
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001267 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001272 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 ;;
1274
1275 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276done
1277
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281fi
1282
Matthias Kloseb9621712010-04-24 17:59:49 +00001283if test -n "$ac_unrecognized_opts"; then
1284 case $enable_option_checking in
1285 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1288 esac
1289fi
1290
1291# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293 datadir sysconfdir sharedstatedir localstatedir includedir \
1294 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Islington (bot)3fc12f02018-07-15 17:44:11 -07001295 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001298 # Remove trailing slashes.
1299 case $ac_val in
1300 */ )
1301 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302 eval $ac_var=\$ac_val;;
1303 esac
1304 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306 [\\/$]* | ?:[\\/]* ) continue;;
1307 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001310done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# There might be people who depend on the old broken behavior: `$host'
1313# used to hold the argument of --host etc.
1314# FIXME: To remove some day.
1315build=$build_alias
1316host=$host_alias
1317target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319# FIXME: To remove some day.
1320if test "x$host_alias" != x; then
1321 if test "x$build_alias" = x; then
1322 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 elif test "x$build_alias" != "x$host_alias"; then
1324 cross_compiling=yes
1325 fi
1326fi
1327
1328ac_tool_prefix=
1329test -n "$host_alias" && ac_tool_prefix=$host_alias-
1330
1331test "$silent" = yes && exec 6>/dev/null
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334ac_pwd=`pwd` && test -n "$ac_pwd" &&
1335ac_ls_di=`ls -di .` &&
1336ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340
1341
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342# Find the source files, if location was not specified.
1343if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001344 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 ac_confdir=`$as_dirname -- "$as_myself" ||
1347$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1348 X"$as_myself" : 'X\(//\)[^/]' \| \
1349 X"$as_myself" : 'X\(//\)$' \| \
1350 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1351$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)[^/].*/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)$/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\).*/{
1365 s//\1/
1366 q
1367 }
1368 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001369 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371 srcdir=..
1372 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373else
1374 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376if test ! -r "$srcdir/$ac_unique_file"; then
1377 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1381ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383 pwd)`
1384# When building in place, set srcdir=.
1385if test "$ac_abs_confdir" = "$ac_pwd"; then
1386 srcdir=.
1387fi
1388# Remove unnecessary trailing slashes from srcdir.
1389# Double slashes in file names in object file debugging info
1390# mess up M-x gdb in Emacs.
1391case $srcdir in
1392*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1393esac
1394for ac_var in $ac_precious_vars; do
1395 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_env_${ac_var}_value=\$${ac_var}
1397 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1399done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401#
1402# Report the --help message.
1403#
1404if test "$ac_init_help" = "long"; then
1405 # Omit some internal or obsolete options to make the list less imposing.
1406 # This message is too long to be a string in the A/UX 3.1 sh.
1407 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001408\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410Usage: $0 [OPTION]... [VAR=VALUE]...
1411
1412To assign environment variables (e.g., CC, CFLAGS...), specify them as
1413VAR=VALUE. See below for descriptions of some of the useful variables.
1414
1415Defaults for the options are specified in brackets.
1416
1417Configuration:
1418 -h, --help display this help and exit
1419 --help=short display options specific to this package
1420 --help=recursive display the short help of all the included packages
1421 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001422 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --cache-file=FILE cache test results in FILE [disabled]
1424 -C, --config-cache alias for \`--cache-file=config.cache'
1425 -n, --no-create do not create output files
1426 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1427
Martin v. Löwis11437992002-04-12 09:54:03 +00001428Installation directories:
1429 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434By default, \`make install' will install all the files in
1435\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1436an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1437for instance \`--prefix=\$HOME'.
1438
1439For better control, use the options below.
1440
1441Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --bindir=DIR user executables [EPREFIX/bin]
1443 --sbindir=DIR system admin executables [EPREFIX/sbin]
1444 --libexecdir=DIR program executables [EPREFIX/libexec]
1445 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1446 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1447 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Miss Islington (bot)3fc12f02018-07-15 17:44:11 -07001448 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 --libdir=DIR object code libraries [EPREFIX/lib]
1450 --includedir=DIR C header files [PREFIX/include]
1451 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1452 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1453 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1454 --infodir=DIR info documentation [DATAROOTDIR/info]
1455 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1456 --mandir=DIR man documentation [DATAROOTDIR/man]
1457 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1458 --htmldir=DIR html documentation [DOCDIR]
1459 --dvidir=DIR dvi documentation [DOCDIR]
1460 --pdfdir=DIR pdf documentation [DOCDIR]
1461 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463
1464 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001465
1466System types:
1467 --build=BUILD configure for building on BUILD [guessed]
1468 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001469 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001470_ACEOF
1471fi
1472
1473if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001475 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 cat <<\_ACEOF
1478
1479Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001483 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001484 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-framework[=INSTALLDIR]
1486 Build (MacOSX|Darwin) framework
1487 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001488 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001489 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1490 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001491 --enable-loadable-sqlite-extensions
1492 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --enable-ipv6 Enable ipv6 (with ipv4) support
1494 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001495 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Optional Packages:
1499 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1500 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001501 --with-universal-archs=ARCH
1502 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001503 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1504 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001505 --with-framework-name=FRAMEWORK
1506 specify an alternate name of the framework built
1507 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001509 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001515 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001516 --with-lto Enable Link Time Optimization in any build. Disabled
1517 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
1521 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001523 --with-system-expat build pyexpat module using an installed expat
1524 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001525 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001526 --with-system-libmpdec build _decimal module using an installed libmpdec
1527 library
Ned Deilyd819b932013-09-06 01:07:05 -07001528 --with-tcltk-includes='-I...'
1529 override search for Tcl and Tk include files
1530 --with-tcltk-libs='-L...'
1531 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001532 --with-dbmliborder=db1:db2:...
1533 order to check db backends for dbm. Valid value is a
1534 colon separated string with the backend names
1535 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-doc-strings disable/enable documentation strings
1537 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001538 --with(out)-c-locale-coercion
1539 disable/enable C locale coercion to a UTF-8 based
1540 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001541 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001542 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with-libm=STRING math library
1544 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001545 --with(out)-computed-gotos
1546 Use computed gotos in evaluation loop (enabled by
1547 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001548 --with(out)-ensurepip=[=upgrade]
1549 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001550 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001551 --with-ssl-default-suites=[python|openssl|STRING]
1552 Override default cipher suites string, python: use
1553 Python's preferred selection (default), openssl:
1554 leave OpenSSL's defaults untouched, STRING: use a
1555 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001558 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 CC C compiler command
1560 CFLAGS C compiler flags
1561 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1562 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001564 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001567 PKG_CONFIG path to pkg-config utility
1568 PKG_CONFIG_PATH
1569 directories to add to pkg-config's search path
1570 PKG_CONFIG_LIBDIR
1571 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001572
1573Use these variables to override the choices made by `configure' or to help
1574it to find libraries and programs with nonstandard names/locations.
1575
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001576Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001579fi
1580
1581if test "$ac_init_help" = "recursive"; then
1582 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 test -d "$ac_dir" ||
1585 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1586 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 ac_builddir=.
1588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589case "$ac_dir" in
1590.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001592 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 case $ac_top_builddir_sub in
1596 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1597 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1598 esac ;;
1599esac
1600ac_abs_top_builddir=$ac_pwd
1601ac_abs_builddir=$ac_pwd$ac_dir_suffix
1602# for backward compatibility:
1603ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001604
1605case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$ac_top_builddir_sub
1609 ac_abs_top_srcdir=$ac_pwd ;;
1610 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 ac_top_srcdir=$srcdir
1613 ac_abs_top_srcdir=$srcdir ;;
1614 *) # Relative name.
1615 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1616 ac_top_srcdir=$ac_top_build_prefix$srcdir
1617 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001618esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 cd "$ac_dir" || { ac_status=$?; continue; }
1622 # Check for guested configure.
1623 if test -f "$ac_srcdir/configure.gnu"; then
1624 echo &&
1625 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1626 elif test -f "$ac_srcdir/configure"; then
1627 echo &&
1628 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001630 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 fi || ac_status=$?
1632 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 done
1634fi
1635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001637if $ac_init_version; then
1638 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001639python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001640generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001641
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001642Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001643This configure script is free software; the Free Software Foundation
1644gives unlimited permission to copy, distribute and modify it.
1645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001648
1649## ------------------------ ##
1650## Autoconf initialization. ##
1651## ------------------------ ##
1652
1653# ac_fn_c_try_compile LINENO
1654# --------------------------
1655# Try to compile conftest.$ac_ext, and return whether this succeeded.
1656ac_fn_c_try_compile ()
1657{
1658 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659 rm -f conftest.$ac_objext
1660 if { { ac_try="$ac_compile"
1661case "(($ac_try" in
1662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1663 *) ac_try_echo=$ac_try;;
1664esac
1665eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1666$as_echo "$ac_try_echo"; } >&5
1667 (eval "$ac_compile") 2>conftest.err
1668 ac_status=$?
1669 if test -s conftest.err; then
1670 grep -v '^ *+' conftest.err >conftest.er1
1671 cat conftest.er1 >&5
1672 mv -f conftest.er1 conftest.err
1673 fi
1674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1675 test $ac_status = 0; } && {
1676 test -z "$ac_c_werror_flag" ||
1677 test ! -s conftest.err
1678 } && test -s conftest.$ac_objext; then :
1679 ac_retval=0
1680else
1681 $as_echo "$as_me: failed program was:" >&5
1682sed 's/^/| /' conftest.$ac_ext >&5
1683
1684 ac_retval=1
1685fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001686 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 as_fn_set_status $ac_retval
1688
1689} # ac_fn_c_try_compile
1690
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001691# ac_fn_c_try_cpp LINENO
1692# ----------------------
1693# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1694ac_fn_c_try_cpp ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 if { { ac_try="$ac_cpp conftest.$ac_ext"
1698case "(($ac_try" in
1699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700 *) ac_try_echo=$ac_try;;
1701esac
1702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703$as_echo "$ac_try_echo"; } >&5
1704 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1705 ac_status=$?
1706 if test -s conftest.err; then
1707 grep -v '^ *+' conftest.err >conftest.er1
1708 cat conftest.er1 >&5
1709 mv -f conftest.er1 conftest.err
1710 fi
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; } > conftest.i && {
1713 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1714 test ! -s conftest.err
1715 }; then :
1716 ac_retval=0
1717else
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=1
1722fi
1723 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_cpp
1727
Matthias Kloseb9621712010-04-24 17:59:49 +00001728# ac_fn_c_try_link LINENO
1729# -----------------------
1730# Try to link conftest.$ac_ext, and return whether this succeeded.
1731ac_fn_c_try_link ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 rm -f conftest.$ac_objext conftest$ac_exeext
1735 if { { ac_try="$ac_link"
1736case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739esac
1740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741$as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_link") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } && {
1751 test -z "$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 } && test -s conftest$ac_exeext && {
1754 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001755 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 }; then :
1757 ac_retval=0
1758else
1759 $as_echo "$as_me: failed program was:" >&5
1760sed 's/^/| /' conftest.$ac_ext >&5
1761
1762 ac_retval=1
1763fi
1764 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1765 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1766 # interfere with the next link command; also delete a directory that is
1767 # left behind by Apple's compiler. We do this before executing the actions.
1768 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 as_fn_set_status $ac_retval
1771
1772} # ac_fn_c_try_link
1773
Matthias Kloseb9621712010-04-24 17:59:49 +00001774# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1775# -------------------------------------------------------
1776# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1777# the include files in INCLUDES and setting the cache variable VAR
1778# accordingly.
1779ac_fn_c_check_header_mongrel ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001782 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1784$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001785if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 $as_echo_n "(cached) " >&6
1787fi
1788eval ac_res=\$$3
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1790$as_echo "$ac_res" >&6; }
1791else
1792 # Is the header compilable?
1793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1794$as_echo_n "checking $2 usability... " >&6; }
1795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1796/* end confdefs.h. */
1797$4
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_compile "$LINENO"; then :
1801 ac_header_compiler=yes
1802else
1803 ac_header_compiler=no
1804fi
1805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1807$as_echo "$ac_header_compiler" >&6; }
1808
1809# Is the header present?
1810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1811$as_echo_n "checking $2 presence... " >&6; }
1812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1813/* end confdefs.h. */
1814#include <$2>
1815_ACEOF
1816if ac_fn_c_try_cpp "$LINENO"; then :
1817 ac_header_preproc=yes
1818else
1819 ac_header_preproc=no
1820fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001821rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1823$as_echo "$ac_header_preproc" >&6; }
1824
1825# So? What about this header?
1826case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1827 yes:no: )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1829$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1832 ;;
1833 no:yes:* )
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1835$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1837$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1839$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1841$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1843$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001844( $as_echo "## --------------------------------------- ##
1845## Report this to https://bugs.python.org/ ##
1846## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 ) | sed "s/^/$as_me: WARNING: /" >&2
1848 ;;
1849esac
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001852if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 eval "$3=\$ac_header_compiler"
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
1860fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_header_mongrel
1864
1865# ac_fn_c_try_run LINENO
1866# ----------------------
1867# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1868# that executables *can* be run.
1869ac_fn_c_try_run ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 if { { ac_try="$ac_link"
1873case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_link") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1883 { { case "(($ac_try" in
1884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885 *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889 (eval "$ac_try") 2>&5
1890 ac_status=$?
1891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1892 test $ac_status = 0; }; }; then :
1893 ac_retval=0
1894else
1895 $as_echo "$as_me: program exited with status $ac_status" >&5
1896 $as_echo "$as_me: failed program was:" >&5
1897sed 's/^/| /' conftest.$ac_ext >&5
1898
1899 ac_retval=$ac_status
1900fi
1901 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001902 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001903 as_fn_set_status $ac_retval
1904
1905} # ac_fn_c_try_run
1906
1907# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1908# -------------------------------------------------------
1909# Tests whether HEADER exists and can be compiled using the include files in
1910# INCLUDES, setting the cache variable VAR accordingly.
1911ac_fn_c_check_header_compile ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921$4
1922#include <$2>
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925 eval "$3=yes"
1926else
1927 eval "$3=no"
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930fi
1931eval ac_res=\$$3
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001934 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001935
1936} # ac_fn_c_check_header_compile
1937
Matthias Kloseb9621712010-04-24 17:59:49 +00001938# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1939# -------------------------------------------
1940# Tests whether TYPE exists after having included INCLUDES, setting cache
1941# variable VAR accordingly.
1942ac_fn_c_check_type ()
1943{
1944 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001947if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001948 $as_echo_n "(cached) " >&6
1949else
1950 eval "$3=no"
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$4
1954int
1955main ()
1956{
1957if (sizeof ($2))
1958 return 0;
1959 ;
1960 return 0;
1961}
1962_ACEOF
1963if ac_fn_c_try_compile "$LINENO"; then :
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966$4
1967int
1968main ()
1969{
1970if (sizeof (($2)))
1971 return 0;
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977
1978else
1979 eval "$3=yes"
1980fi
1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984fi
1985eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001988 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990} # ac_fn_c_check_type
1991
Matthias Kloseb9621712010-04-24 17:59:49 +00001992# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1993# --------------------------------------------
1994# Tries to find the compile-time value of EXPR in a program that includes
1995# INCLUDES, setting VAR accordingly. Returns whether the value could be
1996# computed
1997ac_fn_c_compute_int ()
1998{
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if test "$cross_compiling" = yes; then
2001 # Depending upon the size, compute the lo and hi bounds.
2002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005int
2006main ()
2007{
2008static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002009test_array [0] = 0;
2010return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002026test_array [0] = 0;
2027return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002053test_array [0] = 0;
2054return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056 ;
2057 return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 ac_hi=-1 ac_mid=-1
2062 while :; do
2063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065$4
2066int
2067main ()
2068{
2069static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002070test_array [0] = 0;
2071return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002072
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078 ac_lo=$ac_mid; break
2079else
2080 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2081 if test $ac_mid -le $ac_hi; then
2082 ac_lo= ac_hi=
2083 break
2084 fi
2085 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088 done
2089else
2090 ac_lo= ac_hi=
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095# Binary search between lo and hi bounds.
2096while test "x$ac_lo" != "x$ac_hi"; do
2097 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=$ac_mid
2114else
2115 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118done
2119case $ac_lo in #((
2120?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2121'') ac_retval=1 ;;
2122esac
2123 else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127static long int longval () { return $2; }
2128static unsigned long int ulongval () { return $2; }
2129#include <stdio.h>
2130#include <stdlib.h>
2131int
2132main ()
2133{
2134
2135 FILE *f = fopen ("conftest.val", "w");
2136 if (! f)
2137 return 1;
2138 if (($2) < 0)
2139 {
2140 long int i = longval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%ld", i);
2144 }
2145 else
2146 {
2147 unsigned long int i = ulongval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%lu", i);
2151 }
2152 /* Do not output a trailing newline, as this causes \r\n confusion
2153 on some platforms. */
2154 return ferror (f) || fclose (f) != 0;
2155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_run "$LINENO"; then :
2161 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2162else
2163 ac_retval=1
2164fi
2165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2166 conftest.$ac_objext conftest.beam conftest.$ac_ext
2167rm -f conftest.val
2168
2169 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002170 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002171 as_fn_set_status $ac_retval
2172
2173} # ac_fn_c_compute_int
2174
2175# ac_fn_c_check_func LINENO FUNC VAR
2176# ----------------------------------
2177# Tests whether FUNC exists, setting the cache variable VAR accordingly
2178ac_fn_c_check_func ()
2179{
2180 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2182$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002183if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002184 $as_echo_n "(cached) " >&6
2185else
2186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h. */
2188/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2190#define $2 innocuous_$2
2191
2192/* System header to define __stub macros and hopefully few prototypes,
2193 which can conflict with char $2 (); below.
2194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2195 <limits.h> exists even on freestanding compilers. */
2196
2197#ifdef __STDC__
2198# include <limits.h>
2199#else
2200# include <assert.h>
2201#endif
2202
2203#undef $2
2204
2205/* Override any GCC internal prototype to avoid an error.
2206 Use char because int might match the return type of a GCC
2207 builtin and then its argument prototype would still apply. */
2208#ifdef __cplusplus
2209extern "C"
2210#endif
2211char $2 ();
2212/* The GNU C library defines this for functions which it implements
2213 to always fail with ENOSYS. Some functions are actually named
2214 something starting with __ and the normal name is an alias. */
2215#if defined __stub_$2 || defined __stub___$2
2216choke me
2217#endif
2218
2219int
2220main ()
2221{
2222return $2 ();
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_link "$LINENO"; then :
2228 eval "$3=yes"
2229else
2230 eval "$3=no"
2231fi
2232rm -f core conftest.err conftest.$ac_objext \
2233 conftest$ac_exeext conftest.$ac_ext
2234fi
2235eval ac_res=\$$3
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2237$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002238 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002239
2240} # ac_fn_c_check_func
2241
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002242# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2243# ---------------------------------------------
2244# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2245# accordingly.
2246ac_fn_c_check_decl ()
2247{
2248 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2249 as_decl_name=`echo $2|sed 's/ *(.*//'`
2250 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2252$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2253if eval \${$3+:} false; then :
2254 $as_echo_n "(cached) " >&6
2255else
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h. */
2258$4
2259int
2260main ()
2261{
2262#ifndef $as_decl_name
2263#ifdef __cplusplus
2264 (void) $as_decl_use;
2265#else
2266 (void) $as_decl_name;
2267#endif
2268#endif
2269
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$3=yes"
2276else
2277 eval "$3=no"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281eval ac_res=\$$3
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2283$as_echo "$ac_res" >&6; }
2284 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2285
2286} # ac_fn_c_check_decl
2287
Matthias Kloseb9621712010-04-24 17:59:49 +00002288# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2289# ----------------------------------------------------
2290# Tries to find if the field MEMBER exists in type AGGR, after including
2291# INCLUDES, setting cache variable VAR accordingly.
2292ac_fn_c_check_member ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2296$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002297if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$5
2303int
2304main ()
2305{
2306static $2 ac_aggr;
2307if (ac_aggr.$3)
2308return 0;
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_compile "$LINENO"; then :
2314 eval "$4=yes"
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$5
2319int
2320main ()
2321{
2322static $2 ac_aggr;
2323if (sizeof ac_aggr.$3)
2324return 0;
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$4=yes"
2331else
2332 eval "$4=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337fi
2338eval ac_res=\$$4
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002342
2343} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002345This file contains any messages produced by compilers while
2346running configure, to aid debugging if configure makes a mistake.
2347
Ned Deily4829bc62016-09-12 17:29:04 -04002348It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002349generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002350
2351 $ $0 $@
2352
2353_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002354exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002355{
2356cat <<_ASUNAME
2357## --------- ##
2358## Platform. ##
2359## --------- ##
2360
2361hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2362uname -m = `(uname -m) 2>/dev/null || echo unknown`
2363uname -r = `(uname -r) 2>/dev/null || echo unknown`
2364uname -s = `(uname -s) 2>/dev/null || echo unknown`
2365uname -v = `(uname -v) 2>/dev/null || echo unknown`
2366
2367/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2368/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2369
2370/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2371/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2372/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002374/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2375/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2376/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2377
2378_ASUNAME
2379
2380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2381for as_dir in $PATH
2382do
2383 IFS=$as_save_IFS
2384 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002385 $as_echo "PATH: $as_dir"
2386 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389} >&5
2390
2391cat >&5 <<_ACEOF
2392
2393
2394## ----------- ##
2395## Core tests. ##
2396## ----------- ##
2397
2398_ACEOF
2399
2400
2401# Keep a trace of the command line.
2402# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002403# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002404# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002406ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002407ac_configure_args0=
2408ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002409ac_must_keep_next=false
2410for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002411do
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 for ac_arg
2413 do
2414 case $ac_arg in
2415 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2417 | -silent | --silent | --silen | --sile | --sil)
2418 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 esac
2422 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002427 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002429 case $ac_arg in
2430 *=* | --config-cache | -C | -disable-* | --disable-* \
2431 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2432 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2433 | -with-* | --with-* | -without-* | --without-* | --x)
2434 case "$ac_configure_args0 " in
2435 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2436 esac
2437 ;;
2438 -* ) ac_must_keep_next=true ;;
2439 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002440 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002442 ;;
2443 esac
2444 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002445done
Matthias Kloseb9621712010-04-24 17:59:49 +00002446{ ac_configure_args0=; unset ac_configure_args0;}
2447{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002448
2449# When interrupted or exit'd, cleanup temporary files, and complete
2450# config.log. We remove comments because anyway the quotes in there
2451# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452# WARNING: Use '\'' to represent an apostrophe within the trap.
2453# 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 +00002454trap 'exit_status=$?
2455 # Save into config.log some information that might help in debugging.
2456 {
2457 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002458
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002459 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002460## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002461## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 echo
2463 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464(
2465 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2466 eval ac_val=\$$ac_var
2467 case $ac_val in #(
2468 *${as_nl}*)
2469 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2471$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac
2473 case $ac_var in #(
2474 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2476 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac ;;
2478 esac
2479 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2482 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 "s/'\''/'\''\\\\'\'''\''/g;
2485 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2486 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002487 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002489 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 esac |
2491 sort
2492)
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002494
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002496## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_vars
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508
2509 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002510 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 echo
2514 for ac_var in $ac_subst_files
2515 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 eval ac_val=\$$ac_var
2517 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 done | sort
2522 echo
2523 fi
2524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002526 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002527## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002528## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
2532 fi
2533 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 $as_echo "$as_me: caught signal $ac_signal"
2535 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 rm -f core *.core core.conftest.* &&
2538 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002541for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002543done
2544ac_signal=0
2545
2546# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
Matthias Kloseb9621712010-04-24 17:59:49 +00002549$as_echo "/* confdefs.h */" > confdefs.h
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551# Predefined preprocessor variables.
2552
2553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_NAME "$PACKAGE_NAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_VERSION "$PACKAGE_VERSION"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_STRING "$PACKAGE_STRING"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2571_ACEOF
2572
Matthias Kloseb9621712010-04-24 17:59:49 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_URL "$PACKAGE_URL"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577
2578# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002579# Prefer an explicitly selected file to automatically selected ones.
2580ac_site_file1=NONE
2581ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583 # We do not want a PATH search for config.site.
2584 case $CONFIG_SITE in #((
2585 -*) ac_site_file1=./$CONFIG_SITE;;
2586 */*) ac_site_file1=$CONFIG_SITE;;
2587 *) ac_site_file1=./$CONFIG_SITE;;
2588 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$prefix/share/config.site
2591 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592else
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 ac_site_file1=$ac_default_prefix/share/config.site
2594 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002596for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597do
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 test "x$ac_site_file" = xNONE && continue
2599 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2601$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603 . "$ac_site_file" \
2604 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2606as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002607See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002608 fi
2609done
2610
2611if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 # Some versions of bash will fail to source /dev/null (special files
2613 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2614 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2616$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2619 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 esac
2621 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622else
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2624$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 >$cache_file
2626fi
2627
2628# Check that the precious variables saved in the cache have kept the same
2629# value.
2630ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2633 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2635 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_old_set,$ac_new_set in
2637 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2639$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 +00002640 ac_cache_corrupted=: ;;
2641 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2643$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 ac_cache_corrupted=: ;;
2645 ,);;
2646 *)
2647 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 # differences in whitespace do not lead to failure.
2649 ac_old_val_w=`echo x $ac_old_val`
2650 ac_new_val_w=`echo x $ac_new_val`
2651 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2653$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2654 ac_cache_corrupted=:
2655 else
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2657$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2658 eval $ac_var=\$ac_old_val
2659 fi
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2661$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2663$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 fi;;
2665 esac
2666 # Pass precious variables to config.status.
2667 if test "$ac_new_set" = set; then
2668 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 *) ac_arg=$ac_var=$ac_new_val ;;
2671 esac
2672 case " $ac_configure_args " in
2673 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 esac
2676 fi
2677done
2678if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2682$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002683 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002685## -------------------- ##
2686## Main body of script. ##
2687## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688
Guido van Rossum7f43da71994-08-01 12:15:30 +00002689ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2693ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694
Guido van Rossum627b2d71993-12-24 10:39:16 +00002695
Michael W. Hudson54241132001-12-07 15:38:26 +00002696
Trent Nelson4d4ec652012-10-16 08:51:24 -04002697
Christian Heimesff5be6e2018-01-20 13:19:21 +01002698
2699
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002700if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002701 # If we're building out-of-tree, we need to make sure the following
2702 # resources get picked up before their $srcdir counterparts.
2703 # Objects/ -> typeslots.inc
2704 # Include/ -> Python-ast.h, graminit.h
2705 # Python/ -> importlib.h
2706 # (A side effect of this is that these resources will automatically be
2707 # regenerated when building out-of-tree, regardless of whether or not
2708 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2709 # off.)
2710 BASECPPFLAGS="-IObjects -IInclude -IPython"
2711else
2712 BASECPPFLAGS=""
2713fi
2714
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715
2716
2717
2718
Victor Stinner9ed34a82017-05-02 22:35:58 +02002719if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721# Extract the first word of "git", so it can be a program name with args.
2722set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2724$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002725if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726 $as_echo_n "(cached) " >&6
2727else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 if test -n "$HAS_GIT"; then
2729 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730else
2731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2732for as_dir in $PATH
2733do
2734 IFS=$as_save_IFS
2735 test -z "$as_dir" && as_dir=.
2736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2740 break 2
2741 fi
2742done
2743 done
2744IFS=$as_save_IFS
2745
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747fi
2748fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749HAS_GIT=$ac_cv_prog_HAS_GIT
2750if test -n "$HAS_GIT"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2752$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753else
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2755$as_echo "no" >&6; }
2756fi
2757
2758
2759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763then
Ned Deily554626a2017-03-20 23:41:52 -04002764 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2765 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768 GITVERSION=""
2769 GITTAG=""
2770 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771fi
2772
2773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002775
2776
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002777ac_aux_dir=
2778for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2779 if test -f "$ac_dir/install-sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install-sh -c"
2782 break
2783 elif test -f "$ac_dir/install.sh"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/install.sh -c"
2786 break
2787 elif test -f "$ac_dir/shtool"; then
2788 ac_aux_dir=$ac_dir
2789 ac_install_sh="$ac_aux_dir/shtool install -c"
2790 break
2791 fi
2792done
2793if test -z "$ac_aux_dir"; then
2794 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2795fi
2796
2797# These three variables are undocumented and unsupported,
2798# and are intended to be withdrawn in a future Autoconf release.
2799# They can cause serious problems if a builder's source tree is in a directory
2800# whose full name contains unusual characters.
2801ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2802ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2803ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2804
2805
2806# Make sure we can run config.sub.
2807$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2808 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2809
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2811$as_echo_n "checking build system type... " >&6; }
2812if ${ac_cv_build+:} false; then :
2813 $as_echo_n "(cached) " >&6
2814else
2815 ac_build_alias=$build_alias
2816test "x$ac_build_alias" = x &&
2817 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2818test "x$ac_build_alias" = x &&
2819 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2820ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2821 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2822
2823fi
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2825$as_echo "$ac_cv_build" >&6; }
2826case $ac_cv_build in
2827*-*-*) ;;
2828*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2829esac
2830build=$ac_cv_build
2831ac_save_IFS=$IFS; IFS='-'
2832set x $ac_cv_build
2833shift
2834build_cpu=$1
2835build_vendor=$2
2836shift; shift
2837# Remember, the first character of IFS is used to create $*,
2838# except with old shells:
2839build_os=$*
2840IFS=$ac_save_IFS
2841case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2842
2843
2844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2845$as_echo_n "checking host system type... " >&6; }
2846if ${ac_cv_host+:} false; then :
2847 $as_echo_n "(cached) " >&6
2848else
2849 if test "x$host_alias" = x; then
2850 ac_cv_host=$ac_cv_build
2851else
2852 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2853 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2854fi
2855
2856fi
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2858$as_echo "$ac_cv_host" >&6; }
2859case $ac_cv_host in
2860*-*-*) ;;
2861*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2862esac
2863host=$ac_cv_host
2864ac_save_IFS=$IFS; IFS='-'
2865set x $ac_cv_host
2866shift
2867host_cpu=$1
2868host_vendor=$2
2869shift; shift
2870# Remember, the first character of IFS is used to create $*,
2871# except with old shells:
2872host_os=$*
2873IFS=$ac_save_IFS
2874case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2875
2876
2877
doko@python.orga10e4a92013-01-25 18:45:12 +01002878
2879
Ned Deilyfcbc2462014-08-22 13:32:49 -07002880# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2881rm -f pybuilddir.txt
2882
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883for ac_prog in python$PACKAGE_VERSION python3 python
2884do
2885 # Extract the first word of "$ac_prog", so it can be a program name with args.
2886set dummy $ac_prog; ac_word=$2
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2888$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002889if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002890 $as_echo_n "(cached) " >&6
2891else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 if test -n "$PYTHON_FOR_REGEN"; then
2893 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894else
2895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2896for as_dir in $PATH
2897do
2898 IFS=$as_save_IFS
2899 test -z "$as_dir" && as_dir=.
2900 for ac_exec_ext in '' $ac_executable_extensions; do
2901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2904 break 2
2905 fi
2906done
2907 done
2908IFS=$as_save_IFS
2909
2910fi
2911fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2913if test -n "$PYTHON_FOR_REGEN"; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2915$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916else
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2918$as_echo "no" >&6; }
2919fi
2920
2921
Victor Stinnera5c62a82017-05-03 18:21:48 +02002922 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002923done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926
2927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928if test "$cross_compiling" = yes; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2930$as_echo_n "checking for python interpreter for cross build... " >&6; }
2931 if test -z "$PYTHON_FOR_BUILD"; then
2932 for interp in python$PACKAGE_VERSION python3 python; do
2933 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002934 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 +02002935 break
2936 fi
2937 interp=
2938 done
2939 if test x$interp = x; then
2940 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2941 fi
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2943$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002944 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 +02002945 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002946elif test "$cross_compiling" = maybe; then
2947 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948else
2949 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
Benjamin Petersond23f8222009-04-05 19:13:16 +00002954if test "$prefix" != "/"; then
2955 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
2960
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002961# We don't use PACKAGE_ variables, and they cause conflicts
2962# with other autoconf-based packages that include Python.h
2963grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2964rm confdefs.h
2965mv confdefs.h.new confdefs.h
2966
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002967
Ned Deily4829bc62016-09-12 17:29:04 -04002968VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002969
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002970# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002971
2972SOVERSION=1.0
2973
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974# The later defininition of _XOPEN_SOURCE disables certain features
2975# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002978
2979
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002985
2986
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002992
2993
Martin v. Löwisd6320502004-08-12 13:45:08 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2996# them.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002999
3000
3001
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003002define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003004# Arguments passed to configure.
3005
3006CONFIG_ARGS="$ac_configure_args"
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3009$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003011if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003013 case $enableval in
3014 yes)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003015 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003016 # information
3017 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003018 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003020 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3021 if test ! -d "${enableval}"
3022 then
3023 enableval=/
3024 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003026 ;;
3027 esac
3028 case $enableval in
3029 no)
3030 UNIVERSALSDK=
3031 enable_universalsdk=
3032 ;;
3033 *)
3034 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 if test ! -d "${UNIVERSALSDK}"
3036 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003037 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039 ;;
3040 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003041
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043else
3044
3045 UNIVERSALSDK=
3046 enable_universalsdk=
3047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050if test -n "${UNIVERSALSDK}"
3051then
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3053$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054else
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3056$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003060
Ned Deily87adb6e2013-10-18 21:09:56 -07003061ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003062
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063# For backward compatibility reasons we prefer to select '32-bit' if available,
3064# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003065UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066if test "`uname -s`" = "Darwin"
3067then
3068 if test -n "${UNIVERSALSDK}"
3069 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003070 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071 then
3072 UNIVERSAL_ARCHS="intel"
3073 fi
3074 fi
3075fi
3076
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3079$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080
3081# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003082if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084 UNIVERSAL_ARCHS="$withval"
3085
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086fi
3087
Ned Deily87adb6e2013-10-18 21:09:56 -07003088if test -n "${UNIVERSALSDK}"
3089then
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3091$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3092else
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
3095fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097
3098# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003099if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100 withval=$with_framework_name;
3101 PYTHONFRAMEWORK=${withval}
3102 PYTHONFRAMEWORKDIR=${withval}.framework
3103 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3104
3105else
3106
3107 PYTHONFRAMEWORK=Python
3108 PYTHONFRAMEWORKDIR=Python.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3110
3111fi
3112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003114if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003116 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003117 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003118 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003119 esac
3120 case $enableval in
3121 no)
3122 PYTHONFRAMEWORK=
3123 PYTHONFRAMEWORKDIR=no-framework
3124 PYTHONFRAMEWORKPREFIX=
3125 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126 FRAMEWORKINSTALLFIRST=
3127 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 FRAMEWORKALTINSTALLFIRST=
3129 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003130 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 if test "x${prefix}" = "xNONE"; then
3132 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3133 else
3134 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3135 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003136 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003137 ;;
3138 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003140 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003142 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003143 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3144 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003145 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 if test "x${prefix}" = "xNONE" ; then
3149 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 else
3152 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3153 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154
3155 case "${enableval}" in
3156 /System*)
3157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3158 if test "${prefix}" = "NONE" ; then
3159 # See below
3160 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3161 fi
3162 ;;
3163
3164 /Library*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 ;;
3167
3168 */Library/Frameworks)
3169 MDIR="`dirname "${enableval}"`"
3170 MDIR="`dirname "${MDIR}"`"
3171 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3172
3173 if test "${prefix}" = "NONE"; then
3174 # User hasn't specified the
3175 # --prefix option, but wants to install
3176 # the framework in a non-default location,
3177 # ensure that the compatibility links get
3178 # installed relative to that prefix as well
3179 # instead of in /usr/local.
3180 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3181 fi
3182 ;;
3183
3184 *)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 ;;
3187 esac
3188
Jack Jansen127e56e2001-09-11 14:41:54 +00003189 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003191 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003197 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3198
3199 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3200
Jack Jansene578a632001-08-15 01:27:14 +00003201 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Guido van Rossum563e7081996-09-10 18:20:48 +00003203else
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Jack Jansene578a632001-08-15 01:27:14 +00003205 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003206 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003207 PYTHONFRAMEWORKPREFIX=
3208 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003209 FRAMEWORKINSTALLFIRST=
3210 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 FRAMEWORKALTINSTALLFIRST=
3212 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003213 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 if test "x${prefix}" = "xNONE" ; then
3215 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3216 else
3217 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3218 fi
Jack Jansene578a632001-08-15 01:27:14 +00003219 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003220
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222fi
3223
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
3225
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
3227
3228
3229
Jack Jansene578a632001-08-15 01:27:14 +00003230
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003231
3232
3233
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003234
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003235
Ned Deilyb8f944f2013-11-21 22:42:25 -08003236
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003237
3238cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003239#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003240_ACEOF
3241
3242
Jack Jansene578a632001-08-15 01:27:14 +00003243##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003244## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003245## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003246##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247# Set name for machine-dependent library files
3248
Matthias Kloseb9621712010-04-24 17:59:49 +00003249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3250$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251if test -z "$MACHDEP"
3252then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 # avoid using uname for cross builds
3254 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003255 # ac_sys_system and ac_sys_release are used for setting
3256 # a lot of different things including 'define_xopen_source'
3257 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003258 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003259 *-*-linux-android*)
3260 ac_sys_system=Linux-android
3261 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 *-*-linux*)
3263 ac_sys_system=Linux
3264 ;;
3265 *-*-cygwin*)
3266 ac_sys_system=Cygwin
3267 ;;
3268 *)
3269 # for now, limit cross builds to known configurations
3270 MACHDEP="unknown"
3271 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3272 esac
3273 ac_sys_release=
3274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003276 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003277 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 fi
3283 ac_md_system=`echo $ac_sys_system |
3284 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3285 ac_md_release=`echo $ac_sys_release |
3286 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3287 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003288
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003290 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003291 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003292 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003293 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295fi
Guido van Rossum91922671997-10-09 20:24:13 +00003296
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003297
3298if test "$cross_compiling" = yes; then
3299 case "$host" in
3300 *-*-linux*)
3301 case "$host_cpu" in
3302 arm*)
3303 _host_cpu=arm
3304 ;;
3305 *)
3306 _host_cpu=$host_cpu
3307 esac
3308 ;;
3309 *-*-cygwin*)
3310 _host_cpu=
3311 ;;
3312 *)
3313 # for now, limit cross builds to known configurations
3314 MACHDEP="unknown"
3315 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3316 esac
3317 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3318fi
3319
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003320# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3321# disable features if it is defined, without any means to access these
3322# features as extensions. For these systems, we skip the definition of
3323# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3324# some feature, make sure there is no alternative way to access this
3325# feature. Also, when using wildcards, make sure you have verified the
3326# need for not defining _XOPEN_SOURCE on all systems matching the
3327# wildcard, and that the wildcard does not include future systems
3328# (which may remove their limitations).
3329case $ac_sys_system/$ac_sys_release in
3330 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3331 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003332 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003333 # In addition, Stefan Krah confirms that issue #1244610 exists through
3334 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003335 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336 define_xopen_source=no
3337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003342
3343 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003350
3351 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003352 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3353 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3354 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003355 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 +00003356 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003357 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3358 # request to enable features supported by the standard as a request
3359 # to disable features not supported by the standard. The best way
3360 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3361 # entirely and define __EXTENSIONS__ instead.
3362 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003363 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3365 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003366 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003367 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 define_xopen_source=no;;
3369 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003373 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3374 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3375 # identifies itself as Darwin/7.*
3376 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # disables platform specific features beyond repair.
3378 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # has no effect, don't bother defining them
3380 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003381 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003382 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003383 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003384 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3385 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3386 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003387 AIX/4)
3388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 AIX/5)
3390 if test `uname -r` -eq 1; then
3391 define_xopen_source=no
3392 fi
3393 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003394 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3395 # defining NI_NUMERICHOST.
3396 QNX/6.3.2)
3397 define_xopen_source=no
3398 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003399
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003400esac
3401
3402if test $define_xopen_source = yes
3403then
Victor Stinner14d098d2011-09-07 22:29:43 +02003404 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
Victor Stinner14d098d2011-09-07 22:29:43 +02003406$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
3409 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3410 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3411 # several APIs are not declared. Since this is also needed in some
3412 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Matthias Kloseb9621712010-04-24 17:59:49 +00003414$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003417
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003418$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420fi
3421
Christian Heimes647cd872013-12-07 23:39:33 +01003422# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3423case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003424 hp*|HP*)
3425 define_stdc_a1=yes;;
3426 *)
3427 define_stdc_a1=no;;
3428esac
3429
3430if test $define_stdc_a1 = yes
3431then
Christian Heimes647cd872013-12-07 23:39:33 +01003432
3433$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3434
Christian Heimesb02bcae2013-12-08 15:21:08 +01003435fi
Christian Heimes647cd872013-12-07 23:39:33 +01003436
Jack Jansen6b08a402004-06-03 12:41:45 +00003437# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3438# it may influence the way we can build extensions, so distutils
3439# needs to check it
3440
Thomas Wouters477c8d52006-05-27 19:21:47 +00003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003444
Guido van Rossum627b2d71993-12-24 10:39:16 +00003445# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003446
3447# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3448# for debug/optimization stuff. BASECFLAGS is for flags that are required
3449# just to get things to compile and link. Users are free to override OPT
3450# when running configure or make. The build should not break if they do.
3451# BASECFLAGS should generally not be messed with, however.
3452
3453# XXX shouldn't some/most/all of this code be merged with the stuff later
3454# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3456$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003459if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003461 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003462 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463 without_gcc=yes;;
3464 yes) CC=gcc
3465 without_gcc=no;;
3466 *) CC=$withval
3467 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003471 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003472 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003473 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003474 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003475 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476fi
3477
Matthias Kloseb9621712010-04-24 17:59:49 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3479$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Zachary Ware5af85642015-12-21 12:09:17 -06003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3482$as_echo_n "checking for --with-icc... " >&6; }
3483
3484# Check whether --with-icc was given.
3485if test "${with_icc+set}" = set; then :
3486 withval=$with_icc;
3487 case $withval in
3488 no) CC=${CC:-cc}
3489 with_icc=no;;
3490 yes) CC=icc
3491 CXX=icpc
3492 with_icc=yes;;
3493 *) CC=$withval
3494 with_icc=$withval;;
3495 esac
3496else
3497
3498 with_icc=no
3499fi
3500
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3502$as_echo "$with_icc" >&6; }
3503
Guido van Rossum8b131c51995-03-09 14:10:13 +00003504# If the user switches compilers, we can't believe the cache
3505if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3506then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003507 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003508(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003509fi
3510
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003511# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3512# when the compiler supports them, but we don't always want -O2, and
3513# we set -g later.
3514if test -z "$CFLAGS"; then
3515 CFLAGS=
3516fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003517
3518if test "$ac_sys_system" = "Darwin"
3519then
3520 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003521 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522 # information
3523 if test -z "${CC}"
3524 then
3525 found_gcc=
3526 found_clang=
3527 as_save_IFS=$IFS; IFS=:
3528 for as_dir in $PATH
3529 do
3530 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003531 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003532 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003533 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003534 fi
3535 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003536 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003537 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 fi
3540 fi
3541 done
3542 IFS=$as_save_IFS
3543
3544 if test -n "$found_gcc" -a -n "$found_clang"
3545 then
3546 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3547 then
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3549$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3550 CC="$found_clang"
3551 CXX="$found_clang++"
3552 fi
3553
3554
3555 elif test -z "$found_gcc" -a -n "$found_clang"
3556 then
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3558$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3559 CC="$found_clang"
3560 CXX="$found_clang++"
3561
3562 elif test -z "$found_gcc" -a -z "$found_clang"
3563 then
3564 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3565 if test -n "${found_clang}"
3566 then
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3568$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3569 CC="${found_clang}"
3570 CXX="`/usr/bin/xcrun -find clang++`"
3571
3572 # else: use default behaviour
3573 fi
3574 fi
3575 fi
3576fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003577ac_ext=c
3578ac_cpp='$CPP $CPPFLAGS'
3579ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3580ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3581ac_compiler_gnu=$ac_cv_c_compiler_gnu
3582if test -n "$ac_tool_prefix"; then
3583 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3584set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3586$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003587if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003588 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003589else
3590 if test -n "$CC"; then
3591 ac_cv_prog_CC="$CC" # Let the user override the test.
3592else
Martin v. Löwis11437992002-04-12 09:54:03 +00003593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594for as_dir in $PATH
3595do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $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 +00003602 break 2
3603 fi
3604done
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003607
Jack Jansendd19cf82001-12-06 22:36:17 +00003608fi
3609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003610CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003611if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3613$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003614else
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3616$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620fi
3621if test -z "$ac_cv_prog_CC"; then
3622 ac_ct_CC=$CC
3623 # Extract the first word of "gcc", so it can be a program name with args.
3624set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3626$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003627if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003629else
3630 if test -n "$ac_ct_CC"; then
3631 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3632else
3633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $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 +00003642 break 2
3643 fi
3644done
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
3648fi
3649fi
3650ac_ct_CC=$ac_cv_prog_ac_ct_CC
3651if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3653$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654else
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 if test "x$ac_ct_CC" = x; then
3660 CC=""
3661 else
3662 case $cross_compiling:$ac_tool_warned in
3663yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666ac_tool_warned=yes ;;
3667esac
3668 CC=$ac_ct_CC
3669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670else
3671 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003672fi
3673
Jack Jansendd19cf82001-12-06 22:36:17 +00003674if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675 if test -n "$ac_tool_prefix"; then
3676 # 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 +00003677set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003680if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003682else
3683 if test -n "$CC"; then
3684 ac_cv_prog_CC="$CC" # Let the user override the test.
3685else
Martin v. Löwis11437992002-04-12 09:54:03 +00003686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687for as_dir in $PATH
3688do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $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 +00003695 break 2
3696 fi
3697done
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003700
3701fi
3702fi
3703CC=$ac_cv_prog_CC
3704if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714fi
3715if test -z "$CC"; then
3716 # Extract the first word of "cc", so it can be a program name with args.
3717set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003720if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
3723 if test -n "$CC"; then
3724 ac_cv_prog_CC="$CC" # Let the user override the test.
3725else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3728for as_dir in $PATH
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3735 ac_prog_rejected=yes
3736 continue
3737 fi
3738 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $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 +00003740 break 2
3741 fi
3742done
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003745
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746if test $ac_prog_rejected = yes; then
3747 # We found a bogon in the path, so make sure we never use it.
3748 set dummy $ac_cv_prog_CC
3749 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 # We chose a different compiler from the bogus one.
3752 # However, it has the same basename, so the bogon will be chosen
3753 # first if we set CC to just the basename; use the full file name.
3754 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003755 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 fi
3757fi
3758fi
3759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003760CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3763$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764else
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3766$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767fi
3768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
3771if test -z "$CC"; then
3772 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 do
3775 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3776set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003779if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003781else
3782 if test -n "$CC"; then
3783 ac_cv_prog_CC="$CC" # Let the user override the test.
3784else
Martin v. Löwis11437992002-04-12 09:54:03 +00003785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786for as_dir in $PATH
3787do
3788 IFS=$as_save_IFS
3789 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $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 +00003794 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003796done
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003799
3800fi
3801fi
3802CC=$ac_cv_prog_CC
3803if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003809fi
3810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 test -n "$CC" && break
3813 done
3814fi
3815if test -z "$CC"; then
3816 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003818do
3819 # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
3826 if test -n "$ac_ct_CC"; then
3827 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3828else
3829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
3839 fi
3840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
3845fi
3846ac_ct_CC=$ac_cv_prog_ac_ct_CC
3847if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3849$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 test -n "$ac_ct_CC" && break
3857done
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 if test "x$ac_ct_CC" = x; then
3860 CC=""
3861 else
3862 case $cross_compiling:$ac_tool_warned in
3863yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866ac_tool_warned=yes ;;
3867esac
3868 CC=$ac_ct_CC
3869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871
3872fi
3873
3874
Matthias Kloseb9621712010-04-24 17:59:49 +00003875test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003877as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003878See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879
3880# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003881$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3882set X $ac_compile
3883ac_compiler=$2
3884for ac_option in --version -v -V -qversion; do
3885 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886case "(($ac_try" in
3887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888 *) ac_try_echo=$ac_try;;
3889esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3891$as_echo "$ac_try_echo"; } >&5
3892 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003894 if test -s conftest.err; then
3895 sed '10a\
3896... rest of stderr output deleted ...
3897 10q' conftest.err >conftest.er1
3898 cat conftest.er1 >&5
3899 fi
3900 rm -f conftest.er1 conftest.err
3901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }
3903done
Martin v. Löwis11437992002-04-12 09:54:03 +00003904
Matthias Kloseb9621712010-04-24 17:59:49 +00003905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003906/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
3916ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003917ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003918# Try to create an executable without -o first, disregard a.out.
3919# It will help us diagnose broken compilers, and finding out an intuition
3920# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3922$as_echo_n "checking whether the C compiler works... " >&6; }
3923ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3924
3925# The possible output files:
3926ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928ac_rmfiles=
3929for ac_file in $ac_files
3930do
3931 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3934 esac
3935done
3936rm -f $ac_rmfiles
3937
Matthias Kloseb9621712010-04-24 17:59:49 +00003938if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939case "(($ac_try" in
3940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3941 *) ac_try_echo=$ac_try;;
3942esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3944$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3948 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3950# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3951# in a Makefile. We should not override ac_cv_exeext if it was cached,
3952# so that the user can short-circuit this test for compilers unknown to
3953# Autoconf.
3954for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003955do
3956 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959 ;;
3960 [ab].out )
3961 # We found the default executable, but exeext='' is most
3962 # certainly right.
3963 break;;
3964 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 then :; else
3967 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3968 fi
3969 # We set ac_cv_exeext here because the later test for it is not
3970 # safe: cross compilers may not add the suffix if given an `-o'
3971 # argument, so we may need to know it at that point already.
3972 # Even if this section looks crufty: it has the advantage of
3973 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 break;;
3975 * )
3976 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 esac
3978done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979test "$ac_cv_exeext" = no && ac_cv_exeext=
3980
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003981else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982 ac_file=''
3983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003984if test -z "$ac_file"; then :
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3986$as_echo "no" >&6; }
3987$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003988sed 's/^/| /' conftest.$ac_ext >&5
3989
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003992as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003993See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003994else
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3996$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3999$as_echo_n "checking for C compiler default output file name... " >&6; }
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4001$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003
Matthias Kloseb9621712010-04-24 17:59:49 +00004004rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004005ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4007$as_echo_n "checking for suffix of executables... " >&6; }
4008if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009case "(($ac_try" in
4010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4011 *) ac_try_echo=$ac_try;;
4012esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4014$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004016 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4018 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4020# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4021# work properly (i.e., refer to `conftest.exe'), while it won't with
4022# `rm'.
4023for ac_file in conftest.exe conftest conftest.*; do
4024 test -f "$ac_file" || continue
4025 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4028 break;;
4029 * ) break;;
4030 esac
4031done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032else
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004035as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004036See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004038rm -f conftest conftest$ac_cv_exeext
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4040$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041
4042rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004043EXEEXT=$ac_cv_exeext
4044ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046/* end confdefs.h. */
4047#include <stdio.h>
4048int
4049main ()
4050{
4051FILE *f = fopen ("conftest.out", "w");
4052 return ferror (f) || fclose (f) != 0;
4053
4054 ;
4055 return 0;
4056}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004058ac_clean_files="$ac_clean_files conftest.out"
4059# Check that the compiler produces executables we can run. If not, either
4060# the compiler is broken, or we cross compile.
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4062$as_echo_n "checking whether we are cross compiling... " >&6; }
4063if test "$cross_compiling" != yes; then
4064 { { ac_try="$ac_link"
4065case "(($ac_try" in
4066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4067 *) ac_try_echo=$ac_try;;
4068esac
4069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4070$as_echo "$ac_try_echo"; } >&5
4071 (eval "$ac_link") 2>&5
4072 ac_status=$?
4073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4074 test $ac_status = 0; }
4075 if { ac_try='./conftest$ac_cv_exeext'
4076 { { case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
4080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081$as_echo "$ac_try_echo"; } >&5
4082 (eval "$ac_try") 2>&5
4083 ac_status=$?
4084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085 test $ac_status = 0; }; }; then
4086 cross_compiling=no
4087 else
4088 if test "$cross_compiling" = maybe; then
4089 cross_compiling=yes
4090 else
4091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004093as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004094If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004095See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 fi
4097 fi
4098fi
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4100$as_echo "$cross_compiling" >&6; }
4101
4102rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4103ac_clean_files=$ac_clean_files_save
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4105$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004106if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 $as_echo_n "(cached) " >&6
4108else
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004110/* end confdefs.h. */
4111
4112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004121if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122case "(($ac_try" in
4123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4124 *) ac_try_echo=$ac_try;;
4125esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4127$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4131 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132 for ac_file in conftest.o conftest.obj conftest.*; do
4133 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4137 break;;
4138 esac
4139done
4140else
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004142sed 's/^/| /' conftest.$ac_ext >&5
4143
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004146as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004147See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004149rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4152$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153OBJEXT=$ac_cv_objext
4154ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4156$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004157if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163int
4164main ()
4165{
4166#ifndef __GNUC__
4167 choke me
4168#endif
4169
4170 ;
4171 return 0;
4172}
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 ac_compiler_gnu=yes
4176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004180ac_cv_c_compiler_gnu=$ac_compiler_gnu
4181
4182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4184$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4185if test $ac_compiler_gnu = yes; then
4186 GCC=yes
4187else
4188 GCC=
4189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004190ac_test_CFLAGS=${CFLAGS+set}
4191ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4193$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004194if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004196else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197 ac_save_c_werror_flag=$ac_c_werror_flag
4198 ac_c_werror_flag=yes
4199 ac_cv_prog_cc_g=no
4200 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004203
Martin v. Löwis11437992002-04-12 09:54:03 +00004204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214else
Matthias Kloseb9621712010-04-24 17:59:49 +00004215 CFLAGS=""
4216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217/* end confdefs.h. */
4218
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228
Matthias Kloseb9621712010-04-24 17:59:49 +00004229else
4230 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233/* end confdefs.h. */
4234
4235int
4236main ()
4237{
4238
4239 ;
4240 return 0;
4241}
4242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251 ac_c_werror_flag=$ac_save_c_werror_flag
4252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4254$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257elif test $ac_cv_prog_cc_g = yes; then
4258 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004259 CFLAGS="-g -O2"
4260 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262 fi
4263else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264 if test "$GCC" = yes; then
4265 CFLAGS="-O2"
4266 else
4267 CFLAGS=
4268 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4271$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004272if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004274else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004276ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* end confdefs.h. */
4279#include <stdarg.h>
4280#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004281struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4283struct buf { int x; };
4284FILE * (*rcsopen) (struct buf *, struct stat *, int);
4285static char *e (p, i)
4286 char **p;
4287 int i;
4288{
4289 return p[i];
4290}
4291static char *f (char * (*g) (char **, int), char **p, ...)
4292{
4293 char *s;
4294 va_list v;
4295 va_start (v,p);
4296 s = g (p, va_arg (v,int));
4297 va_end (v);
4298 return s;
4299}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300
4301/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4302 function prototypes and stuff, but not '\xHH' hex character constants.
4303 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4306 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004308int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4311 inside strings and character constants. */
4312#define FOO(x) 'x'
4313int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4314
Skip Montanaro6dead952003-09-25 14:50:04 +00004315int test (int i, double x);
4316struct s1 {int (*f) (int a);};
4317struct s2 {int (*f) (double a);};
4318int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4319int argc;
4320char **argv;
4321int
4322main ()
4323{
4324return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4325 ;
4326 return 0;
4327}
4328_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4330 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004331do
4332 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336rm -f core conftest.err conftest.$ac_objext
4337 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004338done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340CC=$ac_save_CC
4341
4342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343# AC_CACHE_VAL
4344case "x$ac_cv_prog_cc_c89" in
4345 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4347$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4350$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4354$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004355esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004356if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004359
Martin v. Löwis11437992002-04-12 09:54:03 +00004360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
4371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4372$as_echo_n "checking how to run the C preprocessor... " >&6; }
4373# On Suns, sometimes $CPP names a directory.
4374if test -n "$CPP" && test -d "$CPP"; then
4375 CPP=
4376fi
4377if test -z "$CPP"; then
4378 if ${ac_cv_prog_CPP+:} false; then :
4379 $as_echo_n "(cached) " >&6
4380else
4381 # Double quotes because CPP needs to be expanded
4382 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4383 do
4384 ac_preproc_ok=false
4385for ac_c_preproc_warn_flag in '' yes
4386do
4387 # Use a header file that comes with gcc, so configuring glibc
4388 # with a fresh cross-compiler works.
4389 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4390 # <limits.h> exists even on freestanding compilers.
4391 # On the NeXT, cc -E runs the code through the compiler's parser,
4392 # not just through cpp. "Syntax error" is here to catch this case.
4393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4394/* end confdefs.h. */
4395#ifdef __STDC__
4396# include <limits.h>
4397#else
4398# include <assert.h>
4399#endif
4400 Syntax error
4401_ACEOF
4402if ac_fn_c_try_cpp "$LINENO"; then :
4403
4404else
4405 # Broken: fails on valid input.
4406continue
4407fi
4408rm -f conftest.err conftest.i conftest.$ac_ext
4409
4410 # OK, works on sane cases. Now check whether nonexistent headers
4411 # can be detected and how.
4412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4413/* end confdefs.h. */
4414#include <ac_nonexistent.h>
4415_ACEOF
4416if ac_fn_c_try_cpp "$LINENO"; then :
4417 # Broken: success on invalid input.
4418continue
4419else
4420 # Passes both tests.
4421ac_preproc_ok=:
4422break
4423fi
4424rm -f conftest.err conftest.i conftest.$ac_ext
4425
4426done
4427# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4428rm -f conftest.i conftest.err conftest.$ac_ext
4429if $ac_preproc_ok; then :
4430 break
4431fi
4432
4433 done
4434 ac_cv_prog_CPP=$CPP
4435
4436fi
4437 CPP=$ac_cv_prog_CPP
4438else
4439 ac_cv_prog_CPP=$CPP
4440fi
4441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4442$as_echo "$CPP" >&6; }
4443ac_preproc_ok=false
4444for ac_c_preproc_warn_flag in '' yes
4445do
4446 # Use a header file that comes with gcc, so configuring glibc
4447 # with a fresh cross-compiler works.
4448 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4449 # <limits.h> exists even on freestanding compilers.
4450 # On the NeXT, cc -E runs the code through the compiler's parser,
4451 # not just through cpp. "Syntax error" is here to catch this case.
4452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4453/* end confdefs.h. */
4454#ifdef __STDC__
4455# include <limits.h>
4456#else
4457# include <assert.h>
4458#endif
4459 Syntax error
4460_ACEOF
4461if ac_fn_c_try_cpp "$LINENO"; then :
4462
4463else
4464 # Broken: fails on valid input.
4465continue
4466fi
4467rm -f conftest.err conftest.i conftest.$ac_ext
4468
4469 # OK, works on sane cases. Now check whether nonexistent headers
4470 # can be detected and how.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#include <ac_nonexistent.h>
4474_ACEOF
4475if ac_fn_c_try_cpp "$LINENO"; then :
4476 # Broken: success on invalid input.
4477continue
4478else
4479 # Passes both tests.
4480ac_preproc_ok=:
4481break
4482fi
4483rm -f conftest.err conftest.i conftest.$ac_ext
4484
4485done
4486# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4487rm -f conftest.i conftest.err conftest.$ac_ext
4488if $ac_preproc_ok; then :
4489
4490else
4491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4493as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4494See \`config.log' for more details" "$LINENO" 5; }
4495fi
4496
4497ac_ext=c
4498ac_cpp='$CPP $CPPFLAGS'
4499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4501ac_compiler_gnu=$ac_cv_c_compiler_gnu
4502
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4504$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4505if ${ac_cv_path_GREP+:} false; then :
4506 $as_echo_n "(cached) " >&6
4507else
4508 if test -z "$GREP"; then
4509 ac_path_GREP_found=false
4510 # Loop through the user's path and test for each of PROGNAME-LIST
4511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4512for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4513do
4514 IFS=$as_save_IFS
4515 test -z "$as_dir" && as_dir=.
4516 for ac_prog in grep ggrep; do
4517 for ac_exec_ext in '' $ac_executable_extensions; do
4518 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4519 as_fn_executable_p "$ac_path_GREP" || continue
4520# Check for GNU ac_path_GREP and select it if it is found.
4521 # Check for GNU $ac_path_GREP
4522case `"$ac_path_GREP" --version 2>&1` in
4523*GNU*)
4524 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4525*)
4526 ac_count=0
4527 $as_echo_n 0123456789 >"conftest.in"
4528 while :
4529 do
4530 cat "conftest.in" "conftest.in" >"conftest.tmp"
4531 mv "conftest.tmp" "conftest.in"
4532 cp "conftest.in" "conftest.nl"
4533 $as_echo 'GREP' >> "conftest.nl"
4534 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4535 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4536 as_fn_arith $ac_count + 1 && ac_count=$as_val
4537 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4538 # Best one so far, save it but keep looking for a better one
4539 ac_cv_path_GREP="$ac_path_GREP"
4540 ac_path_GREP_max=$ac_count
4541 fi
4542 # 10*(2^10) chars as input seems more than enough
4543 test $ac_count -gt 10 && break
4544 done
4545 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4546esac
4547
4548 $ac_path_GREP_found && break 3
4549 done
4550 done
4551 done
4552IFS=$as_save_IFS
4553 if test -z "$ac_cv_path_GREP"; then
4554 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4555 fi
4556else
4557 ac_cv_path_GREP=$GREP
4558fi
4559
4560fi
4561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4562$as_echo "$ac_cv_path_GREP" >&6; }
4563 GREP="$ac_cv_path_GREP"
4564
4565
Łukasz Langaa785c872016-09-09 17:37:37 -07004566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4567$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4568if ${ac_cv_path_SED+:} false; then :
4569 $as_echo_n "(cached) " >&6
4570else
4571 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4572 for ac_i in 1 2 3 4 5 6 7; do
4573 ac_script="$ac_script$as_nl$ac_script"
4574 done
4575 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4576 { ac_script=; unset ac_script;}
4577 if test -z "$SED"; then
4578 ac_path_SED_found=false
4579 # Loop through the user's path and test for each of PROGNAME-LIST
4580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4581for as_dir in $PATH
4582do
4583 IFS=$as_save_IFS
4584 test -z "$as_dir" && as_dir=.
4585 for ac_prog in sed gsed; do
4586 for ac_exec_ext in '' $ac_executable_extensions; do
4587 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4588 as_fn_executable_p "$ac_path_SED" || continue
4589# Check for GNU ac_path_SED and select it if it is found.
4590 # Check for GNU $ac_path_SED
4591case `"$ac_path_SED" --version 2>&1` in
4592*GNU*)
4593 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4594*)
4595 ac_count=0
4596 $as_echo_n 0123456789 >"conftest.in"
4597 while :
4598 do
4599 cat "conftest.in" "conftest.in" >"conftest.tmp"
4600 mv "conftest.tmp" "conftest.in"
4601 cp "conftest.in" "conftest.nl"
4602 $as_echo '' >> "conftest.nl"
4603 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4604 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4605 as_fn_arith $ac_count + 1 && ac_count=$as_val
4606 if test $ac_count -gt ${ac_path_SED_max-0}; then
4607 # Best one so far, save it but keep looking for a better one
4608 ac_cv_path_SED="$ac_path_SED"
4609 ac_path_SED_max=$ac_count
4610 fi
4611 # 10*(2^10) chars as input seems more than enough
4612 test $ac_count -gt 10 && break
4613 done
4614 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4615esac
4616
4617 $ac_path_SED_found && break 3
4618 done
4619 done
4620 done
4621IFS=$as_save_IFS
4622 if test -z "$ac_cv_path_SED"; then
4623 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4624 fi
4625else
4626 ac_cv_path_SED=$SED
4627fi
4628
4629fi
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4631$as_echo "$ac_cv_path_SED" >&6; }
4632 SED="$ac_cv_path_SED"
4633 rm -f conftest.sed
4634
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004635
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4639$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004641# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004642if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004643 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004644
4645 case $withval in
4646 no) with_cxx_main=no
4647 MAINCC='$(CC)';;
4648 yes) with_cxx_main=yes
4649 MAINCC='$(CXX)';;
4650 *) with_cxx_main=yes
4651 MAINCC=$withval
4652 if test -z "$CXX"
4653 then
4654 CXX=$withval
4655 fi;;
4656 esac
4657else
4658
4659 with_cxx_main=no
4660 MAINCC='$(CC)'
4661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004662fi
4663
Matthias Kloseb9621712010-04-24 17:59:49 +00004664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4665$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
4667preset_cxx="$CXX"
4668if test -z "$CXX"
4669then
4670 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671 gcc) if test -n "$ac_tool_prefix"; then
4672 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4673set dummy ${ac_tool_prefix}g++; ac_word=$2
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
4676if ${ac_cv_path_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702CXX=$ac_cv_path_CXX
4703if test -n "$CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4705$as_echo "$CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711
4712fi
4713if test -z "$ac_cv_path_CXX"; then
4714 ac_pt_CXX=$CXX
4715 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004716set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719if ${ac_cv_path_ac_pt_CXX+:} false; then :
4720 $as_echo_n "(cached) " >&6
4721else
4722 case $ac_pt_CXX in
4723 [\\/]* | ?:[\\/]*)
4724 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4725 ;;
4726 *)
4727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728for as_dir in notfound
4729do
4730 IFS=$as_save_IFS
4731 test -z "$as_dir" && as_dir=.
4732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4736 break 2
4737 fi
4738done
4739 done
4740IFS=$as_save_IFS
4741
4742 ;;
4743esac
4744fi
4745ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4746if test -n "$ac_pt_CXX"; then
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4748$as_echo "$ac_pt_CXX" >&6; }
4749else
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751$as_echo "no" >&6; }
4752fi
4753
4754 if test "x$ac_pt_CXX" = x; then
4755 CXX="g++"
4756 else
4757 case $cross_compiling:$ac_tool_warned in
4758yes:)
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4761ac_tool_warned=yes ;;
4762esac
4763 CXX=$ac_pt_CXX
4764 fi
4765else
4766 CXX="$ac_cv_path_CXX"
4767fi
4768 ;;
4769 cc) if test -n "$ac_tool_prefix"; then
4770 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4771set dummy ${ac_tool_prefix}c++; ac_word=$2
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004774if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776else
4777 case $CXX in
4778 [\\/]* | ?:[\\/]*)
4779 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4780 ;;
4781 *)
4782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in notfound
4784do
4785 IFS=$as_save_IFS
4786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 break 2
4792 fi
4793done
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 ;;
4798esac
4799fi
4800CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4803$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804else
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809
4810fi
4811if test -z "$ac_cv_path_CXX"; then
4812 ac_pt_CXX=$CXX
4813 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004814set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004820 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 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 +00004823 ;;
4824 *)
4825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in notfound
4827do
4828 IFS=$as_save_IFS
4829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 break 2
4835 fi
4836done
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004838IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840 ;;
4841esac
4842fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4844if test -n "$ac_pt_CXX"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4846$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004847else
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004851
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852 if test "x$ac_pt_CXX" = x; then
4853 CXX="c++"
4854 else
4855 case $cross_compiling:$ac_tool_warned in
4856yes:)
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4859ac_tool_warned=yes ;;
4860esac
4861 CXX=$ac_pt_CXX
4862 fi
4863else
4864 CXX="$ac_cv_path_CXX"
4865fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 clang|*/clang) if test -n "$ac_tool_prefix"; then
4868 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4869set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if ${ac_cv_path_CXX+:} false; then :
4873 $as_echo_n "(cached) " >&6
4874else
4875 case $CXX in
4876 [\\/]* | ?:[\\/]*)
4877 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4878 ;;
4879 *)
4880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881for as_dir in notfound
4882do
4883 IFS=$as_save_IFS
4884 test -z "$as_dir" && as_dir=.
4885 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004887 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889 break 2
4890 fi
4891done
4892 done
4893IFS=$as_save_IFS
4894
Ned Deilycbfb9a52012-06-23 16:02:19 -07004895 ;;
4896esac
4897fi
4898CXX=$ac_cv_path_CXX
4899if test -n "$CXX"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4901$as_echo "$CXX" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004907
4908fi
4909if test -z "$ac_cv_path_CXX"; then
4910 ac_pt_CXX=$CXX
4911 # Extract the first word of "clang++", so it can be a program name with args.
4912set dummy clang++; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_ac_pt_CXX+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 case $ac_pt_CXX in
4919 [\\/]* | ?:[\\/]*)
4920 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4921 ;;
4922 *)
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in notfound
4925do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934done
4935 done
4936IFS=$as_save_IFS
4937
4938 ;;
4939esac
4940fi
4941ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4942if test -n "$ac_pt_CXX"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4944$as_echo "$ac_pt_CXX" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950 if test "x$ac_pt_CXX" = x; then
4951 CXX="clang++"
4952 else
4953 case $cross_compiling:$ac_tool_warned in
4954yes:)
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4957ac_tool_warned=yes ;;
4958esac
4959 CXX=$ac_pt_CXX
4960 fi
4961else
4962 CXX="$ac_cv_path_CXX"
4963fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004964 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004965 icc|*/icc) if test -n "$ac_tool_prefix"; then
4966 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4967set dummy ${ac_tool_prefix}icpc; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if ${ac_cv_path_CXX+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972else
4973 case $CXX in
4974 [\\/]* | ?:[\\/]*)
4975 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4976 ;;
4977 *)
4978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4979for as_dir in notfound
4980do
4981 IFS=$as_save_IFS
4982 test -z "$as_dir" && as_dir=.
4983 for ac_exec_ext in '' $ac_executable_extensions; do
4984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4985 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987 break 2
4988 fi
4989done
4990 done
4991IFS=$as_save_IFS
4992
4993 ;;
4994esac
4995fi
4996CXX=$ac_cv_path_CXX
4997if test -n "$CXX"; then
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4999$as_echo "$CXX" >&6; }
5000else
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
5003fi
5004
5005
5006fi
5007if test -z "$ac_cv_path_CXX"; then
5008 ac_pt_CXX=$CXX
5009 # Extract the first word of "icpc", so it can be a program name with args.
5010set dummy icpc; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if ${ac_cv_path_ac_pt_CXX+:} false; then :
5014 $as_echo_n "(cached) " >&6
5015else
5016 case $ac_pt_CXX in
5017 [\\/]* | ?:[\\/]*)
5018 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5019 ;;
5020 *)
5021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in notfound
5023do
5024 IFS=$as_save_IFS
5025 test -z "$as_dir" && as_dir=.
5026 for ac_exec_ext in '' $ac_executable_extensions; do
5027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5028 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030 break 2
5031 fi
5032done
5033 done
5034IFS=$as_save_IFS
5035
5036 ;;
5037esac
5038fi
5039ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5040if test -n "$ac_pt_CXX"; then
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5042$as_echo "$ac_pt_CXX" >&6; }
5043else
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048 if test "x$ac_pt_CXX" = x; then
5049 CXX="icpc"
5050 else
5051 case $cross_compiling:$ac_tool_warned in
5052yes:)
5053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5055ac_tool_warned=yes ;;
5056esac
5057 CXX=$ac_pt_CXX
5058 fi
5059else
5060 CXX="$ac_cv_path_CXX"
5061fi
5062 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063 esac
5064 if test "$CXX" = "notfound"
5065 then
5066 CXX=""
5067 fi
5068fi
5069if test -z "$CXX"
5070then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005071 if test -n "$ac_tool_prefix"; then
5072 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5073 do
5074 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005078if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005080else
5081 if test -n "$CXX"; then
5082 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093 break 2
5094 fi
5095done
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098
5099fi
5100fi
5101CXX=$ac_cv_prog_CXX
5102if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5104$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105else
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108fi
5109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005111 test -n "$CXX" && break
5112 done
5113fi
5114if test -z "$CXX"; then
5115 ac_ct_CXX=$CXX
5116 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5117do
5118 # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5123 $as_echo_n "(cached) " >&6
5124else
5125 if test -n "$ac_ct_CXX"; then
5126 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5127else
5128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5129for as_dir in $PATH
5130do
5131 IFS=$as_save_IFS
5132 test -z "$as_dir" && as_dir=.
5133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005135 ac_cv_prog_ac_ct_CXX="$ac_prog"
5136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5137 break 2
5138 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005140 done
5141IFS=$as_save_IFS
5142
5143fi
5144fi
5145ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5146if test -n "$ac_ct_CXX"; then
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5148$as_echo "$ac_ct_CXX" >&6; }
5149else
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151$as_echo "no" >&6; }
5152fi
5153
5154
5155 test -n "$ac_ct_CXX" && break
5156done
5157
5158 if test "x$ac_ct_CXX" = x; then
5159 CXX="notfound"
5160 else
5161 case $cross_compiling:$ac_tool_warned in
5162yes:)
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5165ac_tool_warned=yes ;;
5166esac
5167 CXX=$ac_ct_CXX
5168 fi
5169fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005170
5171 if test "$CXX" = "notfound"
5172 then
5173 CXX=""
5174 fi
5175fi
5176if test "$preset_cxx" != "$CXX"
5177then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005178 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179
5180 By default, distutils will build C++ extension modules with \"$CXX\".
5181 If this is not intended, then set CXX on the configure command line.
5182 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184
5185 By default, distutils will build C++ extension modules with \"$CXX\".
5186 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188fi
5189
5190
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005191MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5192
5193
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5195$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5196cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef bfin
5198#undef cris
5199#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef hppa
5202#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005204#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005205#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005208#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005209 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005210#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005211# if defined(__x86_64__) && defined(__LP64__)
5212 x86_64-linux-gnu
5213# elif defined(__x86_64__) && defined(__ILP32__)
5214 x86_64-linux-gnux32
5215# elif defined(__i386__)
5216 i386-linux-gnu
5217# elif defined(__aarch64__) && defined(__AARCH64EL__)
5218# if defined(__ILP32__)
5219 aarch64_ilp32-linux-gnu
5220# else
5221 aarch64-linux-gnu
5222# endif
5223# elif defined(__aarch64__) && defined(__AARCH64EB__)
5224# if defined(__ILP32__)
5225 aarch64_be_ilp32-linux-gnu
5226# else
5227 aarch64_be-linux-gnu
5228# endif
5229# elif defined(__alpha__)
5230 alpha-linux-gnu
5231# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5232# if defined(__ARMEL__)
5233 arm-linux-gnueabihf
5234# else
5235 armeb-linux-gnueabihf
5236# endif
5237# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5238# if defined(__ARMEL__)
5239 arm-linux-gnueabi
5240# else
5241 armeb-linux-gnueabi
5242# endif
5243# elif defined(__hppa__)
5244 hppa-linux-gnu
5245# elif defined(__ia64__)
5246 ia64-linux-gnu
5247# elif defined(__m68k__) && !defined(__mcoldfire__)
5248 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005249# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5250# if _MIPS_SIM == _ABIO32
5251 mipsisa32r6el-linux-gnu
5252# elif _MIPS_SIM == _ABIN32
5253 mipsisa64r6el-linux-gnuabin32
5254# elif _MIPS_SIM == _ABI64
5255 mipsisa64r6el-linux-gnuabi64
5256# else
5257# error unknown platform triplet
5258# endif
5259# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5260# if _MIPS_SIM == _ABIO32
5261 mipsisa32r6-linux-gnu
5262# elif _MIPS_SIM == _ABIN32
5263 mipsisa64r6-linux-gnuabin32
5264# elif _MIPS_SIM == _ABI64
5265 mipsisa64r6-linux-gnuabi64
5266# else
5267# error unknown platform triplet
5268# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005269# elif defined(__mips_hard_float) && defined(_MIPSEL)
5270# if _MIPS_SIM == _ABIO32
5271 mipsel-linux-gnu
5272# elif _MIPS_SIM == _ABIN32
5273 mips64el-linux-gnuabin32
5274# elif _MIPS_SIM == _ABI64
5275 mips64el-linux-gnuabi64
5276# else
5277# error unknown platform triplet
5278# endif
5279# elif defined(__mips_hard_float)
5280# if _MIPS_SIM == _ABIO32
5281 mips-linux-gnu
5282# elif _MIPS_SIM == _ABIN32
5283 mips64-linux-gnuabin32
5284# elif _MIPS_SIM == _ABI64
5285 mips64-linux-gnuabi64
5286# else
5287# error unknown platform triplet
5288# endif
5289# elif defined(__or1k__)
5290 or1k-linux-gnu
5291# elif defined(__powerpc__) && defined(__SPE__)
5292 powerpc-linux-gnuspe
5293# elif defined(__powerpc64__)
5294# if defined(__LITTLE_ENDIAN__)
5295 powerpc64le-linux-gnu
5296# else
5297 powerpc64-linux-gnu
5298# endif
5299# elif defined(__powerpc__)
5300 powerpc-linux-gnu
5301# elif defined(__s390x__)
5302 s390x-linux-gnu
5303# elif defined(__s390__)
5304 s390-linux-gnu
5305# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5306 sh4-linux-gnu
5307# elif defined(__sparc__) && defined(__arch64__)
5308 sparc64-linux-gnu
5309# elif defined(__sparc__)
5310 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005311# elif defined(__riscv)
5312# if __riscv_xlen == 32
5313 riscv32-linux-gnu
5314# elif __riscv_xlen == 64
5315 riscv64-linux-gnu
5316# else
5317# error unknown platform triplet
5318# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319# else
5320# error unknown platform triplet
5321# endif
5322#elif defined(__FreeBSD_kernel__)
5323# if defined(__LP64__)
5324 x86_64-kfreebsd-gnu
5325# elif defined(__i386__)
5326 i386-kfreebsd-gnu
5327# else
5328# error unknown platform triplet
5329# endif
5330#elif defined(__gnu_hurd__)
5331 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005332#elif defined(__APPLE__)
5333 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005334#else
5335# error unknown platform triplet
5336#endif
5337
5338EOF
5339
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005340if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5343$as_echo "$PLATFORM_TRIPLET" >&6; }
5344else
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5346$as_echo "none" >&6; }
5347fi
5348rm -f conftest.c conftest.out
5349
5350if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5351 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5352 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5353 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005354elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5355 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005357
doko@ubuntu.com55532312016-06-14 08:55:19 +02005358if test x$MULTIARCH != x; then
5359 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5360fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005361
5362
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5364$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5365save_LDFLAGS="$LDFLAGS"
5366LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005367
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5369/* end confdefs.h. */
5370
5371int
5372main ()
5373{
5374
5375 ;
5376 return 0;
5377}
5378_ACEOF
5379if ac_fn_c_try_link "$LINENO"; then :
5380 NO_AS_NEEDED="-Wl,--no-as-needed"
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5382$as_echo "yes" >&6; }
5383else
5384 NO_AS_NEEDED=""
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386$as_echo "no" >&6; }
5387fi
5388rm -f core conftest.err conftest.$ac_objext \
5389 conftest$ac_exeext conftest.$ac_ext
5390LDFLAGS="$save_LDFLAGS"
5391
5392
5393
5394# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395
Matthias Kloseb9621712010-04-24 17:59:49 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5397$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005398if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400else
5401 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5402 then ac_cv_path_EGREP="$GREP -E"
5403 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 # Loop through the user's path and test for each of PROGNAME-LIST
5407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5409do
5410 IFS=$as_save_IFS
5411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 for ac_prog in egrep; do
5413 for ac_exec_ext in '' $ac_executable_extensions; do
5414 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005415 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005416# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 # Check for GNU $ac_path_EGREP
5418case `"$ac_path_EGREP" --version 2>&1` in
5419*GNU*)
5420 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5421*)
5422 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 while :
5425 do
5426 cat "conftest.in" "conftest.in" >"conftest.tmp"
5427 mv "conftest.tmp" "conftest.in"
5428 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5431 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5434 # Best one so far, save it but keep looking for a better one
5435 ac_cv_path_EGREP="$ac_path_EGREP"
5436 ac_path_EGREP_max=$ac_count
5437 fi
5438 # 10*(2^10) chars as input seems more than enough
5439 test $ac_count -gt 10 && break
5440 done
5441 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5442esac
5443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 $ac_path_EGREP_found && break 3
5445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005450 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 +00005451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452else
5453 ac_cv_path_EGREP=$EGREP
5454fi
5455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456 fi
5457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5459$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005461
5462
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5464$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005465if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $as_echo_n "(cached) " >&6
5467else
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005469/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005470#include <stdlib.h>
5471#include <stdarg.h>
5472#include <string.h>
5473#include <float.h>
5474
5475int
5476main ()
5477{
5478
5479 ;
5480 return 0;
5481}
5482_ACEOF
5483if ac_fn_c_try_compile "$LINENO"; then :
5484 ac_cv_header_stdc=yes
5485else
5486 ac_cv_header_stdc=no
5487fi
5488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5489
5490if test $ac_cv_header_stdc = yes; then
5491 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5493/* end confdefs.h. */
5494#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005496_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005498 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500else
Matthias Kloseb9621712010-04-24 17:59:49 +00005501 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005502fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005503rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504
Matthias Kloseb9621712010-04-24 17:59:49 +00005505fi
5506
5507if test $ac_cv_header_stdc = yes; then
5508 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510/* end confdefs.h. */
5511#include <stdlib.h>
5512
5513_ACEOF
5514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5515 $EGREP "free" >/dev/null 2>&1; then :
5516
5517else
5518 ac_cv_header_stdc=no
5519fi
5520rm -f conftest*
5521
5522fi
5523
5524if test $ac_cv_header_stdc = yes; then
5525 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5526 if test "$cross_compiling" = yes; then :
5527 :
5528else
5529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530/* end confdefs.h. */
5531#include <ctype.h>
5532#include <stdlib.h>
5533#if ((' ' & 0x0FF) == 0x020)
5534# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5535# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5536#else
5537# define ISLOWER(c) \
5538 (('a' <= (c) && (c) <= 'i') \
5539 || ('j' <= (c) && (c) <= 'r') \
5540 || ('s' <= (c) && (c) <= 'z'))
5541# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5542#endif
5543
5544#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5545int
5546main ()
5547{
5548 int i;
5549 for (i = 0; i < 256; i++)
5550 if (XOR (islower (i), ISLOWER (i))
5551 || toupper (i) != TOUPPER (i))
5552 return 2;
5553 return 0;
5554}
5555_ACEOF
5556if ac_fn_c_try_run "$LINENO"; then :
5557
5558else
5559 ac_cv_header_stdc=no
5560fi
5561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5562 conftest.$ac_objext conftest.beam conftest.$ac_ext
5563fi
5564
5565fi
5566fi
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5568$as_echo "$ac_cv_header_stdc" >&6; }
5569if test $ac_cv_header_stdc = yes; then
5570
5571$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5572
5573fi
5574
5575# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5576for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5577 inttypes.h stdint.h unistd.h
5578do :
5579 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5580ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5581"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005582if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 cat >>confdefs.h <<_ACEOF
5584#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5585_ACEOF
5586
5587fi
5588
5589done
5590
5591
5592
5593 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 +02005594if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005595 MINIX=yes
5596else
5597 MINIX=
5598fi
5599
5600
5601 if test "$MINIX" = yes; then
5602
5603$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5604
5605
5606$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5607
5608
5609$as_echo "#define _MINIX 1" >>confdefs.h
5610
5611 fi
5612
5613
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5615$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005616if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 $as_echo_n "(cached) " >&6
5618else
5619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5620/* end confdefs.h. */
5621
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005622# define __EXTENSIONS__ 1
5623 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005624int
5625main ()
5626{
5627
5628 ;
5629 return 0;
5630}
5631_ACEOF
5632if ac_fn_c_try_compile "$LINENO"; then :
5633 ac_cv_safe_to_define___extensions__=yes
5634else
5635 ac_cv_safe_to_define___extensions__=no
5636fi
5637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5638fi
5639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5640$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5641 test $ac_cv_safe_to_define___extensions__ = yes &&
5642 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5643
5644 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5645
5646 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5647
5648 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5649
5650 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5651
5652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
Xavier de Gaye95750b12016-07-09 11:05:42 +02005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5655$as_echo_n "checking for the Android API level... " >&6; }
5656cat >> conftest.c <<EOF
5657#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658android_api = __ANDROID_API__
5659arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660#else
5661#error not Android
5662#endif
5663EOF
5664
5665if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5667 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5669$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005670 if test -z "$ANDROID_API_LEVEL"; then
5671 echo 'Fatal: you must define __ANDROID_API__'
5672 exit 1
5673 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005674
5675cat >>confdefs.h <<_ACEOF
5676#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5677_ACEOF
5678
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005679
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5681$as_echo_n "checking for the Android arm ABI... " >&6; }
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5683$as_echo "$_arm_arch" >&6; }
5684 if test "$_arm_arch" = 7; then
5685 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5686 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5687 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005688else
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5690$as_echo "not Android" >&6; }
5691fi
5692rm -f conftest.c conftest.out
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694# Check for unsupported systems
5695case $ac_sys_system/$ac_sys_release in
5696atheos*|Linux*/1*)
5697 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5698 echo See README for details.
5699 exit 1;;
5700esac
5701
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5704$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
5706# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 withval=$with_suffix;
5709 case $withval in
5710 no) EXEEXT=;;
5711 yes) EXEEXT=.exe;;
5712 *) EXEEXT=$withval;;
5713 esac
5714fi
5715
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5717$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719# Test whether we're running on a non-case-sensitive system, in which
5720# case we give a warning if no ext is given
5721
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5723$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724if test ! -d CaseSensitiveTestDir; then
5725mkdir CaseSensitiveTestDir
5726fi
5727
5728if test -d casesensitivetestdir
5729then
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5731$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=.exe
5733else
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 BUILDEXEEXT=$EXEEXT
5737fi
5738rmdir CaseSensitiveTestDir
5739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740case $ac_sys_system in
5741hp*|HP*)
5742 case $CC in
5743 cc|*/cc) CC="$CC -Ae";;
5744 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745esac
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5749$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750if test -z "$LIBRARY"
5751then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005752 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5755$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757# LDLIBRARY is the name of the library to link against (as opposed to the
5758# name of the library into which to insert object files). BLDLIBRARY is also
5759# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5760# is blank as the main program is not linked directly against LDLIBRARY.
5761# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5762# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5763# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5764# DLLLIBRARY is the shared (i.e., DLL) library.
5765#
5766# RUNSHARED is used to run shared python without installed libraries
5767#
5768# INSTSONAME is the name of the shared library that will be use to install
5769# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005770#
5771# LDVERSION is the shared library version number, normally the Python version
5772# with the ABI build flags appended.
5773
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775
5776
5777
5778
5779
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781LDLIBRARY="$LIBRARY"
5782BLDLIBRARY='$(LDLIBRARY)'
5783INSTSONAME='$(LDLIBRARY)'
5784DLLLIBRARY=''
5785LDLIBRARYDIR=''
5786RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005787LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# LINKCC is the command that links the python executable -- default is $(CC).
5790# If CXX is set, and if it is needed to link a main function that was
5791# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5792# python might then depend on the C++ runtime
5793# This is altered for AIX in order to build the export list before
5794# linking.
5795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5797$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798if test -z "$LINKCC"
5799then
5800 LINKCC='$(PURIFY) $(MAINCC)'
5801 case $ac_sys_system in
5802 AIX*)
5803 exp_extra="\"\""
5804 if test $ac_sys_release -ge 5 -o \
5805 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5806 exp_extra="."
5807 fi
5808 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 QNX*)
5810 # qcc must be used because the other compilers do not
5811 # support -N.
5812 LINKCC=qcc;;
5813 esac
5814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5816$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
5818# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5819# make sure we default having it set to "no": this is used by
5820# distutils.unixccompiler to know if it should add --enable-new-dtags
5821# to linker command lines, and failing to detect GNU ld simply results
5822# in the same bahaviour as before.
5823
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5825$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826ac_prog=ld
5827if test "$GCC" = yes; then
5828 ac_prog=`$CC -print-prog-name=ld`
5829fi
5830case `"$ac_prog" -V 2>&1 < /dev/null` in
5831 *GNU*)
5832 GNULD=yes;;
5833 *)
5834 GNULD=no;;
5835esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5837$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5840$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005842if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enableval=$enable_shared;
5844fi
5845
5846
5847if test -z "$enable_shared"
5848then
5849 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005850 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 enable_shared="yes";;
5852 *)
5853 enable_shared="no";;
5854 esac
5855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5857$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5860$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005862if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863 enableval=$enable_profiling;
5864fi
5865
5866if test "x$enable_profiling" = xyes; then
5867 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005868 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870/* end confdefs.h. */
5871int main() { return 0; }
5872_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005873if ac_fn_c_try_link "$LINENO"; then :
5874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878rm -f core conftest.err conftest.$ac_objext \
5879 conftest$ac_exeext conftest.$ac_ext
5880 CC="$ac_save_cc"
5881else
5882 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5885$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887if test "x$enable_profiling" = xyes; then
5888 BASECFLAGS="-pg $BASECFLAGS"
5889 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
Matthias Kloseb9621712010-04-24 17:59:49 +00005892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5893$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
5895# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5896# library that we build, but we do not want to link against it (we
5897# will find it with a -framework option). For this reason there is an
5898# extra variable BLDLIBRARY against which Python and the extension
5899# modules are linked, BLDLIBRARY. This is normally the same as
5900# LDLIBRARY, but empty for MacOSX framework builds.
5901if test "$enable_framework"
5902then
5903 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 BLDLIBRARY=''
5906else
5907 BLDLIBRARY='$(LDLIBRARY)'
5908fi
5909
5910# Other platforms follow
5911if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005912 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
Matthias Kloseb9621712010-04-24 17:59:49 +00005914$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
5916 case $ac_sys_system in
5917 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).dll.a'
5919 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
5921 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).so'
5923 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005926 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005927 then
5928 PY3LIBRARY=libpython3.so
5929 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005931 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).so'
5933 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005934 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005936 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005937 then
5938 PY3LIBRARY=libpython3.so
5939 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 hp*|HP*)
5942 case `uname -m` in
5943 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
5946 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005951 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).dylib'
5955 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005956 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005958 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005961 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
5963 esac
5964else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005965 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 case $ac_sys_system in
5967 CYGWIN*)
5968 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005969 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
5971 esac
5972fi
5973
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005974if test "$cross_compiling" = yes; then
5975 RUNSHARED=
5976fi
5977
Matthias Kloseb9621712010-04-24 17:59:49 +00005978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5979$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005982if test -n "$ac_tool_prefix"; then
5983 for ac_prog in ar aal
5984 do
5985 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005989if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
5992 if test -n "$AR"; then
5993 ac_cv_prog_AR="$AR" # Let the user override the test.
5994else
5995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998 IFS=$as_save_IFS
5999 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 break 2
6005 fi
6006done
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008IFS=$as_save_IFS
6009
6010fi
6011fi
6012AR=$ac_cv_prog_AR
6013if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6015$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016else
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019fi
6020
6021
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 test -n "$AR" && break
6023 done
6024fi
6025if test -z "$AR"; then
6026 ac_ct_AR=$AR
6027 for ac_prog in ar aal
6028do
6029 # Extract the first word of "$ac_prog", so it can be a program name with args.
6030set dummy $ac_prog; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_prog_ac_ct_AR+:} false; then :
6034 $as_echo_n "(cached) " >&6
6035else
6036 if test -n "$ac_ct_AR"; then
6037 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6038else
6039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6040for as_dir in $PATH
6041do
6042 IFS=$as_save_IFS
6043 test -z "$as_dir" && as_dir=.
6044 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006046 ac_cv_prog_ac_ct_AR="$ac_prog"
6047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6048 break 2
6049 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006051 done
6052IFS=$as_save_IFS
6053
6054fi
6055fi
6056ac_ct_AR=$ac_cv_prog_ac_ct_AR
6057if test -n "$ac_ct_AR"; then
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6059$as_echo "$ac_ct_AR" >&6; }
6060else
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6062$as_echo "no" >&6; }
6063fi
6064
6065
6066 test -n "$ac_ct_AR" && break
6067done
6068
6069 if test "x$ac_ct_AR" = x; then
6070 AR="ar"
6071 else
6072 case $cross_compiling:$ac_tool_warned in
6073yes:)
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6076ac_tool_warned=yes ;;
6077esac
6078 AR=$ac_ct_AR
6079 fi
6080fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082
6083# tweak ARFLAGS only if the user didn't set it on the command line
6084
6085if test -z "$ARFLAGS"
6086then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006087 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088fi
6089
doko@ubuntu.com58844492012-06-30 18:25:32 +02006090if test -n "$ac_tool_prefix"; then
6091 for ac_prog in readelf
6092 do
6093 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_prog_READELF+:} false; then :
6098 $as_echo_n "(cached) " >&6
6099else
6100 if test -n "$READELF"; then
6101 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6102else
6103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104for as_dir in $PATH
6105do
6106 IFS=$as_save_IFS
6107 test -z "$as_dir" && as_dir=.
6108 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006110 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6112 break 2
6113 fi
6114done
6115 done
6116IFS=$as_save_IFS
6117
6118fi
6119fi
6120READELF=$ac_cv_prog_READELF
6121if test -n "$READELF"; then
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6123$as_echo "$READELF" >&6; }
6124else
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
6127fi
6128
6129
6130 test -n "$READELF" && break
6131 done
6132fi
6133if test -z "$READELF"; then
6134 ac_ct_READELF=$READELF
6135 for ac_prog in readelf
6136do
6137 # Extract the first word of "$ac_prog", so it can be a program name with args.
6138set dummy $ac_prog; ac_word=$2
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6140$as_echo_n "checking for $ac_word... " >&6; }
6141if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6142 $as_echo_n "(cached) " >&6
6143else
6144 if test -n "$ac_ct_READELF"; then
6145 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6146else
6147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
6152 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006154 ac_cv_prog_ac_ct_READELF="$ac_prog"
6155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156 break 2
6157 fi
6158done
6159 done
6160IFS=$as_save_IFS
6161
6162fi
6163fi
6164ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6165if test -n "$ac_ct_READELF"; then
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6167$as_echo "$ac_ct_READELF" >&6; }
6168else
6169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6170$as_echo "no" >&6; }
6171fi
6172
6173
6174 test -n "$ac_ct_READELF" && break
6175done
6176
6177 if test "x$ac_ct_READELF" = x; then
6178 READELF=":"
6179 else
6180 case $cross_compiling:$ac_tool_warned in
6181yes:)
6182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6184ac_tool_warned=yes ;;
6185esac
6186 READELF=$ac_ct_READELF
6187 fi
6188fi
6189
6190if test "$cross_compiling" = yes; then
6191 case "$READELF" in
6192 readelf|:)
6193 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6194 ;;
6195 esac
6196fi
6197
6198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006201hp*|HP*)
6202 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 if test -z "$INSTALL"
6204 then
6205 INSTALL="${srcdir}/install-sh -c"
6206 fi
6207esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208# Find a good install program. We prefer a C program (faster),
6209# so one script is as good as another. But avoid the broken or
6210# incompatible versions:
6211# SysV /etc/install, /usr/sbin/install
6212# SunOS /usr/etc/install
6213# IRIX /sbin/install
6214# AIX /bin/install
6215# AmigaOS /C/install, which installs bootblocks on floppy discs
6216# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6217# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6218# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6219# OS/2's system install, which has a completely different semantic
6220# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006221# Reject install programs that cannot install multiple files.
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6223$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006225if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227else
6228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6229for as_dir in $PATH
6230do
6231 IFS=$as_save_IFS
6232 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006233 # Account for people who put trailing slashes in PATH elements.
6234case $as_dir/ in #((
6235 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006237 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 /usr/ucb/* ) ;;
6239 *)
6240 # OSF1 and SCO ODT 3.0 have their own names for install.
6241 # Don't use installbsd from OSF since it installs stuff as root
6242 # by default.
6243 for ac_prog in ginstall scoinst install; do
6244 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006245 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 if test $ac_prog = install &&
6247 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6248 # AIX install. It has an incompatible calling convention.
6249 :
6250 elif test $ac_prog = install &&
6251 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6252 # program-specific install script used by HP pwplus--don't use.
6253 :
6254 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 rm -rf conftest.one conftest.two conftest.dir
6256 echo one > conftest.one
6257 echo two > conftest.two
6258 mkdir conftest.dir
6259 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6260 test -s conftest.one && test -s conftest.two &&
6261 test -s conftest.dir/conftest.one &&
6262 test -s conftest.dir/conftest.two
6263 then
6264 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6265 break 3
6266 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267 fi
6268 fi
6269 done
6270 done
6271 ;;
6272esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006273
6274 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275IFS=$as_save_IFS
6276
Matthias Kloseb9621712010-04-24 17:59:49 +00006277rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
6279fi
6280 if test "${ac_cv_path_install+set}" = set; then
6281 INSTALL=$ac_cv_path_install
6282 else
6283 # As a last resort, use the slow shell script. Don't cache a
6284 # value for INSTALL within a source directory, because that will
6285 # break other packages using the cache if that directory is
6286 # removed, or if the value is a relative name.
6287 INSTALL=$ac_install_sh
6288 fi
6289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6291$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292
6293# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6294# It thinks the first close brace ends the variable substitution.
6295test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6296
6297test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6298
6299test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6300
Matthias Klose93a0ef12012-03-15 18:08:34 +01006301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6302$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6303if test -z "$MKDIR_P"; then
6304 if ${ac_cv_path_mkdir+:} false; then :
6305 $as_echo_n "(cached) " >&6
6306else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6309do
6310 IFS=$as_save_IFS
6311 test -z "$as_dir" && as_dir=.
6312 for ac_prog in mkdir gmkdir; do
6313 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006314 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006315 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6316 'mkdir (GNU coreutils) '* | \
6317 'mkdir (coreutils) '* | \
6318 'mkdir (fileutils) '4.1*)
6319 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6320 break 3;;
6321 esac
6322 done
6323 done
6324 done
6325IFS=$as_save_IFS
6326
6327fi
6328
6329 test -d ./--version && rmdir ./--version
6330 if test "${ac_cv_path_mkdir+set}" = set; then
6331 MKDIR_P="$ac_cv_path_mkdir -p"
6332 else
6333 # As a last resort, use the slow shell script. Don't cache a
6334 # value for MKDIR_P within a source directory, because that will
6335 # break other packages using the cache if that directory is
6336 # removed, or if the value is a relative name.
6337 MKDIR_P="$ac_install_sh -d"
6338 fi
6339fi
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6341$as_echo "$MKDIR_P" >&6; }
6342
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343
6344# Not every filesystem supports hard links
6345
6346if test -z "$LN" ; then
6347 case $ac_sys_system in
6348 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349 *) LN=ln;;
6350 esac
6351fi
6352
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006353# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006354
6355ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006356
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6359$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360
6361# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006362if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 withval=$with_pydebug;
6364if test "$withval" != no
6365then
6366
Matthias Kloseb9621712010-04-24 17:59:49 +00006367$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6370$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006372 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006373else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375fi
6376else
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379fi
6380
6381
T. Woutersddbfa2c2017-05-23 01:30:49 +02006382# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6383# the ABI. This allows enabling assertions without changing the ABI.
6384assertions='false'
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6386$as_echo_n "checking for --with-assertions... " >&6; }
6387
6388# Check whether --with-assertions was given.
6389if test "${with_assertions+set}" = set; then :
6390 withval=$with_assertions;
6391if test "$withval" != no
6392then
6393 assertions='true'
6394fi
6395fi
6396
6397if test "$assertions" = 'true'; then
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6399$as_echo "yes" >&6; }
6400elif test "$Py_DEBUG" = 'true'; then
6401 assertions='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6403$as_echo "implied by --with-pydebug" >&6; }
6404else
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
Brett Cannon63d98bc2016-09-06 17:12:40 -07006409# Enable optimization flags
6410
6411
6412Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6414$as_echo_n "checking for --enable-optimizations... " >&6; }
6415# Check whether --enable-optimizations was given.
6416if test "${enable_optimizations+set}" = set; then :
6417 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006418if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006419then
6420 Py_OPT='true'
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6422$as_echo "yes" >&6; };
6423else
6424 Py_OPT='false'
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; };
6427fi
6428else
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
6431fi
6432
6433if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006434 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6435 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006436 # 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 +00006437 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006438 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006439 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006440 DEF_MAKE_RULE="build_all"
6441else
6442 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006443 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006444 DEF_MAKE_RULE="all"
6445fi
6446
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6449$as_echo_n "checking for --with-lto... " >&6; }
6450
6451# Check whether --with-lto was given.
6452if test "${with_lto+set}" = set; then :
6453 withval=$with_lto;
6454if test "$withval" != no
6455then
6456 Py_LTO='true'
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6458$as_echo "yes" >&6; };
6459else
6460 Py_LTO='false'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; };
6463fi
6464else
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469if test "$Py_LTO" = 'true' ; then
6470 case $CC in
6471 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006472 case $ac_sys_system in
6473 Darwin*)
6474 # Any changes made here should be reflected in the GCC+Darwin case below
6475 LTOFLAGS="-flto -Wl,-export_dynamic"
6476 ;;
6477 *)
6478 LTOFLAGS="-flto"
6479 ;;
6480 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006481 ;;
6482 *gcc*)
6483 case $ac_sys_system in
6484 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006485 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006486 ;;
6487 *)
6488 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6489 ;;
6490 esac
6491 ;;
6492 esac
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006493
6494 if test "$ac_cv_prog_cc_g" = "yes"
6495 then
6496 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6497 # to get debug symbols.
6498 LTOFLAGS="$LTOFLAGS -g"
6499 fi
6500
octaviansoldea4c814012017-09-08 12:14:33 -07006501 CFLAGS="$CFLAGS $LTOFLAGS"
6502 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006503fi
6504
Brett Cannon7188a3e2015-09-18 15:13:44 -07006505# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006506
6507
6508
6509
6510
Gregory P. Smith799520c2016-09-07 16:10:00 -07006511# Make this work on systems where llvm tools are not installed with their
6512# normal names in the default $PATH (ie: Ubuntu). They exist under the
6513# non-suffixed name in their versioned llvm directory.
6514llvm_bin_dir=''
6515llvm_path="${PATH}"
6516if test "${CC}" = "clang"
6517then
6518 clang_bin=`which clang`
6519 # Some systems install clang elsewhere as a symlink to the real path
6520 # which is where the related llvm tools are located.
6521 if test -L "${clang_bin}"
6522 then
6523 clang_dir=`dirname "${clang_bin}"`
6524 clang_bin=`readlink "${clang_bin}"`
6525 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6526 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6527 fi
6528fi
Zachary Ware5af85642015-12-21 12:09:17 -06006529
Gregory P. Smith799520c2016-09-07 16:10:00 -07006530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6531$as_echo_n "checking target system type... " >&6; }
6532if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006533 $as_echo_n "(cached) " >&6
6534else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006535 if test "x$target_alias" = x; then
6536 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006537else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006538 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6539 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6540fi
6541
6542fi
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6544$as_echo "$ac_cv_target" >&6; }
6545case $ac_cv_target in
6546*-*-*) ;;
6547*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6548esac
6549target=$ac_cv_target
6550ac_save_IFS=$IFS; IFS='-'
6551set x $ac_cv_target
6552shift
6553target_cpu=$1
6554target_vendor=$2
6555shift; shift
6556# Remember, the first character of IFS is used to create $*,
6557# except with old shells:
6558target_os=$*
6559IFS=$ac_save_IFS
6560case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6561
6562
6563# The aliases save the names the user supplied, while $host etc.
6564# will get canonicalized.
6565test -n "$target_alias" &&
6566 test "$program_prefix$program_suffix$program_transform_name" = \
6567 NONENONEs,x,x, &&
6568 program_prefix=${target_alias}-
6569# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6570set dummy $target_alias-llvm-profdata; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575else
6576 case $LLVM_PROFDATA in
6577 [\\/]* | ?:[\\/]*)
6578 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6579 ;;
6580 *)
6581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
6586 for ac_exec_ext in '' $ac_executable_extensions; do
6587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590 break 2
6591 fi
6592done
6593 done
6594IFS=$as_save_IFS
6595
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596 ;;
6597esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006598fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006599LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6600if test -n "$LLVM_PROFDATA"; then
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6602$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006603else
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608
Gregory P. Smith799520c2016-09-07 16:10:00 -07006609if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6610 if test "$build" = "$target"; then
6611 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6612 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6613set dummy llvm-profdata; ac_word=$2
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6615$as_echo_n "checking for $ac_word... " >&6; }
6616if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6617 $as_echo_n "(cached) " >&6
6618else
6619 case $ac_pt_LLVM_PROFDATA in
6620 [\\/]* | ?:[\\/]*)
6621 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6622 ;;
6623 *)
6624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625for as_dir in ${llvm_path}
6626do
6627 IFS=$as_save_IFS
6628 test -z "$as_dir" && as_dir=.
6629 for ac_exec_ext in '' $ac_executable_extensions; do
6630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6631 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6633 break 2
6634 fi
6635done
6636 done
6637IFS=$as_save_IFS
6638
6639 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6640 ;;
6641esac
6642fi
6643ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6644if test -n "$ac_pt_LLVM_PROFDATA"; then
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6646$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6647else
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6653 else
6654 LLVM_PROFDATA="''"
6655 fi
6656else
6657 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6658fi
6659
6660
6661if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6662then
6663 LLVM_PROF_FOUND="found"
6664else
6665 LLVM_PROF_FOUND="not-found"
6666fi
6667if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6668then
6669 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6670 if test -n "${found_llvm_profdata}"
6671 then
6672 # llvm-profdata isn't directly in $PATH in some cases.
6673 # https://apple.stackexchange.com/questions/197053/
6674 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6675 LLVM_PROF_FOUND=found
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6677$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6678 fi
6679fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680LLVM_PROF_ERR=no
6681case $CC in
6682 *clang*)
6683 # Any changes made here should be reflected in the GCC+Darwin case below
6684 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6685 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006686 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006687 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6688 if test $LLVM_PROF_FOUND = not-found
6689 then
6690 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691 if test "${REQUIRE_PGO}" = "yes"
6692 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006693 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 -07006694 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695 fi
6696 ;;
6697 *gcc*)
6698 case $ac_sys_system in
6699 Darwin*)
6700 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6701 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 then
6706 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006707 if test "${REQUIRE_PGO}" = "yes"
6708 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006709 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 -07006710 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006711 fi
6712 ;;
6713 *)
6714 PGO_PROF_GEN_FLAG="-fprofile-generate"
6715 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6716 LLVM_PROF_MERGER="true"
6717 LLVM_PROF_FILE=""
6718 ;;
6719 esac
6720 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006721 *icc*)
6722 PGO_PROF_GEN_FLAG="-prof-gen"
6723 PGO_PROF_USE_FLAG="-prof-use"
6724 LLVM_PROF_MERGER="true"
6725 LLVM_PROF_FILE=""
6726 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006727esac
6728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6730# merged with this chunk of code?
6731
6732# Optimizer/debugger flags
6733# ------------------------
6734# (The following bit of code is complicated enough - please keep things
6735# indented properly. Just pretend you're editing Python code. ;-)
6736
6737# There are two parallel sets of case statements below, one that checks to
6738# see if OPT was set and one that does BASECFLAGS setting based upon
6739# compiler and platform. BASECFLAGS tweaks need to be made even if the
6740# user set OPT.
6741
6742# tweak OPT based on compiler and platform, only if the user didn't set
6743# it on the command line
6744
Victor Stinner9ed34a82017-05-02 22:35:58 +02006745
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006746if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747then
6748 case $GCC in
6749 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6751 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6752 WRAP="-fwrapv"
6753 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006754
Stefan Krahaf04ff22011-12-08 22:20:31 +01006755 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006756 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006757 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006758 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006759 *)
6760 if $CC --version 2>&1 | grep -q clang
6761 then
6762 cc_is_clang=1
6763 else
6764 cc_is_clang=
6765 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006766 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006767
Victor Stinner35f3d242017-04-21 12:35:24 +02006768 if test -n "${cc_is_clang}"
6769 then
6770 # Clang also needs -fwrapv
6771 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006772 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6773 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006774 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006775 fi
6776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 case $ac_cv_prog_cc_g in
6778 yes)
6779 if test "$Py_DEBUG" = 'true' ; then
6780 # Optimization messes up debuggers, so turn it off for
6781 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006782 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006783 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006784 else
Victor Stinner28205b22017-04-21 11:24:34 +02006785 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006786 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787 else
Victor Stinner28205b22017-04-21 11:24:34 +02006788 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789 fi
6790 ;;
6791 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006792 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793 ;;
6794 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796 case $ac_sys_system in
6797 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6798 ;;
6799 esac
6800 ;;
6801
6802 *)
6803 OPT="-O"
6804 ;;
6805 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806fi
6807
6808
6809
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811# The -arch flags for universal builds on OSX
6812UNIVERSAL_ARCH_FLAGS=
6813
6814
6815# tweak BASECFLAGS based on compiler and platform
6816case $GCC in
6817yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006818 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006819
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6821$as_echo_n "checking for -Wextra... " >&6; }
6822 ac_save_cc="$CC"
6823 CC="$CC -Wextra -Werror"
6824 if ${ac_cv_extra_warnings+:} false; then :
6825 $as_echo_n "(cached) " >&6
6826else
6827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6828/* end confdefs.h. */
6829
6830
6831int
6832main ()
6833{
6834
6835 ;
6836 return 0;
6837}
6838
6839_ACEOF
6840if ac_fn_c_try_compile "$LINENO"; then :
6841
6842 ac_cv_extra_warnings=yes
6843
6844else
6845
6846 ac_cv_extra_warnings=no
6847
6848fi
6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6850fi
6851
6852 CC="$ac_save_cc"
6853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6854$as_echo "$ac_cv_extra_warnings" >&6; }
6855
6856 if test $ac_cv_extra_warnings = yes
6857 then
6858 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6859 fi
6860
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006861 # Python doesn't violate C99 aliasing rules, but older versions of
6862 # GCC produce warnings for legal Python code. Enable
6863 # -fno-strict-aliasing on versions of GCC that support but produce
6864 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6866$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 ac_save_cc="$CC"
6868 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006869 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006870 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006872else
Matthias Kloseb9621712010-04-24 17:59:49 +00006873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006875
Matthias Kloseb159a552010-04-25 21:00:44 +00006876
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006877int
6878main ()
6879{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006880
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006881 ;
6882 return 0;
6883}
Matthias Kloseb159a552010-04-25 21:00:44 +00006884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006886if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006887
6888 CC="$ac_save_cc -fstrict-aliasing"
6889 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006891/* end confdefs.h. */
6892
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006893 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006894int
6895main ()
6896{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006897double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006898 ;
6899 return 0;
6900}
Matthias Kloseb159a552010-04-25 21:00:44 +00006901
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006903if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006904
6905 ac_cv_no_strict_aliasing=no
6906
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907else
Matthias Kloseb159a552010-04-25 21:00:44 +00006908
6909 ac_cv_no_strict_aliasing=yes
6910
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006911fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006913
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006914else
Matthias Kloseb159a552010-04-25 21:00:44 +00006915
6916 ac_cv_no_strict_aliasing=no
6917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006920fi
6921
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006922 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6925$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006926 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927 then
6928 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6929 fi
6930
Zachary Ware5af85642015-12-21 12:09:17 -06006931 # ICC doesn't recognize the option, but only emits a warning
6932 ## XXX does it emit an unused result warning and can it be disabled?
6933 case "$CC" in
6934 *icc*)
6935 ac_cv_disable_unused_result_warning=no
6936 ;;
6937 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6939$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6940 ac_save_cc="$CC"
6941 CC="$CC -Wunused-result -Werror"
6942 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006943 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006944 $as_echo_n "(cached) " >&6
6945else
6946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6947/* end confdefs.h. */
6948
6949
6950int
6951main ()
6952{
6953
6954 ;
6955 return 0;
6956}
6957
6958_ACEOF
6959if ac_fn_c_try_compile "$LINENO"; then :
6960
6961 ac_cv_disable_unused_result_warning=yes
6962
6963else
6964
6965 ac_cv_disable_unused_result_warning=no
6966
6967fi
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6969fi
6970
6971 CFLAGS="$save_CFLAGS"
6972 CC="$ac_save_cc"
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6974$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006975 ;;
6976 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006977
6978 if test $ac_cv_disable_unused_result_warning = yes
6979 then
6980 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006981 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6982 fi
6983
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6985$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6986 ac_save_cc="$CC"
6987 CC="$CC -Wunused-parameter -Werror"
6988 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6989 $as_echo_n "(cached) " >&6
6990else
6991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6992/* end confdefs.h. */
6993
6994
6995int
6996main ()
6997{
6998
6999 ;
7000 return 0;
7001}
7002
7003_ACEOF
7004if ac_fn_c_try_compile "$LINENO"; then :
7005
7006 ac_cv_disable_unused_parameter_warning=yes
7007
7008else
7009
7010 ac_cv_disable_unused_parameter_warning=no
7011
7012fi
7013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7014fi
7015
7016 CC="$ac_save_cc"
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7018$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7019
7020 if test $ac_cv_disable_unused_parameter_warning = yes
7021 then
7022 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7023 fi
7024
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7026$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7027 ac_save_cc="$CC"
7028 CC="$CC -Wmissing-field-initializers -Werror"
7029 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7030 $as_echo_n "(cached) " >&6
7031else
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033/* end confdefs.h. */
7034
7035
7036int
7037main ()
7038{
7039
7040 ;
7041 return 0;
7042}
7043
7044_ACEOF
7045if ac_fn_c_try_compile "$LINENO"; then :
7046
7047 ac_cv_disable_missing_field_initializers=yes
7048
7049else
7050
7051 ac_cv_disable_missing_field_initializers=no
7052
7053fi
7054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055fi
7056
7057 CC="$ac_save_cc"
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7059$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7060
7061 if test $ac_cv_disable_missing_field_initializers = yes
7062 then
7063 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007064 fi
7065
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7067$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7068 ac_save_cc="$CC"
7069 CC="$CC -Wcast-function-type -Werror"
7070 if ${ac_cv_disable_cast_function_type+:} false; then :
7071 $as_echo_n "(cached) " >&6
7072else
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075
7076
7077int
7078main ()
7079{
7080
7081 ;
7082 return 0;
7083}
7084
7085_ACEOF
7086if ac_fn_c_try_compile "$LINENO"; then :
7087
7088 ac_cv_disable_cast_function_type=yes
7089
7090else
7091
7092 ac_cv_disable_cast_function_type=no
7093
7094fi
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097
7098 CC="$ac_save_cc"
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7100$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7101
7102 if test $ac_cv_disable_cast_function_type = yes
7103 then
7104 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7105 fi
7106
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7108$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Wsign-compare"
7111 save_CFLAGS="$CFLAGS"
7112 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118
7119int
7120main ()
7121{
7122
7123 ;
7124 return 0;
7125}
7126
7127_ACEOF
7128if ac_fn_c_try_compile "$LINENO"; then :
7129
7130 ac_cv_enable_sign_compare_warning=yes
7131
7132else
7133
7134 ac_cv_enable_sign_compare_warning=no
7135
7136fi
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138fi
7139
7140 CFLAGS="$save_CFLAGS"
7141 CC="$ac_save_cc"
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7143$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7144
7145 if test $ac_cv_enable_sign_compare_warning = yes
7146 then
7147 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7148 fi
7149
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7151$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7152 ac_save_cc="$CC"
7153 CC="$CC -Wunreachable-code"
7154 save_CFLAGS="$CFLAGS"
7155 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7156 $as_echo_n "(cached) " >&6
7157else
7158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7159/* end confdefs.h. */
7160
7161
7162int
7163main ()
7164{
7165
7166 ;
7167 return 0;
7168}
7169
7170_ACEOF
7171if ac_fn_c_try_compile "$LINENO"; then :
7172
7173 ac_cv_enable_unreachable_code_warning=yes
7174
7175else
7176
7177 ac_cv_enable_unreachable_code_warning=no
7178
7179fi
7180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7181fi
7182
7183 CFLAGS="$save_CFLAGS"
7184 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007185
7186 # Don't enable unreachable code warning in debug mode, since it usually
7187 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007188 # Issue #24324: Unfortunately, the unreachable code warning does not work
7189 # correctly on gcc and has been silently removed from the compiler.
7190 # It is supported on clang but on OS X systems gcc may be an alias
7191 # for clang. Try to determine if the compiler is not really gcc and,
7192 # if so, only then enable the warning.
7193 if test $ac_cv_enable_unreachable_code_warning = yes && \
7194 test "$Py_DEBUG" != "true" && \
7195 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007196 then
7197 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007198 else
7199 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007200 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7202$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007203
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7205$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7206 ac_save_cc="$CC"
7207 CC="$CC -Werror -Wstrict-prototypes"
7208 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7209 $as_echo_n "(cached) " >&6
7210else
7211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7212/* end confdefs.h. */
7213
7214
7215int
7216main ()
7217{
7218
7219 ;
7220 return 0;
7221}
7222
7223_ACEOF
7224if ac_fn_c_try_compile "$LINENO"; then :
7225
7226 ac_cv_enable_strict_prototypes_warning=yes
7227
7228else
7229
7230 ac_cv_enable_strict_prototypes_warning=no
7231
7232fi
7233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7234fi
7235
7236 CC="$ac_save_cc"
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7238$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7239
7240 if test $ac_cv_enable_strict_prototypes_warning = yes
7241 then
7242 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7243 fi
7244
Victor Stinner193ee0a2017-02-06 14:24:00 +01007245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7246$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7247 ac_save_cc="$CC"
7248 CC="$CC -Werror=implicit-function-declaration"
7249 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7250 $as_echo_n "(cached) " >&6
7251else
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253/* end confdefs.h. */
7254
7255
7256int
7257main ()
7258{
7259
7260 ;
7261 return 0;
7262}
7263
7264_ACEOF
7265if ac_fn_c_try_compile "$LINENO"; then :
7266
7267 ac_cv_enable_implicit_function_declaration_error=yes
7268
7269else
7270
7271 ac_cv_enable_implicit_function_declaration_error=no
7272
7273fi
7274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7275fi
7276
7277 CC="$ac_save_cc"
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7279$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7280
7281 if test $ac_cv_enable_implicit_function_declaration_error = yes
7282 then
7283 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7284 fi
7285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7287 # support. Without this, treatment of subnormals doesn't follow
7288 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007289 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 alpha*)
7291 BASECFLAGS="$BASECFLAGS -mieee"
7292 ;;
7293 esac
7294
7295 case $ac_sys_system in
7296 SCO_SV*)
7297 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7298 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007299
7300 # is there any other compiler on Darwin besides gcc?
7301 Darwin*)
7302 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7303 # used to be here, but non-Apple gcc doesn't accept them.
7304 if test "${CC}" = gcc
7305 then
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007307$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007308 case "${UNIVERSALSDK}" in
7309 */MacOSX10.4u.sdk)
7310 # Build using 10.4 SDK, force usage of gcc when the
7311 # compiler is gcc, otherwise the user will get very
7312 # confusing error messages when building on OSX 10.6
7313 CC=gcc-4.0
7314 CPP=cpp-4.0
7315 ;;
7316 esac
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007318$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007319 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320
Ned Deily87adb6e2013-10-18 21:09:56 -07007321 if test "${enable_universalsdk}"
7322 then
7323 case "$UNIVERSAL_ARCHS" in
7324 32-bit)
7325 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7326 LIPO_32BIT_FLAGS=""
7327 ARCH_RUN_32BIT=""
7328 ;;
7329 64-bit)
7330 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7331 LIPO_32BIT_FLAGS=""
7332 ARCH_RUN_32BIT="true"
7333 ;;
7334 all)
7335 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7336 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7337 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7338 ;;
7339 intel)
7340 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7341 LIPO_32BIT_FLAGS="-extract i386"
7342 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7343 ;;
7344 intel-32)
7345 UNIVERSAL_ARCH_FLAGS="-arch i386"
7346 LIPO_32BIT_FLAGS=""
7347 ARCH_RUN_32BIT=""
7348 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007349 intel-64)
7350 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7351 LIPO_32BIT_FLAGS=""
7352 ARCH_RUN_32BIT="true"
7353 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007354 3-way)
7355 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7356 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7357 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7358 ;;
7359 *)
7360 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7361 ;;
7362 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 if test "${UNIVERSALSDK}" != "/"
7365 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007366 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7367 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007368 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007369 else
7370 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7371 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 fi
7373 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374
Ned Deily87adb6e2013-10-18 21:09:56 -07007375 # Calculate an appropriate deployment target for this build:
7376 # The deployment target value is used explicitly to enable certain
7377 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007378 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007379 # component of the string returned by distutils.get_platform().
7380 #
7381 # Use the value from:
7382 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7383 # 2. the operating system version of the build machine if >= 10.6
7384 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7385 # below to pick either 10.3, 10.4, or 10.5 as the target.
7386 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387
Ned Deily87adb6e2013-10-18 21:09:56 -07007388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7389$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007390 cur_target_major=`sw_vers -productVersion | \
7391 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7392 cur_target_minor=`sw_vers -productVersion | \
7393 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7394 cur_target="${cur_target_major}.${cur_target_minor}"
7395 if test ${cur_target_major} -eq 10 && \
7396 test ${cur_target_minor} -ge 3 && \
7397 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007398 then
Ned Deily36820b62014-06-25 13:44:22 -07007399 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 cur_target=10.3
7401 if test ${enable_universalsdk}
7402 then
7403 case "$UNIVERSAL_ARCHS" in
7404 all|3-way|intel|64-bit)
7405 # These configurations were first supported in 10.5
7406 cur_target='10.5'
7407 ;;
7408 esac
7409 else
7410 if test `/usr/bin/arch` = "i386"
7411 then
7412 # 10.4 was the first release to support Intel archs
7413 cur_target="10.4"
7414 fi
7415 fi
7416 fi
7417 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7420 # environment with a value that is the same as what we'll use
7421 # in the Makefile to ensure that we'll get the same compiler
7422 # environment during configure and build time.
7423 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7424 export MACOSX_DEPLOYMENT_TARGET
7425 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7427$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007428
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 # end of Darwin* tests
7430 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431 esac
7432 ;;
7433
7434*)
7435 case $ac_sys_system in
7436 OpenUNIX*|UnixWare*)
7437 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7438 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439 SCO_SV*)
7440 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7441 ;;
7442 esac
7443 ;;
7444esac
7445
Zachary Ware5af85642015-12-21 12:09:17 -06007446# ICC needs -fp-model strict or floats behave badly
7447case "$CC" in
7448*icc*)
7449 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7450 ;;
7451esac
7452
T. Woutersddbfa2c2017-05-23 01:30:49 +02007453if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 :
7455else
7456 OPT="-DNDEBUG $OPT"
7457fi
7458
7459if test "$ac_arch_flags"
7460then
7461 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7462fi
7463
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464# On some compilers, pthreads are available without further options
7465# (e.g. MacOS X). On some of these systems, the compiler will not
7466# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7467# So we have to see first whether pthreads are available without
7468# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7470$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007471if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473else
Matthias Kloseb9621712010-04-24 17:59:49 +00007474 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475 ac_cv_pthread_is_default=no
7476else
Matthias Kloseb9621712010-04-24 17:59:49 +00007477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478/* end confdefs.h. */
7479
Stefan Krah7dba5942012-11-22 22:49:11 +01007480#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007481#include <pthread.h>
7482
7483void* routine(void* p){return NULL;}
7484
7485int main(){
7486 pthread_t p;
7487 if(pthread_create(&p,NULL,routine,NULL)!=0)
7488 return 1;
7489 (void)pthread_detach(p);
7490 return 0;
7491}
7492
7493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007494if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495
7496 ac_cv_pthread_is_default=yes
7497 ac_cv_kthread=no
7498 ac_cv_pthread=no
7499
7500else
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505fi
7506
7507
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508fi
7509
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7511$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512
7513
7514if test $ac_cv_pthread_is_default = yes
7515then
7516 ac_cv_kpthread=no
7517else
7518# -Kpthread, if available, provides the right #defines
7519# and linker options to make pthread_create available
7520# Some compilers won't report that they do not support -Kpthread,
7521# so we need to run a program to see whether it really made the
7522# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7524$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007525if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527else
7528 ac_save_cc="$CC"
7529CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007530if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531 ac_cv_kpthread=no
7532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534/* end confdefs.h. */
7535
Stefan Krah7dba5942012-11-22 22:49:11 +01007536#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537#include <pthread.h>
7538
7539void* routine(void* p){return NULL;}
7540
7541int main(){
7542 pthread_t p;
7543 if(pthread_create(&p,NULL,routine,NULL)!=0)
7544 return 1;
7545 (void)pthread_detach(p);
7546 return 0;
7547}
7548
7549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007550if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551 ac_cv_kpthread=yes
7552else
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
7558
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559CC="$ac_save_cc"
7560fi
7561
Matthias Kloseb9621712010-04-24 17:59:49 +00007562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7563$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
7565
7566if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7567then
7568# -Kthread, if available, provides the right #defines
7569# and linker options to make pthread_create available
7570# Some compilers won't report that they do not support -Kthread,
7571# so we need to run a program to see whether it really made the
7572# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7574$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007575if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577else
7578 ac_save_cc="$CC"
7579CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007580if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581 ac_cv_kthread=no
7582else
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584/* end confdefs.h. */
7585
Stefan Krah7dba5942012-11-22 22:49:11 +01007586#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587#include <pthread.h>
7588
7589void* routine(void* p){return NULL;}
7590
7591int main(){
7592 pthread_t p;
7593 if(pthread_create(&p,NULL,routine,NULL)!=0)
7594 return 1;
7595 (void)pthread_detach(p);
7596 return 0;
7597}
7598
7599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007600if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601 ac_cv_kthread=yes
7602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
7608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609CC="$ac_save_cc"
7610fi
7611
Matthias Kloseb9621712010-04-24 17:59:49 +00007612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7613$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
7615
7616if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7617then
7618# -pthread, if available, provides the right #defines
7619# and linker options to make pthread_create available
7620# Some compilers won't report that they do not support -pthread,
7621# so we need to run a program to see whether it really made the
7622# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7624$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007625if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627else
7628 ac_save_cc="$CC"
7629CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631 ac_cv_pthread=no
7632else
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
Stefan Krah7dba5942012-11-22 22:49:11 +01007636#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637#include <pthread.h>
7638
7639void* routine(void* p){return NULL;}
7640
7641int main(){
7642 pthread_t p;
7643 if(pthread_create(&p,NULL,routine,NULL)!=0)
7644 return 1;
7645 (void)pthread_detach(p);
7646 return 0;
7647}
7648
7649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007650if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651 ac_cv_pthread=yes
7652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657fi
7658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659CC="$ac_save_cc"
7660fi
7661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7663$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665
7666# If we have set a CC compiler flag for thread support then
7667# check if it works for CXX, too.
7668ac_cv_cxx_thread=no
7669if test ! -z "$CXX"
7670then
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7672$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673ac_save_cxx="$CXX"
7674
7675if test "$ac_cv_kpthread" = "yes"
7676then
7677 CXX="$CXX -Kpthread"
7678 ac_cv_cxx_thread=yes
7679elif test "$ac_cv_kthread" = "yes"
7680then
7681 CXX="$CXX -Kthread"
7682 ac_cv_cxx_thread=yes
7683elif test "$ac_cv_pthread" = "yes"
7684then
7685 CXX="$CXX -pthread"
7686 ac_cv_cxx_thread=yes
7687fi
7688
7689if test $ac_cv_cxx_thread = yes
7690then
7691 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7692 $CXX -c conftest.$ac_ext 2>&5
7693 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7694 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7695 then
7696 ac_cv_cxx_thread=yes
7697 else
7698 ac_cv_cxx_thread=no
7699 fi
7700 rm -fr conftest*
7701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7703$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704fi
7705CXX="$ac_save_cxx"
7706
7707
7708# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7710$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007711if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715/* end confdefs.h. */
7716#include <stdlib.h>
7717#include <stdarg.h>
7718#include <string.h>
7719#include <float.h>
7720
7721int
7722main ()
7723{
7724
7725 ;
7726 return 0;
7727}
7728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730 ac_cv_header_stdc=yes
7731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7735
7736if test $ac_cv_header_stdc = yes; then
7737 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739/* end confdefs.h. */
7740#include <string.h>
7741
7742_ACEOF
7743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 $EGREP "memchr" >/dev/null 2>&1; then :
7745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746else
7747 ac_cv_header_stdc=no
7748fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007749rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750
7751fi
7752
7753if test $ac_cv_header_stdc = yes; then
7754 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756/* end confdefs.h. */
7757#include <stdlib.h>
7758
7759_ACEOF
7760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 $EGREP "free" >/dev/null 2>&1; then :
7762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763else
7764 ac_cv_header_stdc=no
7765fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007766rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767
7768fi
7769
7770if test $ac_cv_header_stdc = yes; then
7771 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773 :
7774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776/* end confdefs.h. */
7777#include <ctype.h>
7778#include <stdlib.h>
7779#if ((' ' & 0x0FF) == 0x020)
7780# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7781# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7782#else
7783# define ISLOWER(c) \
7784 (('a' <= (c) && (c) <= 'i') \
7785 || ('j' <= (c) && (c) <= 'r') \
7786 || ('s' <= (c) && (c) <= 'z'))
7787# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7788#endif
7789
7790#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7791int
7792main ()
7793{
7794 int i;
7795 for (i = 0; i < 256; i++)
7796 if (XOR (islower (i), ISLOWER (i))
7797 || toupper (i) != TOUPPER (i))
7798 return 2;
7799 return 0;
7800}
7801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007802if ac_fn_c_try_run "$LINENO"; then :
7803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809fi
7810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811fi
7812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7814$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815if test $ac_cv_header_stdc = yes; then
7816
Matthias Kloseb9621712010-04-24 17:59:49 +00007817$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818
7819fi
7820
stratakise768c862018-01-23 16:11:24 +01007821for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007822fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007823ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007824sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007825unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007826poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007827sys/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 +01007828sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007829sys/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 +01007830sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007831sys/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 -07007832libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007833linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007834sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007835do :
7836 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7837ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007838if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007840#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
7842
7843fi
7844
Guido van Rossum627b2d71993-12-24 10:39:16 +00007845done
7846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007848for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7851$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857#include <sys/types.h>
7858#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007859
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
7862{
7863if ((DIR *) 0)
7864return 0;
7865 ;
7866 return 0;
7867}
7868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007876eval ac_res=\$$as_ac_Header
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7878$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007882_ACEOF
7883
7884ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007887done
7888# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7889if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7891$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007892if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007894else
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899/* Override any GCC internal prototype to avoid an error.
7900 Use char because int might match the return type of a GCC
7901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007902#ifdef __cplusplus
7903extern "C"
7904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007905char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007906int
7907main ()
7908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 ;
7911 return 0;
7912}
7913_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914for ac_lib in '' dir; do
7915 if test -z "$ac_lib"; then
7916 ac_res="none required"
7917 else
7918 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924rm -f core conftest.err conftest.$ac_objext \
7925 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007926 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929done
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932else
7933 ac_cv_search_opendir=no
7934fi
7935rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007936LIBS=$ac_func_search_save_LIBS
7937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7939$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007941if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
Michael W. Hudson54241132001-12-07 15:38:26 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7948$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007951else
7952 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956/* Override any GCC internal prototype to avoid an error.
7957 Use char because int might match the return type of a GCC
7958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959#ifdef __cplusplus
7960extern "C"
7961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007962char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ;
7968 return 0;
7969}
7970_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971for ac_lib in '' x; do
7972 if test -z "$ac_lib"; then
7973 ac_res="none required"
7974 else
7975 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981rm -f core conftest.err conftest.$ac_objext \
7982 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007983 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986done
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989else
7990 ac_cv_search_opendir=no
7991fi
7992rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007993LIBS=$ac_func_search_save_LIBS
7994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7996$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001fi
8002
8003fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008004
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8006$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008007if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008012#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008013int
8014main ()
8015{
8016return makedev(0, 0);
8017 ;
8018 return 0;
8019}
8020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008021if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008022 ac_cv_header_sys_types_h_makedev=yes
8023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026rm -f core conftest.err conftest.$ac_objext \
8027 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008028
8029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8031$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008032
8033if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008034ac_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 +02008035if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008038
8039fi
8040
8041
8042
8043 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 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 +02008045if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008046
Matthias Kloseb9621712010-04-24 17:59:49 +00008047$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008048
8049fi
8050
8051
8052 fi
8053fi
8054
Michael W. Hudson54241132001-12-07 15:38:26 +00008055
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008056# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8057# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8058SAVE_CFLAGS=$CFLAGS
8059CFLAGS="-std=c99 $CFLAGS"
8060for ac_header in bluetooth/bluetooth.h
8061do :
8062 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8063if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8064 cat >>confdefs.h <<_ACEOF
8065#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8066_ACEOF
8067
8068fi
8069
8070done
8071
8072CFLAGS=$SAVE_CFLAGS
8073
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008074# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8075for ac_header in net/if.h
8076do :
8077 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8078#ifdef STDC_HEADERS
8079# include <stdlib.h>
8080# include <stddef.h>
8081#else
8082# ifdef HAVE_STDLIB_H
8083# include <stdlib.h>
8084# endif
8085#endif
8086#ifdef HAVE_SYS_SOCKET_H
8087# include <sys/socket.h>
8088#endif
8089
8090"
Victor Stinnere0be4232011-10-25 13:06:09 +02008091if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008092 cat >>confdefs.h <<_ACEOF
8093#define HAVE_NET_IF_H 1
8094_ACEOF
8095
8096fi
8097
8098done
8099
8100
Martin v. Löwis11017b12006-01-14 18:12:57 +00008101# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008102for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008103do :
8104 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 +00008105#ifdef HAVE_ASM_TYPES_H
8106#include <asm/types.h>
8107#endif
8108#ifdef HAVE_SYS_SOCKET_H
8109#include <sys/socket.h>
8110#endif
8111
Matthias Kloseb9621712010-04-24 17:59:49 +00008112"
Victor Stinnere0be4232011-10-25 13:06:09 +02008113if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008114 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008115#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008116_ACEOF
8117
8118fi
8119
8120done
8121
8122
caaveryeffc12f2017-09-06 18:18:10 -04008123for ac_header in linux/vm_sockets.h
8124do :
8125 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8126#ifdef HAVE_SYS_SOCKET_H
8127#include <sys/socket.h>
8128#endif
8129
8130"
8131if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8132 cat >>confdefs.h <<_ACEOF
8133#define HAVE_LINUX_VM_SOCKETS_H 1
8134_ACEOF
8135
8136fi
8137
8138done
8139
8140
Charles-François Natali47413c12011-10-06 19:47:44 +02008141# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008142for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008143do :
8144 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8145ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8146#ifdef HAVE_SYS_SOCKET_H
8147#include <sys/socket.h>
8148#endif
8149
8150"
8151if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8152 cat >>confdefs.h <<_ACEOF
8153#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8154_ACEOF
8155
8156fi
8157
8158done
8159
8160
Guido van Rossum627b2d71993-12-24 10:39:16 +00008161# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008162was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8164$as_echo_n "checking for clock_t in time.h... " >&6; }
8165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008166/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
8169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008172 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008173else
Martin v. Löwis11437992002-04-12 09:54:03 +00008174
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008177
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008178
Guido van Rossum627b2d71993-12-24 10:39:16 +00008179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008180rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8183$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8186$as_echo_n "checking for makedev... " >&6; }
8187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008188/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008189
Jesus Cea740f53a2010-04-28 11:35:30 +00008190#if defined(MAJOR_IN_MKDEV)
8191#include <sys/mkdev.h>
8192#elif defined(MAJOR_IN_SYSMACROS)
8193#include <sys/sysmacros.h>
8194#else
8195#include <sys/types.h>
8196#endif
8197
Neal Norwitz11690112002-07-30 01:08:28 +00008198int
8199main ()
8200{
Jesus Cea740f53a2010-04-28 11:35:30 +00008201
8202 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008203 ;
8204 return 0;
8205}
Matthias Kloseb159a552010-04-25 21:00:44 +00008206
Neal Norwitz11690112002-07-30 01:08:28 +00008207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008208if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008209 ac_cv_has_makedev=yes
8210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213rm -f core conftest.err conftest.$ac_objext \
8214 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8216$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008217if test "$ac_cv_has_makedev" = "yes"; then
8218
Matthias Kloseb9621712010-04-24 17:59:49 +00008219$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008220
8221fi
8222
Christian Heimes985ecdc2013-11-20 11:46:18 +01008223# byte swapping
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8225$as_echo_n "checking for le64toh... " >&6; }
8226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227/* end confdefs.h. */
8228
8229#ifdef HAVE_ENDIAN_H
8230#include <endian.h>
8231#elif defined(HAVE_SYS_ENDIAN_H)
8232#include <sys/endian.h>
8233#endif
8234
8235int
8236main ()
8237{
8238
8239 le64toh(1)
8240 ;
8241 return 0;
8242}
8243
8244_ACEOF
8245if ac_fn_c_try_link "$LINENO"; then :
8246 ac_cv_has_le64toh=yes
8247else
8248 ac_cv_has_le64toh=no
8249fi
8250rm -f core conftest.err conftest.$ac_objext \
8251 conftest$ac_exeext conftest.$ac_ext
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8253$as_echo "$ac_cv_has_le64toh" >&6; }
8254if test "$ac_cv_has_le64toh" = "yes"; then
8255
8256$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8257
8258fi
8259
Martin v. Löwis399a6892002-10-04 10:22:02 +00008260use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008261# Don't use largefile support for GNU/Hurd
8262case $ac_sys_system in GNU*)
8263 use_lfs=no
8264esac
8265
Martin v. Löwis399a6892002-10-04 10:22:02 +00008266if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008267# Two defines needed to enable largefile support on various platforms
8268# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008269case $ac_sys_system/$ac_sys_release in
8270AIX*)
8271
8272$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8273
8274 ;;
8275esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279
Matthias Kloseb9621712010-04-24 17:59:49 +00008280$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008281
Martin v. Löwis399a6892002-10-04 10:22:02 +00008282fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008283
Guido van Rossum84e7b241996-08-19 21:59:00 +00008284# Add some code to confdefs.h so that the test for off_t works on SCO
8285cat >> confdefs.h <<\EOF
8286#if defined(SCO_DS)
8287#undef _OFF_T
8288#endif
8289EOF
8290
Guido van Rossumef2255b2000-03-10 22:30:29 +00008291# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008292ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
8297cat >>confdefs.h <<_ACEOF
8298#define mode_t int
8299_ACEOF
8300
8301fi
8302
Matthias Kloseb9621712010-04-24 17:59:49 +00008303ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008304if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008306else
Martin v. Löwis11437992002-04-12 09:54:03 +00008307
8308cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008310_ACEOF
8311
8312fi
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319cat >>confdefs.h <<_ACEOF
8320#define pid_t int
8321_ACEOF
8322
8323fi
8324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008325
Martin v. Löwis11437992002-04-12 09:54:03 +00008326cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008327#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008331if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008332
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008333else
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008337_ACEOF
8338
8339fi
8340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8342$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008343if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008345else
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008347/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008348#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008353 ac_cv_type_uid_t=yes
8354else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008355 ac_cv_type_uid_t=no
8356fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008357rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8361$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008362if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008365
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008368
8369fi
8370
Mark Dickinson983bc162012-12-02 12:11:38 +00008371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008373if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008376
8377fi
8378
Stefan Krah1919b7e2012-03-21 18:25:23 +01008379ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8380if test "x$ac_cv_type___uint128_t" = xyes; then :
8381
8382$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8383
8384fi
8385
Jack Jansendd19cf82001-12-06 22:36:17 +00008386
Michael W. Hudson54241132001-12-07 15:38:26 +00008387# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008388# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389# The cast to long int works around a bug in the HP C Compiler
8390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8394$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 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 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_int" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406 else
8407 ac_cv_sizeof_int=0
8408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8413$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414
8415
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008418#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008420
8421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422# The cast to long int works around a bug in the HP C Compiler
8423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8425# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8427$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008428if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 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 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433else
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 if test "$ac_cv_type_long" = yes; then
8435 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008437as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008438See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439 else
8440 ac_cv_sizeof_long=0
8441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8446$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447
8448
8449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008451#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008452_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008453
8454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455# The cast to long int works around a bug in the HP C Compiler
8456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8458# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8460$as_echo_n "checking size of long long... " >&6; }
8461if ${ac_cv_sizeof_long_long+:} false; then :
8462 $as_echo_n "(cached) " >&6
8463else
8464 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8465
8466else
8467 if test "$ac_cv_type_long_long" = yes; then
8468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8470as_fn_error 77 "cannot compute sizeof (long long)
8471See \`config.log' for more details" "$LINENO" 5; }
8472 else
8473 ac_cv_sizeof_long_long=0
8474 fi
8475fi
8476
8477fi
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8479$as_echo "$ac_cv_sizeof_long_long" >&6; }
8480
8481
8482
8483cat >>confdefs.h <<_ACEOF
8484#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8485_ACEOF
8486
8487
8488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8493$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_void_p" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 else
8506 ac_cv_sizeof_void_p=0
8507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8512$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514
8515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008517#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008519
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521# The cast to long int works around a bug in the HP C Compiler
8522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8524# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8526$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 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 +00008531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532else
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 if test "$ac_cv_type_short" = yes; then
8534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008536as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008537See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538 else
8539 ac_cv_sizeof_short=0
8540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8545$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546
8547
8548
Martin v. Löwis11437992002-04-12 09:54:03 +00008549cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008550#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008551_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552
8553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554# The cast to long int works around a bug in the HP C Compiler
8555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8559$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008560if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 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 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 if test "$ac_cv_type_float" = yes; then
8567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008569as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008570See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 else
8572 ac_cv_sizeof_float=0
8573 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8578$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579
8580
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008583#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008584_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008585
8586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8592$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 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 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_double" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 else
8605 ac_cv_sizeof_double=0
8606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8611$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612
8613
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008616#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008618
8619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620# The cast to long int works around a bug in the HP C Compiler
8621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8625$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008626if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008628else
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 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 +00008630
Martin v. Löwis11437992002-04-12 09:54:03 +00008631else
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 if test "$ac_cv_type_fpos_t" = yes; then
8633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008635as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637 else
8638 ac_cv_sizeof_fpos_t=0
8639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8644$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645
8646
8647
Martin v. Löwis11437992002-04-12 09:54:03 +00008648cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008649#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008650_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008651
Michael W. Hudson54241132001-12-07 15:38:26 +00008652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653# The cast to long int works around a bug in the HP C Compiler
8654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8658$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008659if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 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 +00008663
Martin v. Löwis18e16552006-02-15 17:27:45 +00008664else
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 if test "$ac_cv_type_size_t" = yes; then
8666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008668as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 else
8671 ac_cv_sizeof_size_t=0
8672 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674
Martin v. Löwis18e16552006-02-15 17:27:45 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8677$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678
8679
8680
Martin v. Löwis18e16552006-02-15 17:27:45 +00008681cat >>confdefs.h <<_ACEOF
8682#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8683_ACEOF
8684
8685
Christian Heimes400adb02008-02-01 08:12:03 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8691$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Christian Heimes400adb02008-02-01 08:12:03 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type_pid_t" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008703 else
8704 ac_cv_sizeof_pid_t=0
8705 fi
8706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Christian Heimes400adb02008-02-01 08:12:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8710$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008711
8712
8713
8714cat >>confdefs.h <<_ACEOF
8715#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8716_ACEOF
8717
8718
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8724$as_echo_n "checking size of uintptr_t... " >&6; }
8725if ${ac_cv_sizeof_uintptr_t+:} false; then :
8726 $as_echo_n "(cached) " >&6
8727else
8728 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8729
8730else
8731 if test "$ac_cv_type_uintptr_t" = yes; then
8732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8734as_fn_error 77 "cannot compute sizeof (uintptr_t)
8735See \`config.log' for more details" "$LINENO" 5; }
8736 else
8737 ac_cv_sizeof_uintptr_t=0
8738 fi
8739fi
8740
8741fi
8742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8743$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8744
8745
8746
8747cat >>confdefs.h <<_ACEOF
8748#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8749_ACEOF
8750
8751
Michael W. Hudson54241132001-12-07 15:38:26 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8754$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008755have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008757/* end confdefs.h. */
8758
8759int
8760main ()
8761{
8762long double x; x = (long double)0;
8763 ;
8764 return 0;
8765}
8766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008767if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768
8769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008771
8772 have_long_double=yes
8773
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008774fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8777$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779# The cast to long int works around a bug in the HP C Compiler
8780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8782# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8784$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008785if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 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 +00008789
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 if test "$ac_cv_type_long_double" = yes; then
8792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008794as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008795See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796 else
8797 ac_cv_sizeof_long_double=0
8798 fi
8799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8803$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008804
8805
8806
8807cat >>confdefs.h <<_ACEOF
8808#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8809_ACEOF
8810
8811
8812fi
8813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008814# The cast to long int works around a bug in the HP C Compiler
8815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8817# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8819$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008820if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 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 +00008824
Thomas Woutersb2137042007-02-01 18:02:27 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if test "$ac_cv_type__Bool" = yes; then
8827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008829as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008830See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 else
8832 ac_cv_sizeof__Bool=0
8833 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835
Thomas Woutersb2137042007-02-01 18:02:27 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8838$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008839
8840
8841
Thomas Woutersb2137042007-02-01 18:02:27 +00008842cat >>confdefs.h <<_ACEOF
8843#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8844_ACEOF
8845
8846
Thomas Woutersb2137042007-02-01 18:02:27 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848# The cast to long int works around a bug in the HP C Compiler
8849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8853$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858#ifdef HAVE_SYS_TYPES_H
8859#include <sys/types.h>
8860#endif
8861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 if test "$ac_cv_type_off_t" = yes; then
8866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008868as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008869See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870 else
8871 ac_cv_sizeof_off_t=0
8872 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8877$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008879
8880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008882#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008883_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008884
Michael W. Hudson54241132001-12-07 15:38:26 +00008885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8888$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008889if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008890 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8895$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008896else
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899fi
8900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901# The cast to long int works around a bug in the HP C Compiler
8902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8904# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8906$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008907if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911#ifdef HAVE_SYS_TYPES_H
8912#include <sys/types.h>
8913#endif
8914#ifdef HAVE_TIME_H
8915#include <time.h>
8916#endif
8917
Matthias Kloseb9621712010-04-24 17:59:49 +00008918"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920else
Matthias Kloseb9621712010-04-24 17:59:49 +00008921 if test "$ac_cv_type_time_t" = yes; then
8922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008924as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008925See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926 else
8927 ac_cv_sizeof_time_t=0
8928 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008930
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8933$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008934
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008935
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008938#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008940
Michael W. Hudson54241132001-12-07 15:38:26 +00008941
8942
Trent Mick635f6fb2000-08-23 21:33:05 +00008943# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008944ac_save_cc="$CC"
8945if test "$ac_cv_kpthread" = "yes"
8946then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008947elif test "$ac_cv_kthread" = "yes"
8948then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008949elif test "$ac_cv_pthread" = "yes"
8950then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008951fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8954$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008955have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008958
8959 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Guido van Rossum12580492000-09-24 16:47:19 +00008963pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ;
8965 return 0;
8966}
Matthias Kloseb159a552010-04-25 21:00:44 +00008967
Martin v. Löwis11437992002-04-12 09:54:03 +00008968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008969if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008970 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8974$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008975if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8981$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008982if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986#ifdef HAVE_PTHREAD_H
8987#include <pthread.h>
8988#endif
8989
Matthias Kloseb9621712010-04-24 17:59:49 +00008990"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 if test "$ac_cv_type_pthread_t" = yes; then
8994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008996as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008997See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998 else
8999 ac_cv_sizeof_pthread_t=0
9000 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002
Trent Mick635f6fb2000-08-23 21:33:05 +00009003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9005$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009006
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007
9008
Martin v. Löwis11437992002-04-12 09:54:03 +00009009cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009010#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009012
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013
Trent Mick635f6fb2000-08-23 21:33:05 +00009014fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009015
9016# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9017# This checking will be unnecessary after removing deprecated TLS API.
9018# The cast to long int works around a bug in the HP C Compiler
9019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9021# This bug is HP SR number 8606223364.
9022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9023$as_echo_n "checking size of pthread_key_t... " >&6; }
9024if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9025 $as_echo_n "(cached) " >&6
9026else
9027 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9028"; then :
9029
9030else
9031 if test "$ac_cv_type_pthread_key_t" = yes; then
9032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9034as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9035See \`config.log' for more details" "$LINENO" 5; }
9036 else
9037 ac_cv_sizeof_pthread_key_t=0
9038 fi
9039fi
9040
9041fi
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9043$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9044
9045
9046
9047cat >>confdefs.h <<_ACEOF
9048#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9049_ACEOF
9050
9051
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9053$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9054if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9056/* end confdefs.h. */
9057#include <pthread.h>
9058int
9059main ()
9060{
9061pthread_key_t k; k * 1;
9062 ;
9063 return 0;
9064}
9065_ACEOF
9066if ac_fn_c_try_compile "$LINENO"; then :
9067 ac_pthread_key_t_is_arithmetic_type=yes
9068else
9069 ac_pthread_key_t_is_arithmetic_type=no
9070
9071fi
9072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9074$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9075 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9076
9077$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9078
9079 fi
9080else
9081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082$as_echo "no" >&6; }
9083fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009084CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009085
Michael W. Hudson54241132001-12-07 15:38:26 +00009086
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009087case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009088 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009089 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9090 ;;
9091 Darwin/*)
9092 OTHER_LIBTOOL_OPT=""
9093 ;;
9094esac
9095
9096
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009097
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009098case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009099 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009100 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9101 if test "${enable_universalsdk}"; then
9102 :
9103 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009104 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009105 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009106 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009107 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009108 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009109 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009110 if test ${gcc_version} '<' 4.0
9111 then
9112 LIBTOOL_CRUFT="-lcc_dynamic"
9113 else
9114 LIBTOOL_CRUFT=""
9115 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009117 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009118else
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009120/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009121
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009122 #include <unistd.h>
9123 int main(int argc, char*argv[])
9124 {
9125 if (sizeof(long) == 4) {
9126 return 0;
9127 } else {
9128 return 1;
9129 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009130 }
9131
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009133if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009134 ac_osx_32bit=yes
9135else
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009140fi
9141
9142
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009143 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009144 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009145 i386)
9146 MACOSX_DEFAULT_ARCH="i386"
9147 ;;
9148 ppc)
9149 MACOSX_DEFAULT_ARCH="ppc"
9150 ;;
9151 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009152 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009153 ;;
9154 esac
9155 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009156 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009157 i386)
9158 MACOSX_DEFAULT_ARCH="x86_64"
9159 ;;
9160 ppc)
9161 MACOSX_DEFAULT_ARCH="ppc64"
9162 ;;
9163 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009164 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009165 ;;
9166 esac
9167
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009168 fi
9169
9170 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009171 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009172 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009173esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9175$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009176if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009177then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009178 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009180 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009183
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9185$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009186 if test $enable_shared = "yes"
9187 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009188 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 +00009189 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009190else
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009193fi
9194
Matthias Kloseb9621712010-04-24 17:59:49 +00009195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9196$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009197case $ac_sys_system/$ac_sys_release in
9198 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199
Matthias Kloseb9621712010-04-24 17:59:49 +00009200$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9203$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009204 ;;
9205 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009208 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009209esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009210
Guido van Rossum0a516c91994-09-12 10:58:40 +00009211# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009212
Michael W. Hudson54241132001-12-07 15:38:26 +00009213
9214
9215
9216
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217
Thomas Wouters477c8d52006-05-27 19:21:47 +00009218
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009219# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9220# -- usually .so, .sl on HP-UX, .dll on Cygwin
9221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9222$as_echo_n "checking the extension of shared libraries... " >&6; }
9223if test -z "$SHLIB_SUFFIX"; then
9224 case $ac_sys_system in
9225 hp*|HP*)
9226 case `uname -m` in
9227 ia64) SHLIB_SUFFIX=.so;;
9228 *) SHLIB_SUFFIX=.sl;;
9229 esac
9230 ;;
9231 CYGWIN*) SHLIB_SUFFIX=.dll;;
9232 *) SHLIB_SUFFIX=.so;;
9233 esac
9234fi
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9236$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009237
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009239# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009240# (Shared libraries in this instance are shared modules to be loaded into
9241# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9243$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009244if test -z "$LDSHARED"
9245then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009246 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009247 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009248 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009249 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009250 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 if test "$GCC" = "yes" ; then
9253 LDSHARED='$(CC) -shared'
9254 LDCXXSHARED='$(CXX) -shared'
9255 else
9256 LDSHARED='$(CC) -G'
9257 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009258 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009259 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009260 if test "$GCC" = "yes" ; then
9261 LDSHARED='$(CC) -shared'
9262 LDCXXSHARED='$(CXX) -shared'
9263 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009264 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009265 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009266 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009267 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009268 LDSHARED='$(CC) -bundle'
9269 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009270 if test "$enable_framework" ; then
9271 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009272 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9273 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009274 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009275 else
9276 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009277 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009278 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009279 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009280 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009281 LDSHARED='$(CC) -bundle'
9282 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009283 if test "$enable_framework" ; then
9284 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009285 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9286 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009287 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009288 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009289 # No framework, use the Python app as bundle-loader
9290 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009291 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009292 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009294 Darwin/*)
9295 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9296 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009297
Ned Deily36820b62014-06-25 13:44:22 -07009298 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9299 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9300 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9301 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9302 if test ${dep_target_major} -eq 10 && \
9303 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009304 then
Ned Deily36820b62014-06-25 13:44:22 -07009305 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009306 LDSHARED='$(CC) -bundle'
9307 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009308 if test "$enable_framework" ; then
9309 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009310 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9311 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009312 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009313 else
9314 # No framework, use the Python app as bundle-loader
9315 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9316 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009317 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009318 fi
Ned Deily36820b62014-06-25 13:44:22 -07009319 else
9320 # building for OS X 10.3 and later
9321 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9322 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9323 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009324 fi
9325 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009326 Linux*|GNU*|QNX*)
9327 LDSHARED='$(CC) -shared'
9328 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009329 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009330 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009331 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009332 LDSHARED='$(CC) -shared'
9333 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009334 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009335 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009336 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009337 OpenBSD*)
9338 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9339 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009340 LDSHARED='$(CC) -shared $(CCSHARED)'
9341 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009342 else
9343 case `uname -r` in
9344 [01].* | 2.[0-7] | 2.[0-7].*)
9345 LDSHARED="ld -Bshareable ${LDFLAGS}"
9346 ;;
9347 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009348 LDSHARED='$(CC) -shared $(CCSHARED)'
9349 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009350 ;;
9351 esac
9352 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009353 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009354 LDSHARED='$(CC) -shared'
9355 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009356 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009357 if test "$GCC" = "yes" ; then
9358 LDSHARED='$(CC) -shared'
9359 LDCXXSHARED='$(CXX) -shared'
9360 else
9361 LDSHARED='$(CC) -G'
9362 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009363 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364 SCO_SV*)
9365 LDSHARED='$(CC) -Wl,-G,-Bexport'
9366 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9367 CYGWIN*)
9368 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9369 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009370 *) LDSHARED="ld";;
9371 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9374$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009375LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009377# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009378# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9380$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009381if test -z "$CCSHARED"
9382then
Guido van Rossum07397971997-04-29 21:49:50 +00009383 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009384 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009385 then CCSHARED="-fPIC";
9386 elif test `uname -p` = sparc;
9387 then CCSHARED="-xcode=pic32";
9388 else CCSHARED="-Kpic";
9389 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009390 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009391 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009392 else CCSHARED="+z";
9393 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009394 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009395 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009396 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009397 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009398 if test "$GCC" = "yes"
9399 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009400 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009401 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009402 SCO_SV*)
9403 if test "$GCC" = "yes"
9404 then CCSHARED="-fPIC"
9405 else CCSHARED="-Kpic -belf"
9406 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9410$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009412# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9414$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009415if test -z "$LINKFORSHARED"
9416then
Guido van Rossum07397971997-04-29 21:49:50 +00009417 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009418 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009419 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009420 LINKFORSHARED="-Wl,-E -Wl,+s";;
9421# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009422 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009423 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009424 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009426 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009427
9428 # Issue #18075: the default maximum stack size (8MBytes) is too
9429 # small for the default recursion limit. Increase the stack size
9430 # to ensure that tests don't crash
9431 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9432
Jack Jansene578a632001-08-15 01:27:14 +00009433 if test "$enable_framework"
9434 then
Jack Jansenda49e192005-01-07 13:08:22 +00009435 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009436 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009437 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009438 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009439 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009440 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009441 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009442 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9443 then
9444 LINKFORSHARED="-Wl,--export-dynamic"
9445 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009446 SunOS/5*) case $CC in
9447 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009448 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009449 then
9450 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009451 fi;;
9452 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009453 CYGWIN*)
9454 if test $enable_shared = "no"
9455 then
9456 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9457 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009458 QNX*)
9459 # -Wl,-E causes the symbols to be added to the dynamic
9460 # symbol table so that they can be found when a module
9461 # is loaded. -N 2048K causes the stack size to be set
9462 # to 2048 kilobytes so that the stack doesn't overflow
9463 # when running test_compile.py.
9464 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009465 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9468$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009469
Michael W. Hudson54241132001-12-07 15:38:26 +00009470
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9473$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009474if test ! "$LIBRARY" = "$LDLIBRARY"
9475then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009476 case $ac_sys_system in
9477 CYGWIN*)
9478 # Cygwin needs CCSHARED when building extension DLLs
9479 # but not when building the interpreter DLL.
9480 CFLAGSFORSHARED='';;
9481 *)
9482 CFLAGSFORSHARED='$(CCSHARED)'
9483 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9486$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009487
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009488# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9489# library (with --enable-shared).
9490# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009491# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9492# if it is not required, since it creates a dependency of the shared library
9493# to LIBS. This, in turn, means that applications linking the shared libpython
9494# don't need to link LIBS explicitly. The default should be only changed
9495# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9498$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009499case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009500 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009501 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009502esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9504$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009505
9506
Guido van Rossum627b2d71993-12-24 10:39:16 +00009507# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9509$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009511 $as_echo_n "(cached) " >&6
9512else
9513 ac_check_lib_save_LIBS=$LIBS
9514LIBS="-lsendfile $LIBS"
9515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9516/* end confdefs.h. */
9517
9518/* 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. */
9521#ifdef __cplusplus
9522extern "C"
9523#endif
9524char sendfile ();
9525int
9526main ()
9527{
9528return sendfile ();
9529 ;
9530 return 0;
9531}
9532_ACEOF
9533if ac_fn_c_try_link "$LINENO"; then :
9534 ac_cv_lib_sendfile_sendfile=yes
9535else
9536 ac_cv_lib_sendfile_sendfile=no
9537fi
9538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
9540LIBS=$ac_check_lib_save_LIBS
9541fi
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9543$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_LIBSENDFILE 1
9547_ACEOF
9548
9549 LIBS="-lsendfile $LIBS"
9550
9551fi
9552
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9554$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009557else
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009559LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563/* Override any GCC internal prototype to avoid an error.
9564 Use char because int might match the return type of a GCC
9565 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566#ifdef __cplusplus
9567extern "C"
9568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009569char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009570int
9571main ()
9572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 ;
9575 return 0;
9576}
9577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580else
Matthias Kloseb9621712010-04-24 17:59:49 +00009581 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583rm -f core conftest.err conftest.$ac_objext \
9584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009585LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9588$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009589if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 cat >>confdefs.h <<_ACEOF
9591#define HAVE_LIBDL 1
9592_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009593
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009594 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009596fi
9597 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9599$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009602else
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009604LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608/* Override any GCC internal prototype to avoid an error.
9609 Use char because int might match the return type of a GCC
9610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611#ifdef __cplusplus
9612extern "C"
9613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009614char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009615int
9616main ()
9617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625else
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9633$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 cat >>confdefs.h <<_ACEOF
9636#define HAVE_LIBDLD 1
9637_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009638
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009639 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009641fi
9642 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009643
Michael Felt0d3ccb42017-12-30 22:39:20 +01009644# checks for uuid.h location
9645for ac_header in uuid/uuid.h uuid.h
9646do :
9647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9648ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9649if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9650 cat >>confdefs.h <<_ACEOF
9651#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9652_ACEOF
9653
9654fi
9655
9656done
9657
9658
Berker Peksag9a10ff42017-11-08 23:09:16 +03009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9660$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9662/* end confdefs.h. */
9663#include <uuid/uuid.h>
9664int
9665main ()
9666{
9667
9668#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009669void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009670#endif
9671
9672 ;
9673 return 0;
9674}
9675_ACEOF
9676if ac_fn_c_try_compile "$LINENO"; then :
9677
9678$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9679
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9681$as_echo "yes" >&6; }
9682else
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685
9686fi
9687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9688
Michael Felt0d3ccb42017-12-30 22:39:20 +01009689# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009690# FreeBSD and OpenBSD provides support as well
9691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9692$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694/* end confdefs.h. */
9695#include <uuid.h>
9696int
9697main ()
9698{
9699
9700#ifndef uuid_create
9701void *x = uuid_create
9702#endif
9703
9704 ;
9705 return 0;
9706}
9707_ACEOF
9708if ac_fn_c_try_compile "$LINENO"; then :
9709
9710$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9711
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9713$as_echo "yes" >&6; }
9714else
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717
9718fi
9719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9720
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009721# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9722# stream in big-endian byte-order
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9724$as_echo_n "checking for uuid_enc_be... " >&6; }
9725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9726/* end confdefs.h. */
9727#include <uuid.h>
9728int
9729main ()
9730{
9731
9732#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009733void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009734#endif
9735
9736 ;
9737 return 0;
9738}
9739_ACEOF
9740if ac_fn_c_try_compile "$LINENO"; then :
9741
9742$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9743
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9745$as_echo "yes" >&6; }
9746else
9747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
9749
9750fi
9751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9752
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009753# 'Real Time' functions on Solaris
9754# posix4 on Solaris 2.6
9755# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009757$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009760else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009761 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765/* Override any GCC internal prototype to avoid an error.
9766 Use char because int might match the return type of a GCC
9767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009768#ifdef __cplusplus
9769extern "C"
9770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009771char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ;
9777 return 0;
9778}
9779_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780for ac_lib in '' pthread rt posix4; do
9781 if test -z "$ac_lib"; then
9782 ac_res="none required"
9783 else
9784 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009785 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790rm -f core conftest.err conftest.$ac_objext \
9791 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009792 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795done
Victor Stinnere0be4232011-10-25 13:06:09 +02009796if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798else
9799 ac_cv_search_sem_init=no
9800fi
9801rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009802LIBS=$ac_func_search_save_LIBS
9803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9805$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009807if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009809
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009810fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009811
Martin v. Löwis519adae2003-09-20 10:47:47 +00009812
Martin v. Löwis19d17342003-06-14 21:03:05 +00009813# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9815$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009816if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009818else
9819 ac_check_lib_save_LIBS=$LIBS
9820LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824/* Override any GCC internal prototype to avoid an error.
9825 Use char because int might match the return type of a GCC
9826 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009827#ifdef __cplusplus
9828extern "C"
9829#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009830char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831int
9832main ()
9833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009835 ;
9836 return 0;
9837}
9838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009840 ac_cv_lib_intl_textdomain=yes
9841else
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009844rm -f core conftest.err conftest.$ac_objext \
9845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009846LIBS=$ac_check_lib_save_LIBS
9847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9849$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009850if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009851
Matthias Kloseb9621712010-04-24 17:59:49 +00009852$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009853
Brett Cannonc6d936e2009-06-07 20:09:53 +00009854 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009855fi
9856
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009857
9858# checks for system dependent C++ extensions support
9859case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9861$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009864
Georg Brandl59e87bd2011-02-15 19:48:59 +00009865 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009869loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
Matthias Kloseb159a552010-04-25 21:00:44 +00009873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009875if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009876
Matthias Kloseb159a552010-04-25 21:00:44 +00009877
Matthias Kloseb9621712010-04-24 17:59:49 +00009878$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
Matthias Kloseb159a552010-04-25 21:00:44 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009881$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009882
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883else
Matthias Kloseb159a552010-04-25 21:00:44 +00009884
9885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009886$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009887
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889rm -f core conftest.err conftest.$ac_objext \
9890 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009891 *) ;;
9892esac
9893
Christian Heimes985ecdc2013-11-20 11:46:18 +01009894# check for systems that require aligned memory access
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9896$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009897if ${ac_cv_aligned_required+:} false; then :
9898 $as_echo_n "(cached) " >&6
9899else
9900 if test "$cross_compiling" = yes; then :
9901 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009902else
9903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904/* end confdefs.h. */
9905
9906int main()
9907{
9908 char s[16];
9909 int i, *p1, *p2;
9910 for (i=0; i < 16; i++)
9911 s[i] = i;
9912 p1 = (int*)(s+1);
9913 p2 = (int*)(s+2);
9914 if (*p1 == *p2)
9915 return 1;
9916 return 0;
9917}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009918_ACEOF
9919if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009920 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009921else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009922 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009923fi
9924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9925 conftest.$ac_objext conftest.beam conftest.$ac_ext
9926fi
9927
9928
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009929fi
9930
9931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9932$as_echo "$ac_cv_aligned_required" >&6; }
9933if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009934
9935$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9936
9937fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009938
9939# str, bytes and memoryview hash algorithm
9940
9941
9942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9943$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9944
9945# Check whether --with-hash_algorithm was given.
9946if test "${with_hash_algorithm+set}" = set; then :
9947 withval=$with_hash_algorithm;
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9949$as_echo "$withval" >&6; }
9950case "$withval" in
9951 siphash24)
9952 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9953
9954 ;;
9955 fnv)
9956 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9957
9958 ;;
9959 *)
9960 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9961 ;;
9962esac
9963
9964else
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9966$as_echo "default" >&6; }
9967fi
9968
9969
Charles-François Natalid30b0222014-05-08 23:08:51 +01009970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9971$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9972
9973# Check whether --with-address_sanitizer was given.
9974if test "${with_address_sanitizer+set}" = set; then :
9975 withval=$with_address_sanitizer;
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9977$as_echo "$withval" >&6; }
9978BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9979LDFLAGS="-fsanitize=address $LDFLAGS"
9980
9981else
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
Guido van Rossum70c7f481998-03-26 18:44:10 +00009987# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9989$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009990if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009992else
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009994LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009998/* Override any GCC internal prototype to avoid an error.
9999 Use char because int might match the return type of a GCC
10000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010001#ifdef __cplusplus
10002extern "C"
10003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010004char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010005int
10006main ()
10007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ;
10010 return 0;
10011}
10012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010015else
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018rm -f core conftest.err conftest.$ac_objext \
10019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010020LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10023$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010024if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010025 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010026fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010027 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10029$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010030if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010032else
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010034LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038/* Override any GCC internal prototype to avoid an error.
10039 Use char because int might match the return type of a GCC
10040 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010041#ifdef __cplusplus
10042extern "C"
10043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010044char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ;
10050 return 0;
10051}
10052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010055else
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010060LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10063$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010064if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010065 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010066fi
10067 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10070$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010073if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10076$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010077LIBS="$withval $LIBS"
10078
10079else
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010082fi
10083
Guido van Rossum7f43da71994-08-01 12:15:30 +000010084
Victor Stinner8291b5e2015-03-20 16:03:14 +010010085
10086
10087
10088
10089
10090
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010091
Victor Stinner8291b5e2015-03-20 16:03:14 +010010092if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10093 if test -n "$ac_tool_prefix"; then
10094 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10095set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_PKG_CONFIG+:} false; then :
10099 $as_echo_n "(cached) " >&6
10100else
10101 case $PKG_CONFIG in
10102 [\\/]* | ?:[\\/]*)
10103 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10104 ;;
10105 *)
10106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109 IFS=$as_save_IFS
10110 test -z "$as_dir" && as_dir=.
10111 for ac_exec_ext in '' $ac_executable_extensions; do
10112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115 break 2
10116 fi
10117done
10118 done
10119IFS=$as_save_IFS
10120
10121 ;;
10122esac
10123fi
10124PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10125if test -n "$PKG_CONFIG"; then
10126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10127$as_echo "$PKG_CONFIG" >&6; }
10128else
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134fi
10135if test -z "$ac_cv_path_PKG_CONFIG"; then
10136 ac_pt_PKG_CONFIG=$PKG_CONFIG
10137 # Extract the first word of "pkg-config", so it can be a program name with args.
10138set dummy pkg-config; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10142 $as_echo_n "(cached) " >&6
10143else
10144 case $ac_pt_PKG_CONFIG in
10145 [\\/]* | ?:[\\/]*)
10146 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10147 ;;
10148 *)
10149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152 IFS=$as_save_IFS
10153 test -z "$as_dir" && as_dir=.
10154 for ac_exec_ext in '' $ac_executable_extensions; do
10155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158 break 2
10159 fi
10160done
10161 done
10162IFS=$as_save_IFS
10163
10164 ;;
10165esac
10166fi
10167ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10168if test -n "$ac_pt_PKG_CONFIG"; then
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10170$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10171else
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176 if test "x$ac_pt_PKG_CONFIG" = x; then
10177 PKG_CONFIG=""
10178 else
10179 case $cross_compiling:$ac_tool_warned in
10180yes:)
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10183ac_tool_warned=yes ;;
10184esac
10185 PKG_CONFIG=$ac_pt_PKG_CONFIG
10186 fi
10187else
10188 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10189fi
10190
10191fi
10192if test -n "$PKG_CONFIG"; then
10193 _pkg_min_version=0.9.0
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10195$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10196 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10198$as_echo "yes" >&6; }
10199 else
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10201$as_echo "no" >&6; }
10202 PKG_CONFIG=""
10203 fi
10204fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010205
10206# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10208$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010209
10210# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010212 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010213else
10214 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010215fi
10216
10217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10219$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010220
10221# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10223$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010224
10225# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010227 withval=$with_system_ffi;
10228fi
10229
10230
Zachary Waref40d4dd2016-09-17 01:25:24 -050010231if test "$ac_sys_system" = "Darwin"
10232then
10233 case "$with_system_ffi" in
10234 "")
10235 with_system_ffi="no"
10236 ;;
10237 yes|no)
10238 ;;
10239 *)
10240 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10241 ;;
10242 esac
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10244$as_echo "$with_system_ffi" >&6; }
10245else
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10247$as_echo "yes" >&6; }
10248 if test "$with_system_ffi" != ""
10249 then
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10251$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10252 fi
10253 with_system_ffi="yes"
10254fi
Zachary Ware935043d2016-09-09 17:01:21 -070010255
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010256if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010257 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10258else
10259 LIBFFI_INCLUDEDIR=""
10260fi
10261
10262
Stefan Krah60187b52012-03-23 19:06:27 +010010263# Check for use of the system libmpdec library
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10265$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10266
10267# Check whether --with-system_libmpdec was given.
10268if test "${with_system_libmpdec+set}" = set; then :
10269 withval=$with_system_libmpdec;
10270else
10271 with_system_libmpdec="no"
10272fi
10273
10274
10275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10276$as_echo "$with_system_libmpdec" >&6; }
10277
Benjamin Peterson076ed002010-10-31 17:11:02 +000010278# Check for support for loadable sqlite extensions
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10280$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10281# Check whether --enable-loadable-sqlite-extensions was given.
10282if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10283 enableval=$enable_loadable_sqlite_extensions;
10284else
10285 enable_loadable_sqlite_extensions="no"
10286fi
10287
10288
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10290$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10291
Ned Deilyd819b932013-09-06 01:07:05 -070010292# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10293
10294
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10296$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10297
10298# Check whether --with-tcltk-includes was given.
10299if test "${with_tcltk_includes+set}" = set; then :
10300 withval=$with_tcltk_includes;
10301else
10302 with_tcltk_includes="default"
10303fi
10304
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10306$as_echo "$with_tcltk_includes" >&6; }
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10308$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10309
10310# Check whether --with-tcltk-libs was given.
10311if test "${with_tcltk_libs+set}" = set; then :
10312 withval=$with_tcltk_libs;
10313else
10314 with_tcltk_libs="default"
10315fi
10316
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10318$as_echo "$with_tcltk_libs" >&6; }
10319if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10320then
10321 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10322 then
10323 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10324 fi
10325 TCLTK_INCLUDES=""
10326 TCLTK_LIBS=""
10327else
10328 TCLTK_INCLUDES="$with_tcltk_includes"
10329 TCLTK_LIBS="$with_tcltk_libs"
10330fi
10331
Matthias Klose55708cc2009-04-30 08:06:49 +000010332# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10334$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010335
10336# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010338 withval=$with_dbmliborder;
10339if test x$with_dbmliborder = xyes
10340then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010341as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010342else
10343 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10344 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10345 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010346 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010347 fi
10348 done
10349fi
10350fi
10351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10353$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355
Martin v. Löwis11437992002-04-12 09:54:03 +000010356
10357# Templates for things AC_DEFINEd more than once.
10358# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010359
10360
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010361if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010362then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010363 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010365
10366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367elif test "$ac_cv_kpthread" = "yes"
10368then
10369 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010370 if test "$ac_cv_cxx_thread" = "yes"; then
10371 CXX="$CXX -Kpthread"
10372 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010373 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010374elif test "$ac_cv_kthread" = "yes"
10375then
10376 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010377 if test "$ac_cv_cxx_thread" = "yes"; then
10378 CXX="$CXX -Kthread"
10379 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010380 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010381elif test "$ac_cv_pthread" = "yes"
10382then
10383 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010384 if test "$ac_cv_cxx_thread" = "yes"; then
10385 CXX="$CXX -pthread"
10386 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010387 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010388else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010389 if test ! -z "$withval" -a -d "$withval"
10390 then LDFLAGS="$LDFLAGS -L$withval"
10391 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010392
10393 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010394 # define _POSIX_THREADS in unistd.h. Some apparently don't
10395 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10397$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010399/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010401#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010402#ifdef _POSIX_THREADS
10403yes
10404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
10406_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010409 unistd_defines_pthreads=yes
10410else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010411 unistd_defines_pthreads=no
10412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010413rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10416$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010417
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010419
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010420 # Just looking for pthread_create in libpthread is not enough:
10421 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10422 # So we really have to include pthread.h, and then link.
10423 _libs=$LIBS
10424 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10426$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010429
10430#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010431#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010432
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010433void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010434int
10435main ()
10436{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010437
10438pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10446$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010447 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010448
Guido van Rossum02a1c402000-02-25 19:26:31 +000010449else
Martin v. Löwis11437992002-04-12 09:54:03 +000010450
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010451 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010454
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010455 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010456
Guido van Rossumad678af1998-10-02 14:42:15 +000010457else
Guido van Rossumad678af1998-10-02 14:42:15 +000010458
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10460$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010461if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010463else
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010465LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469/* Override any GCC internal prototype to avoid an error.
10470 Use char because int might match the return type of a GCC
10471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010472#ifdef __cplusplus
10473extern "C"
10474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010476int
10477main ()
10478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010486else
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010489rm -f core conftest.err conftest.$ac_objext \
10490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010491LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10494$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010495if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010497 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010498 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010499
Greg Steinadf63d62000-07-05 10:38:09 +000010500else
Greg Steinadf63d62000-07-05 10:38:09 +000010501
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10503$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010504if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010506else
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010508LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512/* Override any GCC internal prototype to avoid an error.
10513 Use char because int might match the return type of a GCC
10514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010515#ifdef __cplusplus
10516extern "C"
10517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010518char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010519int
10520main ()
10521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ;
10524 return 0;
10525}
10526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010529else
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010532rm -f core conftest.err conftest.$ac_objext \
10533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10537$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010538if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010539
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010541 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010542
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010543else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10546$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010547if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010549else
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010551LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555/* Override any GCC internal prototype to avoid an error.
10556 Use char because int might match the return type of a GCC
10557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010558#ifdef __cplusplus
10559extern "C"
10560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010561char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010562int
10563main ()
10564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ;
10567 return 0;
10568}
10569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010575rm -f core conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10580$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010581if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010583 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010584 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010585
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010586else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10589$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010594LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010604char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010620LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10623$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010626 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010627 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010628
Guido van Rossumb93a8621998-05-07 13:27:32 +000010629else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010630
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010631 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10632
Guido van Rossum2d38f911996-06-26 19:47:01 +000010633fi
10634
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010636fi
10637
Guido van Rossum0be3e491997-05-22 20:33:33 +000010638fi
10639
Guido van Rossum49545951997-12-02 19:28:29 +000010640fi
10641
Guido van Rossumb93a8621998-05-07 13:27:32 +000010642fi
10643
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10649$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010650if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652else
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010654LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658/* Override any GCC internal prototype to avoid an error.
10659 Use char because int might match the return type of a GCC
10660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010661#ifdef __cplusplus
10662extern "C"
10663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010664char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010665int
10666main ()
10667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 ;
10670 return 0;
10671}
10672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010674 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675else
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010678rm -f core conftest.err conftest.$ac_objext \
10679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010680LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10683$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010684if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685
Martin v. Löwis130fb172001-07-19 11:00:41 +000010686 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010687
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688fi
10689
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010690
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693if test "$posix_threads" = "yes"; then
10694 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010695
Matthias Kloseb9621712010-04-24 17:59:49 +000010696$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010697
10698 fi
10699
10700 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10701 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010702 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705 ;;
10706 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708
10709 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010710 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010711$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010712
10713 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010714 esac
10715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10717$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010718 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010720else
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010722 ac_cv_pthread_system_supported=no
10723else
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010726
10727 #include <stdio.h>
10728 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010729 void *foo(void *parm) {
10730 return NULL;
10731 }
10732 main() {
10733 pthread_attr_t attr;
10734 pthread_t id;
10735 if (pthread_attr_init(&attr)) exit(-1);
10736 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10737 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10738 exit(0);
10739 }
10740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010742 ac_cv_pthread_system_supported=yes
10743else
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010748fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750
Guido van Rossum627b2d71993-12-24 10:39:16 +000010751fi
10752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10754$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010755 if test "$ac_cv_pthread_system_supported" = "yes"; then
10756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010758
10759 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 for ac_func in pthread_sigmask
10761do :
10762 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010763if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010765#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010766_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010767 case $ac_sys_system in
10768 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010771
10772 ;;
10773 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010774fi
10775done
10776
pdoxe14679c2017-10-05 00:01:56 -070010777 for ac_func in pthread_getcpuclockid
10778do :
10779 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10780if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10781 cat >>confdefs.h <<_ACEOF
10782#define HAVE_PTHREAD_GETCPUCLOCKID 1
10783_ACEOF
10784
10785fi
10786done
10787
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010788fi
10789
10790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10794$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010796if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801 ipv6=no
10802 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10804$as_echo "yes" >&6; }
10805 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806
10807 ipv6=yes
10808 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810else
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010813/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814 /* AF_INET6 available check */
10815#include <sys/types.h>
10816#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010817int
10818main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010820int domain = AF_INET6;
10821 ;
10822 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823}
Martin v. Löwis11437992002-04-12 09:54:03 +000010824_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010825if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10828$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831else
Matthias Kloseb159a552010-04-25 21:00:44 +000010832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010839
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010840if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10842$as_echo_n "checking if RFC2553 API is available... " >&6; }
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010845
10846 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010847#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010848int
10849main ()
10850{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010851struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010852 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 ;
10854 return 0;
10855}
Matthias Kloseb159a552010-04-25 21:00:44 +000010856
Martin v. Löwis11437992002-04-12 09:54:03 +000010857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010858if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010859
10860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010862 ipv6=yes
10863
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010864else
Matthias Kloseb159a552010-04-25 21:00:44 +000010865
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010868 ipv6=no
10869
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010872fi
10873
10874if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010876
10877fi
10878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879fi
10880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881
10882ipv6type=unknown
10883ipv6lib=none
10884ipv6trylibc=no
10885
10886if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10888$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010889 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10890 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891 case $i in
10892 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896#include <netinet/in.h>
10897#ifdef IPV6_INRIA_VERSION
10898yes
10899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010903 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010905rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906
10907 ;;
10908 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010910/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912#include <netinet/in.h>
10913#ifdef __KAME__
10914yes
10915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010916_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010918 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919 ipv6type=$i;
10920 ipv6lib=inet6
10921 ipv6libdir=/usr/local/v6/lib
10922 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010924rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925
10926 ;;
10927 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931#include <features.h>
10932#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10933yes
10934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010935_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938 ipv6type=$i;
10939 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010941rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942
10943 ;;
10944 linux-inet6)
10945 if test -d /usr/inet6; then
10946 ipv6type=$i
10947 ipv6lib=inet6
10948 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010949 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 fi
10951 ;;
10952 solaris)
10953 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010954 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6type=$i
10956 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957 fi
10958 fi
10959 ;;
10960 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010962/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964#include <sys/param.h>
10965#ifdef _TOSHIBA_INET6
10966yes
10967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010968_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971 ipv6type=$i;
10972 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010973 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010975rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976
10977 ;;
10978 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982#include </usr/local/v6/include/sys/v6config.h>
10983#ifdef __V6D__
10984yes
10985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6type=$i;
10990 ipv6lib=v6;
10991 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010992 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010994rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995
10996 ;;
10997 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001#include <sys/param.h>
11002#ifdef _ZETA_MINAMI_INET6
11003yes
11004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008 ipv6type=$i;
11009 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011010 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011012rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011013
11014 ;;
11015 esac
11016 if test "$ipv6type" != "unknown"; then
11017 break
11018 fi
11019 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11021$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011022fi
11023
11024if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11025 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11026 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11027 echo "using lib$ipv6lib"
11028 else
11029 if test $ipv6trylibc = "yes"; then
11030 echo "using libc"
11031 else
11032 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11033 echo "You need to fetch lib$ipv6lib.a from appropriate"
11034 echo 'ipv6 kit and compile beforehand.'
11035 exit 1
11036 fi
11037 fi
11038fi
11039
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11041$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11043/* end confdefs.h. */
11044 /* CAN_RAW_FD_FRAMES available check */
11045#include <linux/can/raw.h>
11046int
11047main ()
11048{
11049int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11050 ;
11051 return 0;
11052}
11053_ACEOF
11054if ac_fn_c_try_compile "$LINENO"; then :
11055
11056
11057$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11058
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11060$as_echo "yes" >&6; }
11061
11062else
11063
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
11066
11067fi
11068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11069
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011070# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11072$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076 withval=$with_doc_strings;
11077fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011078
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011079
11080if test -z "$with_doc_strings"
11081then with_doc_strings="yes"
11082fi
11083if test "$with_doc_strings" != "no"
11084then
11085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011087
11088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11090$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011091
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011092# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11094$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011097if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098 withval=$with_pymalloc;
11099fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011100
Neil Schemenauera35c6882001-02-27 04:45:05 +000011101
Neil Schemenauer16c22972002-03-22 15:34:49 +000011102if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011103then
11104 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011105fi
11106if test "$with_pymalloc" != "no"
11107then
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011110
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011111 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11114$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011115
Nick Coghlan6ea41862017-06-11 13:16:15 +100011116# Check for --with-c-locale-coercion
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11118$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11119
11120# Check whether --with-c-locale-coercion was given.
11121if test "${with_c_locale_coercion+set}" = set; then :
11122 withval=$with_c_locale_coercion;
11123fi
11124
11125
11126if test -z "$with_c_locale_coercion"
11127then
11128 with_c_locale_coercion="yes"
11129fi
11130if test "$with_c_locale_coercion" != "no"
11131then
11132
11133$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11134
11135fi
11136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11137$as_echo "$with_c_locale_coercion" >&6; }
11138
Benjamin Peterson05159c42009-12-03 03:01:27 +000011139# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11141$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011142
11143# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011144if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011145 withval=$with_valgrind;
11146else
11147 with_valgrind=no
11148fi
11149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11151$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011152if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 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 +020011154if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011155
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011157
11158else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011159 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011160
11161fi
11162
11163
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011164 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011165fi
11166
Łukasz Langaa785c872016-09-09 17:37:37 -070011167# Check for DTrace support
11168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11169$as_echo_n "checking for --with-dtrace... " >&6; }
11170
11171# Check whether --with-dtrace was given.
11172if test "${with_dtrace+set}" = set; then :
11173 withval=$with_dtrace;
11174else
11175 with_dtrace=no
11176fi
11177
11178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11179$as_echo "$with_dtrace" >&6; }
11180
11181
11182
11183
11184
11185DTRACE=
11186DFLAGS=
11187DTRACE_HEADERS=
11188DTRACE_OBJS=
11189
11190if test "$with_dtrace" = "yes"
11191then
11192 # Extract the first word of "dtrace", so it can be a program name with args.
11193set dummy dtrace; ac_word=$2
11194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11195$as_echo_n "checking for $ac_word... " >&6; }
11196if ${ac_cv_path_DTRACE+:} false; then :
11197 $as_echo_n "(cached) " >&6
11198else
11199 case $DTRACE in
11200 [\\/]* | ?:[\\/]*)
11201 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11202 ;;
11203 *)
11204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11205for as_dir in $PATH
11206do
11207 IFS=$as_save_IFS
11208 test -z "$as_dir" && as_dir=.
11209 for ac_exec_ext in '' $ac_executable_extensions; do
11210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11211 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11213 break 2
11214 fi
11215done
11216 done
11217IFS=$as_save_IFS
11218
11219 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11220 ;;
11221esac
11222fi
11223DTRACE=$ac_cv_path_DTRACE
11224if test -n "$DTRACE"; then
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11226$as_echo "$DTRACE" >&6; }
11227else
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
11230fi
11231
11232
11233 if test "$DTRACE" = "not found"; then
11234 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11235 fi
11236
11237$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11238
11239 DTRACE_HEADERS="Include/pydtrace_probes.h"
11240
11241 # On OS X, DTrace providers do not need to be explicitly compiled and
11242 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11243 # generation flag '-G'. We check for presence of this flag, rather than
11244 # hardcoding support by OS, in the interest of robustness.
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11246$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11247if ${ac_cv_dtrace_link+:} false; then :
11248 $as_echo_n "(cached) " >&6
11249else
11250 ac_cv_dtrace_link=no
11251 echo 'BEGIN' > conftest.d
11252 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11253 ac_cv_dtrace_link=yes
11254
11255fi
11256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11257$as_echo "$ac_cv_dtrace_link" >&6; }
11258 if test "$ac_cv_dtrace_link" = "yes"; then
11259 DTRACE_OBJS="Python/pydtrace.o"
11260 fi
11261fi
11262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011263# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011264
Guido van Rossum98935bf2001-09-05 19:13:16 +000011265DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011266
Guido van Rossume97ee181999-12-20 21:27:22 +000011267# the dlopen() function means we might want to use dynload_shlib.o. some
11268# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011269for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011270do :
11271 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011272if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011276
Guido van Rossume97ee181999-12-20 21:27:22 +000011277fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011278done
Guido van Rossume97ee181999-12-20 21:27:22 +000011279
Michael W. Hudson54241132001-12-07 15:38:26 +000011280
Guido van Rossume97ee181999-12-20 21:27:22 +000011281# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11282# loading of modules.
11283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11285$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011286if test -z "$DYNLOADFILE"
11287then
11288 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011289 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11290 if test "$ac_cv_func_dlopen" = yes
11291 then DYNLOADFILE="dynload_shlib.o"
11292 else DYNLOADFILE="dynload_aix.o"
11293 fi
11294 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011295 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011296 *)
11297 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11298 # out any dynamic loading
11299 if test "$ac_cv_func_dlopen" = yes
11300 then DYNLOADFILE="dynload_shlib.o"
11301 else DYNLOADFILE="dynload_stub.o"
11302 fi
11303 ;;
11304 esac
11305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11307$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011308if test "$DYNLOADFILE" != "dynload_stub.o"
11309then
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011312
11313fi
11314
Neil Schemenauer4e425612001-06-19 15:44:15 +000011315# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11316
Michael W. Hudson54241132001-12-07 15:38:26 +000011317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11319$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011320if test -z "$MACHDEP_OBJS"
11321then
Jack Jansene578a632001-08-15 01:27:14 +000011322 MACHDEP_OBJS=$extra_machdep_objs
11323else
11324 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011325fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011326if test -z "$MACHDEP_OBJS"; then
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11328$as_echo "none" >&6; }
11329else
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11331$as_echo "$MACHDEP_OBJS" >&6; }
11332fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011333
Guido van Rossum627b2d71993-12-24 10:39:16 +000011334# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011335for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011336 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011337 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011338 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011339 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011340 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011341 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011342 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011343 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011344 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011345 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011346 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011347 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011348 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011349 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011350 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11351 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011352 sigaction sigaltstack siginterrupt sigpending sigrelse \
11353 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011354 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011355 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011356 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011357do :
11358 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11359ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011360if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011363_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011365fi
11366done
11367
Michael W. Hudson54241132001-12-07 15:38:26 +000011368
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011369ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11370 #include <dirent.h>
11371"
11372if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11373
11374$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11375
11376fi
11377
11378
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011379# For some functions, having a definition is not sufficient, since
11380# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11382$as_echo_n "checking for chroot... " >&6; }
11383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011385#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386int
11387main ()
11388{
11389void *x=chroot
11390 ;
11391 return 0;
11392}
11393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011397
Matthias Kloseb159a552010-04-25 21:00:44 +000011398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011400else
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011403
11404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11407$as_echo_n "checking for link... " >&6; }
11408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011410#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011411int
11412main ()
11413{
11414void *x=link
11415 ;
11416 return 0;
11417}
11418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011422
Matthias Kloseb159a552010-04-25 21:00:44 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011425else
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011428
11429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11432$as_echo_n "checking for symlink... " >&6; }
11433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011434/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011435#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011436int
11437main ()
11438{
11439void *x=symlink
11440 ;
11441 return 0;
11442}
11443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011445
Matthias Kloseb9621712010-04-24 17:59:49 +000011446$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011447
Matthias Kloseb159a552010-04-25 21:00:44 +000011448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011450else
Matthias Kloseb9621712010-04-24 17:59:49 +000011451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11452$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011453
11454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11457$as_echo_n "checking for fchdir... " >&6; }
11458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011459/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011460#include <unistd.h>
11461int
11462main ()
11463{
11464void *x=fchdir
11465 ;
11466 return 0;
11467}
11468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011472
Matthias Kloseb159a552010-04-25 21:00:44 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011474$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011475else
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011478
11479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11482$as_echo_n "checking for fsync... " >&6; }
11483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011485#include <unistd.h>
11486int
11487main ()
11488{
11489void *x=fsync
11490 ;
11491 return 0;
11492}
11493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011495
Matthias Kloseb9621712010-04-24 17:59:49 +000011496$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011497
Matthias Kloseb159a552010-04-25 21:00:44 +000011498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011499$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011500else
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11502$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011503
11504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11507$as_echo_n "checking for fdatasync... " >&6; }
11508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011509/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011510#include <unistd.h>
11511int
11512main ()
11513{
11514void *x=fdatasync
11515 ;
11516 return 0;
11517}
11518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011522
Matthias Kloseb159a552010-04-25 21:00:44 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011524$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011525else
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011528
11529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11532$as_echo_n "checking for epoll... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011534/* end confdefs.h. */
11535#include <sys/epoll.h>
11536int
11537main ()
11538{
11539void *x=epoll_create
11540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011545
Matthias Kloseb9621712010-04-24 17:59:49 +000011546$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011547
Matthias Kloseb159a552010-04-25 21:00:44 +000011548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011549$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011550else
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011553
11554fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11557$as_echo_n "checking for epoll_create1... " >&6; }
11558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11559/* end confdefs.h. */
11560#include <sys/epoll.h>
11561int
11562main ()
11563{
11564void *x=epoll_create1
11565 ;
11566 return 0;
11567}
11568_ACEOF
11569if ac_fn_c_try_compile "$LINENO"; then :
11570
11571$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11572
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11574$as_echo "yes" >&6; }
11575else
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
11578
11579fi
11580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11582$as_echo_n "checking for kqueue... " >&6; }
11583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011584/* end confdefs.h. */
11585
11586#include <sys/types.h>
11587#include <sys/event.h>
11588
11589int
11590main ()
11591{
11592int x=kqueue()
11593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011600
Matthias Kloseb159a552010-04-25 21:00:44 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011606
11607fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11610$as_echo_n "checking for prlimit... " >&6; }
11611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11612/* end confdefs.h. */
11613
11614#include <sys/time.h>
11615#include <sys/resource.h>
11616
11617int
11618main ()
11619{
11620void *x=prlimit
11621 ;
11622 return 0;
11623}
11624_ACEOF
11625if ac_fn_c_try_compile "$LINENO"; then :
11626
11627$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11628
11629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11630$as_echo "yes" >&6; }
11631else
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11633$as_echo "no" >&6; }
11634
11635fi
11636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11637
Martin v. Löwisd5843682002-11-21 20:41:28 +000011638# On some systems (eg. FreeBSD 5), we would find a definition of the
11639# functions ctermid_r, setgroups in the library, but no prototype
11640# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11641# address to avoid compiler warnings and potential miscompilations
11642# because of the missing prototypes.
11643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11645$as_echo_n "checking for ctermid_r... " >&6; }
11646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011647/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011648
Martin v. Löwisd5843682002-11-21 20:41:28 +000011649#include <stdio.h>
11650
Martin v. Löwisd5843682002-11-21 20:41:28 +000011651int
11652main ()
11653{
11654void* p = ctermid_r
11655 ;
11656 return 0;
11657}
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011662
Matthias Kloseb159a552010-04-25 21:00:44 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011668
11669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11673$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011675 $as_echo_n "(cached) " >&6
11676else
11677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011678/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011679#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011680int
11681main ()
11682{
11683void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011684
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011685 ;
11686 return 0;
11687}
11688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011689if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011690 ac_cv_flock_decl=yes
11691else
11692 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011693
11694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011696
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011697fi
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11699$as_echo "$ac_cv_flock_decl" >&6; }
11700if test "x${ac_cv_flock_decl}" = xyes; then
11701 for ac_func in flock
11702do :
11703 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011705 cat >>confdefs.h <<_ACEOF
11706#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011707_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011708
Antoine Pitroua3000072010-09-07 14:52:42 +000011709else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011711$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011713 $as_echo_n "(cached) " >&6
11714else
11715 ac_check_lib_save_LIBS=$LIBS
11716LIBS="-lbsd $LIBS"
11717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11718/* end confdefs.h. */
11719
11720/* Override any GCC internal prototype to avoid an error.
11721 Use char because int might match the return type of a GCC
11722 builtin and then its argument prototype would still apply. */
11723#ifdef __cplusplus
11724extern "C"
11725#endif
11726char flock ();
11727int
11728main ()
11729{
11730return flock ();
11731 ;
11732 return 0;
11733}
11734_ACEOF
11735if ac_fn_c_try_link "$LINENO"; then :
11736 ac_cv_lib_bsd_flock=yes
11737else
11738 ac_cv_lib_bsd_flock=no
11739fi
11740rm -f core conftest.err conftest.$ac_objext \
11741 conftest$ac_exeext conftest.$ac_ext
11742LIBS=$ac_check_lib_save_LIBS
11743fi
11744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11745$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011746if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011747 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011748
11749
11750$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11751
11752
11753fi
11754
11755
11756fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011757done
11758
Antoine Pitroua3000072010-09-07 14:52:42 +000011759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11762$as_echo_n "checking for getpagesize... " >&6; }
11763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011764/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011765
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011766#include <unistd.h>
11767
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011768int
11769main ()
11770{
11771void* p = getpagesize
11772 ;
11773 return 0;
11774}
11775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011777
Matthias Kloseb9621712010-04-24 17:59:49 +000011778$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011779
Matthias Kloseb159a552010-04-25 21:00:44 +000011780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11784$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011785
11786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011788
Victor Stinner984890f2011-11-24 13:53:38 +010011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11790$as_echo_n "checking for broken unsetenv... " >&6; }
11791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11792/* end confdefs.h. */
11793
11794#include <stdlib.h>
11795
11796int
11797main ()
11798{
11799int res = unsetenv("DUMMY")
11800 ;
11801 return 0;
11802}
11803_ACEOF
11804if ac_fn_c_try_compile "$LINENO"; then :
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807else
11808
11809$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11810
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11812$as_echo "yes" >&6; }
11813
11814fi
11815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11816
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011817for ac_prog in true
11818do
11819 # Extract the first word of "$ac_prog", so it can be a program name with args.
11820set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011825else
11826 if test -n "$TRUE"; then
11827 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11828else
11829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832 IFS=$as_save_IFS
11833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011836 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011837 $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 +000011838 break 2
11839 fi
11840done
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011843
11844fi
11845fi
11846TRUE=$ac_cv_prog_TRUE
11847if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11849$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011853fi
11854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011855
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011856 test -n "$TRUE" && break
11857done
11858test -n "$TRUE" || TRUE="/bin/true"
11859
11860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11862$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011865else
11866 ac_check_lib_save_LIBS=$LIBS
11867LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871/* Override any GCC internal prototype to avoid an error.
11872 Use char because int might match the return type of a GCC
11873 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011874#ifdef __cplusplus
11875extern "C"
11876#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011878int
11879main ()
11880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011882 ;
11883 return 0;
11884}
11885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011887 ac_cv_lib_c_inet_aton=yes
11888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core conftest.err conftest.$ac_objext \
11892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011893LIBS=$ac_check_lib_save_LIBS
11894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11896$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011898 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11901$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011902if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011904else
11905 ac_check_lib_save_LIBS=$LIBS
11906LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011910/* Override any GCC internal prototype to avoid an error.
11911 Use char because int might match the return type of a GCC
11912 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011913#ifdef __cplusplus
11914extern "C"
11915#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011916char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011917int
11918main ()
11919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011921 ;
11922 return 0;
11923}
11924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011926 ac_cv_lib_resolv_inet_aton=yes
11927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011930rm -f core conftest.err conftest.$ac_objext \
11931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011932LIBS=$ac_check_lib_save_LIBS
11933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11935$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011936if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011937 cat >>confdefs.h <<_ACEOF
11938#define HAVE_LIBRESOLV 1
11939_ACEOF
11940
11941 LIBS="-lresolv $LIBS"
11942
11943fi
11944
11945
11946fi
11947
11948
Christian Heimesd0764e22007-12-04 15:00:33 +000011949# On Tru64, chflags seems to be present, but calling it will
11950# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11952$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011953if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011954 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011957 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011958else
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011960/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011961
Christian Heimesd0764e22007-12-04 15:00:33 +000011962#include <sys/stat.h>
11963#include <unistd.h>
11964int main(int argc, char*argv[])
11965{
11966 if(chflags(argv[0], 0) != 0)
11967 return 1;
11968 return 0;
11969}
Ned Deily3eb67d52011-06-28 00:00:28 -070011970
Christian Heimesd0764e22007-12-04 15:00:33 +000011971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011972if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011973 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011979fi
11980
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11984$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011985if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011987if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011988 ac_cv_have_chflags="yes"
11989else
11990 ac_cv_have_chflags="no"
11991fi
11992
11993fi
11994if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011997
11998fi
11999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12001$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012006 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012009/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012010
Christian Heimesd0764e22007-12-04 15:00:33 +000012011#include <sys/stat.h>
12012#include <unistd.h>
12013int main(int argc, char*argv[])
12014{
12015 if(lchflags(argv[0], 0) != 0)
12016 return 1;
12017 return 0;
12018}
Ned Deily3eb67d52011-06-28 00:00:28 -070012019
Christian Heimesd0764e22007-12-04 15:00:33 +000012020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012021if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012022 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12027 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012028fi
12029
12030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12033$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012034if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012036if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012037 ac_cv_have_lchflags="yes"
12038else
12039 ac_cv_have_lchflags="no"
12040fi
12041
12042fi
12043if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012046
12047fi
12048
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012049case $ac_sys_system/$ac_sys_release in
12050Darwin/*)
12051 _CUR_CFLAGS="${CFLAGS}"
12052 _CUR_LDFLAGS="${LDFLAGS}"
12053 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12054 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12055 ;;
12056esac
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12059$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012062else
12063 ac_check_lib_save_LIBS=$LIBS
12064LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012066/* end confdefs.h. */
12067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068/* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
12070 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012071#ifdef __cplusplus
12072extern "C"
12073#endif
12074char inflateCopy ();
12075int
12076main ()
12077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012084 ac_cv_lib_z_inflateCopy=yes
12085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012088rm -f core conftest.err conftest.$ac_objext \
12089 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012090LIBS=$ac_check_lib_save_LIBS
12091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12093$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012097
12098fi
12099
12100
12101case $ac_sys_system/$ac_sys_release in
12102Darwin/*)
12103 CFLAGS="${_CUR_CFLAGS}"
12104 LDFLAGS="${_CUR_LDFLAGS}"
12105 ;;
12106esac
12107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12109$as_echo_n "checking for hstrerror... " >&6; }
12110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012112
Martin v. Löwise9416172003-05-03 10:12:45 +000012113#include <netdb.h>
12114
Martin v. Löwise9416172003-05-03 10:12:45 +000012115int
12116main ()
12117{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012118void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012126
Matthias Kloseb159a552010-04-25 21:00:44 +000012127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012132
12133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12138$as_echo_n "checking for inet_aton... " >&6; }
12139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012141
Martin v. Löwis86d66262006-02-17 08:40:11 +000012142#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012143#include <sys/socket.h>
12144#include <netinet/in.h>
12145#include <arpa/inet.h>
12146
Martin v. Löwise9416172003-05-03 10:12:45 +000012147int
12148main ()
12149{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012150void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012151 ;
12152 return 0;
12153}
12154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012158
Matthias Kloseb159a552010-04-25 21:00:44 +000012159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012160$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12163$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012164
12165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012166rm -f core conftest.err conftest.$ac_objext \
12167 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12170$as_echo_n "checking for inet_pton... " >&6; }
12171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012172/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012173
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012174#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012175#include <sys/socket.h>
12176#include <netinet/in.h>
12177#include <arpa/inet.h>
12178
Martin v. Löwise9416172003-05-03 10:12:45 +000012179int
12180main ()
12181{
12182void* p = inet_pton
12183 ;
12184 return 0;
12185}
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012190
Matthias Kloseb159a552010-04-25 21:00:44 +000012191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012192$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012196
12197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012199
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012200# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12202$as_echo_n "checking for setgroups... " >&6; }
12203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012205
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012206#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012207#ifdef HAVE_GRP_H
12208#include <grp.h>
12209#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012210
Martin v. Löwisd5843682002-11-21 20:41:28 +000012211int
12212main ()
12213{
12214void* p = setgroups
12215 ;
12216 return 0;
12217}
12218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012220
Matthias Kloseb9621712010-04-24 17:59:49 +000012221$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012222
Matthias Kloseb159a552010-04-25 21:00:44 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12227$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012228
12229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012231
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012232# check for openpty and forkpty
12233
12234for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012235do :
12236 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012240_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12244$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012247else
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012249LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253/* Override any GCC internal prototype to avoid an error.
12254 Use char because int might match the return type of a GCC
12255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012256#ifdef __cplusplus
12257extern "C"
12258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012259char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273rm -f core conftest.err conftest.$ac_objext \
12274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012275LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12278$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012279if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12284$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012287else
12288 ac_check_lib_save_LIBS=$LIBS
12289LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012291/* end confdefs.h. */
12292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293/* Override any GCC internal prototype to avoid an error.
12294 Use char because int might match the return type of a GCC
12295 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012296#ifdef __cplusplus
12297extern "C"
12298#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012299char openpty ();
12300int
12301main ()
12302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012304 ;
12305 return 0;
12306}
12307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012309 ac_cv_lib_bsd_openpty=yes
12310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313rm -f core conftest.err conftest.$ac_objext \
12314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012315LIBS=$ac_check_lib_save_LIBS
12316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12318$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012319if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321 LIBS="$LIBS -lbsd"
12322fi
12323
12324
12325fi
12326
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327
12328fi
12329done
12330
12331for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012332do :
12333 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012337_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012338
Fred Drake8cef4cf2000-06-28 16:40:38 +000012339else
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12341$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012344else
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012346LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350/* Override any GCC internal prototype to avoid an error.
12351 Use char because int might match the return type of a GCC
12352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012353#ifdef __cplusplus
12354extern "C"
12355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012356char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 ;
12362 return 0;
12363}
12364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012370rm -f core conftest.err conftest.$ac_objext \
12371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012372LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12375$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012376if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012378 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12381$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012384else
12385 ac_check_lib_save_LIBS=$LIBS
12386LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012388/* end confdefs.h. */
12389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390/* Override any GCC internal prototype to avoid an error.
12391 Use char because int might match the return type of a GCC
12392 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012393#ifdef __cplusplus
12394extern "C"
12395#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012396char forkpty ();
12397int
12398main ()
12399{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012406 ac_cv_lib_bsd_forkpty=yes
12407else
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012410rm -f core conftest.err conftest.$ac_objext \
12411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012412LIBS=$ac_check_lib_save_LIBS
12413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12415$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012418 LIBS="$LIBS -lbsd"
12419fi
12420
12421
12422fi
12423
Fred Drake8cef4cf2000-06-28 16:40:38 +000012424
12425fi
12426done
12427
Jack Jansendd19cf82001-12-06 22:36:17 +000012428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012430for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012431do :
12432 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12433ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012434if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012437_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012440done
12441
Michael W. Hudson54241132001-12-07 15:38:26 +000012442
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012443ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012444if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012445 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012446
Martin v. Löwis1142de32002-03-29 16:28:31 +000012447else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012449 *" dup2.$ac_objext "* ) ;;
12450 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012452esac
12453
Martin v. Löwis1142de32002-03-29 16:28:31 +000012454fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012456ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012458 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12459
12460else
12461 case " $LIBOBJS " in
12462 *" strdup.$ac_objext "* ) ;;
12463 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12464 ;;
12465esac
12466
12467fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012468
12469
12470for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012471do :
12472 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012473if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012478/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012480int
12481main ()
12482{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012484 ;
12485 return 0;
12486}
12487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012491
Guido van Rossum627b2d71993-12-24 10:39:16 +000012492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012494
Guido van Rossum627b2d71993-12-24 10:39:16 +000012495fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012496done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012497
Jack Jansen150753c2003-03-29 22:07:47 +000012498for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012499do :
12500 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012501if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012507#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012508int
12509main ()
12510{
12511setpgrp(0,0);
12512 ;
12513 return 0;
12514}
12515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012519
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012522
12523fi
12524done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012525
Thomas Wouters3a584202000-08-05 23:28:51 +000012526for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012527do :
12528 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012529if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012534/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012536int
12537main ()
12538{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012539gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012544if ac_fn_c_try_compile "$LINENO"; then :
12545
Guido van Rossum627b2d71993-12-24 10:39:16 +000012546else
Skip Montanaro6dead952003-09-25 14:50:04 +000012547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012549
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
Guido van Rossum627b2d71993-12-24 10:39:16 +000012551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012553
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012555done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556
Michael W. Hudson54241132001-12-07 15:38:26 +000012557
Victor Stinnere0be4232011-10-25 13:06:09 +020012558for ac_func in clock_gettime
12559do :
12560 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12561if test "x$ac_cv_func_clock_gettime" = xyes; then :
12562 cat >>confdefs.h <<_ACEOF
12563#define HAVE_CLOCK_GETTIME 1
12564_ACEOF
12565
12566else
12567
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12569$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12570if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12571 $as_echo_n "(cached) " >&6
12572else
12573 ac_check_lib_save_LIBS=$LIBS
12574LIBS="-lrt $LIBS"
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576/* end confdefs.h. */
12577
12578/* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
12581#ifdef __cplusplus
12582extern "C"
12583#endif
12584char clock_gettime ();
12585int
12586main ()
12587{
12588return clock_gettime ();
12589 ;
12590 return 0;
12591}
12592_ACEOF
12593if ac_fn_c_try_link "$LINENO"; then :
12594 ac_cv_lib_rt_clock_gettime=yes
12595else
12596 ac_cv_lib_rt_clock_gettime=no
12597fi
12598rm -f core conftest.err conftest.$ac_objext \
12599 conftest$ac_exeext conftest.$ac_ext
12600LIBS=$ac_check_lib_save_LIBS
12601fi
12602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12603$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12604if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12605
Victor Stinner7efb8332014-08-29 15:41:08 +020012606 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12608
12609
12610$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12611
12612
12613fi
12614
12615
12616fi
12617done
12618
12619
12620for ac_func in clock_getres
12621do :
12622 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12623if test "x$ac_cv_func_clock_getres" = xyes; then :
12624 cat >>confdefs.h <<_ACEOF
12625#define HAVE_CLOCK_GETRES 1
12626_ACEOF
12627
12628else
12629
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12631$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12632if ${ac_cv_lib_rt_clock_getres+:} false; then :
12633 $as_echo_n "(cached) " >&6
12634else
12635 ac_check_lib_save_LIBS=$LIBS
12636LIBS="-lrt $LIBS"
12637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12638/* end confdefs.h. */
12639
12640/* Override any GCC internal prototype to avoid an error.
12641 Use char because int might match the return type of a GCC
12642 builtin and then its argument prototype would still apply. */
12643#ifdef __cplusplus
12644extern "C"
12645#endif
12646char clock_getres ();
12647int
12648main ()
12649{
12650return clock_getres ();
12651 ;
12652 return 0;
12653}
12654_ACEOF
12655if ac_fn_c_try_link "$LINENO"; then :
12656 ac_cv_lib_rt_clock_getres=yes
12657else
12658 ac_cv_lib_rt_clock_getres=no
12659fi
12660rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
12662LIBS=$ac_check_lib_save_LIBS
12663fi
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12665$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12666if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12667
12668 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12669
12670
12671fi
12672
12673
12674fi
12675done
12676
12677
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012678for ac_func in clock_settime
12679do :
12680 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12681if test "x$ac_cv_func_clock_settime" = xyes; then :
12682 cat >>confdefs.h <<_ACEOF
12683#define HAVE_CLOCK_SETTIME 1
12684_ACEOF
12685
12686else
12687
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12689$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12690if ${ac_cv_lib_rt_clock_settime+:} false; then :
12691 $as_echo_n "(cached) " >&6
12692else
12693 ac_check_lib_save_LIBS=$LIBS
12694LIBS="-lrt $LIBS"
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697
12698/* Override any GCC internal prototype to avoid an error.
12699 Use char because int might match the return type of a GCC
12700 builtin and then its argument prototype would still apply. */
12701#ifdef __cplusplus
12702extern "C"
12703#endif
12704char clock_settime ();
12705int
12706main ()
12707{
12708return clock_settime ();
12709 ;
12710 return 0;
12711}
12712_ACEOF
12713if ac_fn_c_try_link "$LINENO"; then :
12714 ac_cv_lib_rt_clock_settime=yes
12715else
12716 ac_cv_lib_rt_clock_settime=no
12717fi
12718rm -f core conftest.err conftest.$ac_objext \
12719 conftest$ac_exeext conftest.$ac_ext
12720LIBS=$ac_check_lib_save_LIBS
12721fi
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12723$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12724if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12725
12726 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12727
12728
12729fi
12730
12731
12732fi
12733done
12734
12735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12737$as_echo_n "checking for major... " >&6; }
12738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012740
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012741#if defined(MAJOR_IN_MKDEV)
12742#include <sys/mkdev.h>
12743#elif defined(MAJOR_IN_SYSMACROS)
12744#include <sys/sysmacros.h>
12745#else
12746#include <sys/types.h>
12747#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012748
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012749int
12750main ()
12751{
12752
12753 makedev(major(0),minor(0));
12754
12755 ;
12756 return 0;
12757}
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012760
12761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12765$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012766
12767else
Skip Montanaro6dead952003-09-25 14:50:04 +000012768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12770$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012771
12772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012775
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012776# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012777# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12779$as_echo_n "checking for getaddrinfo... " >&6; }
12780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012781/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012782
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012783#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012784#include <sys/socket.h>
12785#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012786#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012791getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ;
12793 return 0;
12794}
12795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012797 have_getaddrinfo=yes
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801rm -f core conftest.err conftest.$ac_objext \
12802 conftest$ac_exeext conftest.$ac_ext
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12804$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012805if test $have_getaddrinfo = yes
12806then
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12808$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012809 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012811else
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012813
12814if test "${enable_ipv6+set}" = set; then
12815 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12816else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012817 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012818fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819else
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012821/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012822
Stefan Krah19c21392012-11-22 23:47:32 +010012823#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012824#include <sys/types.h>
12825#include <netdb.h>
12826#include <string.h>
12827#include <sys/socket.h>
12828#include <netinet/in.h>
12829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012830int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012831{
12832 int passive, gaierr, inet4 = 0, inet6 = 0;
12833 struct addrinfo hints, *ai, *aitop;
12834 char straddr[INET6_ADDRSTRLEN], strport[16];
12835
12836 for (passive = 0; passive <= 1; passive++) {
12837 memset(&hints, 0, sizeof(hints));
12838 hints.ai_family = AF_UNSPEC;
12839 hints.ai_flags = passive ? AI_PASSIVE : 0;
12840 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012841 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012842 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12843 (void)gai_strerror(gaierr);
12844 goto bad;
12845 }
12846 for (ai = aitop; ai; ai = ai->ai_next) {
12847 if (ai->ai_addr == NULL ||
12848 ai->ai_addrlen == 0 ||
12849 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12850 straddr, sizeof(straddr), strport, sizeof(strport),
12851 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12852 goto bad;
12853 }
12854 switch (ai->ai_family) {
12855 case AF_INET:
12856 if (strcmp(strport, "54321") != 0) {
12857 goto bad;
12858 }
12859 if (passive) {
12860 if (strcmp(straddr, "0.0.0.0") != 0) {
12861 goto bad;
12862 }
12863 } else {
12864 if (strcmp(straddr, "127.0.0.1") != 0) {
12865 goto bad;
12866 }
12867 }
12868 inet4++;
12869 break;
12870 case AF_INET6:
12871 if (strcmp(strport, "54321") != 0) {
12872 goto bad;
12873 }
12874 if (passive) {
12875 if (strcmp(straddr, "::") != 0) {
12876 goto bad;
12877 }
12878 } else {
12879 if (strcmp(straddr, "::1") != 0) {
12880 goto bad;
12881 }
12882 }
12883 inet6++;
12884 break;
12885 case AF_UNSPEC:
12886 goto bad;
12887 break;
12888 default:
12889 /* another family support? */
12890 break;
12891 }
12892 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012893 freeaddrinfo(aitop);
12894 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012895 }
12896
12897 if (!(inet4 == 0 || inet4 == 2))
12898 goto bad;
12899 if (!(inet6 == 0 || inet6 == 2))
12900 goto bad;
12901
12902 if (aitop)
12903 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012904 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012905
12906 bad:
12907 if (aitop)
12908 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012909 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012910}
12911
Martin v. Löwis11437992002-04-12 09:54:03 +000012912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012914 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012922fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012923
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12927$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12928
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012929if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012930then
12931 if test $ipv6 = yes
12932 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012933 echo 'Fatal: You must get working getaddrinfo() function.'
12934 echo ' or you can specify "--disable-ipv6"'.
12935 exit 1
12936 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012937else
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012940
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012941fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012942
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012943for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012944do :
12945 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012946if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012949_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012950
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012951fi
12952done
12953
Michael W. Hudson54241132001-12-07 15:38:26 +000012954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12957$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012958if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012963#include <sys/types.h>
12964#include <sys/time.h>
12965#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967int
12968main ()
12969{
12970if ((struct tm *) 0)
12971return 0;
12972 ;
12973 return 0;
12974}
12975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012976if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12984$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012985if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988
12989fi
12990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12992$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012993if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995else
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012997/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998#include <sys/types.h>
12999#include <time.h>
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 +000013004struct tm tm;
13005 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 ;
13008 return 0;
13009}
13010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012 ac_cv_struct_tm=time.h
13013else
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13019$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013020if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013023
13024fi
13025
Matthias Kloseb9621712010-04-24 17:59:49 +000013026ac_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 +000013027#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029"
Victor Stinnere0be4232011-10-25 13:06:09 +020013030if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_STRUCT_TM_TM_ZONE 1
13034_ACEOF
13035
13036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013038
Martin v. Löwis11437992002-04-12 09:54:03 +000013039if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013042
13043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13045"
Victor Stinnere0be4232011-10-25 13:06:09 +020013046if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048else
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050fi
13051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054_ACEOF
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13057$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013058if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013062/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013063#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064#if !HAVE_DECL_TZNAME
13065extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013067
Martin v. Löwis11437992002-04-12 09:54:03 +000013068int
13069main ()
13070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 ;
13073 return 0;
13074}
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077 ac_cv_var_tzname=yes
13078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081rm -f core conftest.err conftest.$ac_objext \
13082 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13085$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013086 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090 fi
13091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093ac_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 +020013094if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
13096cat >>confdefs.h <<_ACEOF
13097#define HAVE_STRUCT_STAT_ST_RDEV 1
13098_ACEOF
13099
13100
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103ac_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 +020013104if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106cat >>confdefs.h <<_ACEOF
13107#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13108_ACEOF
13109
13110
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013111fi
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113ac_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 +020013114if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013115
13116cat >>confdefs.h <<_ACEOF
13117#define HAVE_STRUCT_STAT_ST_FLAGS 1
13118_ACEOF
13119
13120
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123ac_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 +020013124if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013125
13126cat >>confdefs.h <<_ACEOF
13127#define HAVE_STRUCT_STAT_ST_GEN 1
13128_ACEOF
13129
13130
13131fi
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133ac_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 +020013134if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013135
13136cat >>confdefs.h <<_ACEOF
13137#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13138_ACEOF
13139
13140
13141fi
13142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143ac_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 +020013144if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013145
Martin v. Löwis11437992002-04-12 09:54:03 +000013146cat >>confdefs.h <<_ACEOF
13147#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13148_ACEOF
13149
13150
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013151fi
13152
Stefan Krah267b6392016-04-26 01:09:18 +020013153ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13154 #include <sys/types.h>
13155 #include <pwd.h>
13156
13157"
13158if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13159
13160cat >>confdefs.h <<_ACEOF
13161#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13162_ACEOF
13163
13164
13165fi
13166ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13167 #include <sys/types.h>
13168 #include <pwd.h>
13169
13170"
13171if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13172
13173cat >>confdefs.h <<_ACEOF
13174#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13175_ACEOF
13176
13177
13178fi
13179
Zachary Ware6a6967e2016-10-01 00:47:27 -050013180# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13181ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13182"
13183if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13184
13185cat >>confdefs.h <<_ACEOF
13186#define HAVE_SIGINFO_T_SI_BAND 1
13187_ACEOF
13188
13189
13190fi
13191
Michael W. Hudson54241132001-12-07 15:38:26 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13194$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013195if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197else
Matthias Kloseb159a552010-04-25 21:00:44 +000013198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013200/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013201#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013202int
13203main ()
13204{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013211 ac_cv_header_time_altzone=yes
13212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013217fi
13218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13220$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224
13225fi
13226
Guido van Rossumda88dad1995-01-26 00:46:29 +000013227was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13229$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013232
13233#include <sys/types.h>
13234#include <sys/select.h>
13235#include <sys/time.h>
13236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013240;
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013250 was_it_defined=yes
13251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13255$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13258$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013264#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 ;
13270 return 0;
13271}
13272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274 ac_cv_struct_addrinfo=yes
13275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13282$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013286
13287fi
13288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13290$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013291if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013295/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013296
13297# include <sys/types.h>
13298# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013299int
13300main ()
13301{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013302struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ;
13304 return 0;
13305}
13306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308 ac_cv_struct_sockaddr_storage=yes
13309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13313fi
13314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13316$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013320
13321fi
13322
Christian Heimesdffa3942016-09-05 23:54:41 +020013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13324$as_echo_n "checking for sockaddr_alg... " >&6; }
13325if ${ac_cv_struct_sockaddr_alg+:} false; then :
13326 $as_echo_n "(cached) " >&6
13327else
13328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13329/* end confdefs.h. */
13330
13331# include <sys/types.h>
13332# include <sys/socket.h>
13333# include <linux/if_alg.h>
13334int
13335main ()
13336{
13337struct sockaddr_alg s
13338 ;
13339 return 0;
13340}
13341_ACEOF
13342if ac_fn_c_try_compile "$LINENO"; then :
13343 ac_cv_struct_sockaddr_alg=yes
13344else
13345 ac_cv_struct_sockaddr_alg=no
13346fi
13347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348fi
13349
13350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13351$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13352if test $ac_cv_struct_sockaddr_alg = yes; then
13353
13354$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13355
13356fi
13357
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13361$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013368int
13369main ()
13370{
13371static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013372test_array [0] = 0;
13373return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013374
13375 ;
13376 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013377}
Martin v. Löwis11437992002-04-12 09:54:03 +000013378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013380 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013381else
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13387$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
13391fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13394$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013395if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013399/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013406 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013408 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410 char const *const *pcpcc;
13411 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 /* NEC SVR4.0.2 mips cc rejects this. */
13413 struct point {int x, y;};
13414 static struct point const zero = {0,0};
13415 /* AIX XL C 1.02.0.0 rejects this.
13416 It does not let you subtract one const X* pointer from another in
13417 an arm of an if-expression whose if-part is not a constant
13418 expression */
13419 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 ++pcpcc;
13423 ppc = (char**) pcpcc;
13424 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013425 { /* SCO 3.2v4 cc rejects this sort of thing. */
13426 char tx;
13427 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 }
13433 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13434 int x[] = {25, 17};
13435 const int *foo = &x[0];
13436 ++foo;
13437 }
13438 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13439 typedef const int *iptr;
13440 iptr p = 0;
13441 ++p;
13442 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013443 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013445 struct s { int j; const int *ap[3]; } bx;
13446 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 }
13448 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13449 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013453#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ;
13456 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013457}
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460 ac_cv_c_const=yes
13461else
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13467$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471
13472fi
13473
Michael W. Hudson54241132001-12-07 15:38:26 +000013474
Guido van Rossumda88dad1995-01-26 00:46:29 +000013475works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13477$as_echo_n "checking for working signed char... " >&6; }
13478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 ;
13486 return 0;
13487}
13488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013489if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013490 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013491else
Skip Montanaro6dead952003-09-25 14:50:04 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013494
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013495
Guido van Rossum7f43da71994-08-01 12:15:30 +000013496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13499$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013500
Guido van Rossumda88dad1995-01-26 00:46:29 +000013501have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13503$as_echo_n "checking for prototypes... " >&6; }
13504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013506int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013507int
13508main ()
13509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 ;
13512 return 0;
13513}
13514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Matthias Kloseb159a552010-04-25 21:00:44 +000013519 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13523$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524
Guido van Rossumda88dad1995-01-26 00:46:29 +000013525works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13527$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013530
13531#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013532int foo(int x, ...) {
13533 va_list va;
13534 va_start(va, x);
13535 va_arg(va, int);
13536 va_arg(va, char *);
13537 va_arg(va, double);
13538 return 0;
13539}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013540
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Guido van Rossum90eea071996-08-30 20:58:57 +000013544return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ;
13546 return 0;
13547}
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013554 works=yes
13555
Guido van Rossum627b2d71993-12-24 10:39:16 +000013556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13559$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013560
Martin v. Löwisd6320502004-08-12 13:45:08 +000013561# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13563$as_echo_n "checking for socketpair... " >&6; }
13564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013565/* end confdefs.h. */
13566
13567#include <sys/types.h>
13568#include <sys/socket.h>
13569
13570int
13571main ()
13572{
13573void *x=socketpair
13574 ;
13575 return 0;
13576}
13577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013581
Matthias Kloseb159a552010-04-25 21:00:44 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013583$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13586$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013587
13588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013590
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013591# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13593$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013595/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596#include <sys/types.h>
13597#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013598int
13599main ()
13600{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601struct sockaddr x;
13602x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 ;
13604 return 0;
13605}
13606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013607if ac_fn_c_try_compile "$LINENO"; then :
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13609$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612
13613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13615$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013616
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013620# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013624if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13629$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630 OLD_CFLAGS=$CFLAGS
13631 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013633/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013634
13635# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637int
13638main ()
13639{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013640
13641 char *name;
13642 struct hostent *he, *res;
13643 char buffer[2048];
13644 int buflen = 2048;
13645 int h_errnop;
13646
13647 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
13649 ;
13650 return 0;
13651}
13652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013656
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13661$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013663else
Skip Montanaro6dead952003-09-25 14:50:04 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13666$as_echo "no" >&6; }
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13668$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013670/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013671
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013672# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674int
13675main ()
13676{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013677
13678 char *name;
13679 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013680 char buffer[2048];
13681 int buflen = 2048;
13682 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013683
Matthias Kloseb159a552010-04-25 21:00:44 +000013684 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
13686 ;
13687 return 0;
13688}
13689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Matthias Kloseb159a552010-04-25 21:00:44 +000013695$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13698$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013700else
Skip Montanaro6dead952003-09-25 14:50:04 +000013701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13703$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13705$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13707/* end confdefs.h. */
13708
13709# include <netdb.h>
13710
13711int
13712main ()
13713{
13714
13715 char *name;
13716 struct hostent *he;
13717 struct hostent_data data;
13718
13719 (void) gethostbyname_r(name, he, &data);
13720
13721 ;
13722 return 0;
13723}
13724_ACEOF
13725if ac_fn_c_try_compile "$LINENO"; then :
13726
13727 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13728
13729
13730$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13731
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13733$as_echo "yes" >&6; }
13734
13735else
13736
13737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13738$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748 CFLAGS=$OLD_CFLAGS
13749
13750else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 for ac_func in gethostbyname
13753do :
13754 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013755if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013757#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013758_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013761done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013762
Michael W. Hudson54241132001-12-07 15:38:26 +000013763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013764fi
13765
Michael W. Hudson54241132001-12-07 15:38:26 +000013766
13767
13768
13769
13770
13771
Guido van Rossum627b2d71993-12-24 10:39:16 +000013772# checks for system services
13773# (none yet)
13774
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013776ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013777if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013778
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013779else
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13781$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013782if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013786LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790/* Override any GCC internal prototype to avoid an error.
13791 Use char because int might match the return type of a GCC
13792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013793#ifdef __cplusplus
13794extern "C"
13795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013796char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013797int
13798main ()
13799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 ;
13802 return 0;
13803}
13804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013807else
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013810rm -f core conftest.err conftest.$ac_objext \
13811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013812LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13815$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013816if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 cat >>confdefs.h <<_ACEOF
13818#define HAVE_LIBIEEE 1
13819_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013821 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822
Guido van Rossum627b2d71993-12-24 10:39:16 +000013823fi
13824
Michael W. Hudson54241132001-12-07 15:38:26 +000013825
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013826fi
13827
Michael W. Hudson54241132001-12-07 15:38:26 +000013828
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829# check for --with-libm=...
13830
Guido van Rossum563e7081996-09-10 18:20:48 +000013831case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013832Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013833*) LIBM=-lm
13834esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13836$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013839if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013841if test "$withval" = no
13842then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13844$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013845elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13848$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013849else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013850fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013851else
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13853$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854fi
13855
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856
13857# check for --with-libc=...
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13860$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013865if test "$withval" = no
13866then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13868$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013869elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013870then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13872$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013873else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013874fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13877$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878fi
13879
Guido van Rossum7f43da71994-08-01 12:15:30 +000013880
Stefan Krah1919b7e2012-03-21 18:25:23 +010013881# **************************************
13882# * Check for gcc x64 inline assembler *
13883# **************************************
13884
13885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13886$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13888/* end confdefs.h. */
13889
13890int
13891main ()
13892{
13893
13894 __asm__ __volatile__ ("movq %rcx, %rax");
13895
13896 ;
13897 return 0;
13898}
13899_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013900if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013901 have_gcc_asm_for_x64=yes
13902else
13903 have_gcc_asm_for_x64=no
13904fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013905rm -f core conftest.err conftest.$ac_objext \
13906 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13908$as_echo "$have_gcc_asm_for_x64" >&6; }
13909if test "$have_gcc_asm_for_x64" = yes
13910then
13911
13912$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13913
13914fi
13915
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013916# **************************************************
13917# * Check for various properties of floating point *
13918# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13921$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013922if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924else
13925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927 ac_cv_little_endian_double=no
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930/* end confdefs.h. */
13931
13932#include <string.h>
13933int main() {
13934 double x = 9006104071832581.0;
13935 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13936 return 0;
13937 else
13938 return 1;
13939}
13940
13941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013942if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013943 ac_cv_little_endian_double=yes
13944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949fi
13950
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951fi
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13954$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955if test "$ac_cv_little_endian_double" = yes
13956then
13957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013959
13960fi
13961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13963$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013964if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966else
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969 ac_cv_big_endian_double=no
13970else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013972/* end confdefs.h. */
13973
13974#include <string.h>
13975int main() {
13976 double x = 9006104071832581.0;
13977 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13978 return 0;
13979 else
13980 return 1;
13981}
13982
13983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013984if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985 ac_cv_big_endian_double=yes
13986else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013991fi
13992
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993fi
13994
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13996$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997if test "$ac_cv_big_endian_double" = yes
13998then
13999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001
14002fi
14003
14004# Some ARM platforms use a mixed-endian representation for doubles.
14005# While Python doesn't currently have full support for these platforms
14006# (see e.g., issue 1762561), we can at least make sure that float <-> string
14007# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14009$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014010if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014012else
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015 ac_cv_mixed_endian_double=no
14016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018/* end confdefs.h. */
14019
14020#include <string.h>
14021int main() {
14022 double x = 9006104071832581.0;
14023 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14024 return 0;
14025 else
14026 return 1;
14027}
14028
14029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014030if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031 ac_cv_mixed_endian_double=yes
14032else
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014037fi
14038
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014039fi
14040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14042$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043if test "$ac_cv_mixed_endian_double" = yes
14044then
14045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014047
14048fi
14049
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014050# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014051# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014052# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014053# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014054# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014055# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014056
14057# This inline assembler syntax may also work for suncc and icc,
14058# so we try it on all platforms.
14059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14061$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063/* end confdefs.h. */
14064
14065int
14066main ()
14067{
14068
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069 unsigned short cw;
14070 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14071 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072
14073 ;
14074 return 0;
14075}
14076_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014077if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078 have_gcc_asm_for_x87=yes
14079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014081fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014082rm -f core conftest.err conftest.$ac_objext \
14083 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14085$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014086if test "$have_gcc_asm_for_x87" = yes
14087then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014092
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14094$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14096/* end confdefs.h. */
14097
14098int
14099main ()
14100{
14101
14102 unsigned int fpcr;
14103 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14104 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14105
14106 ;
14107 return 0;
14108}
14109_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014110if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014111 have_gcc_asm_for_mc68881=yes
14112else
14113 have_gcc_asm_for_mc68881=no
14114fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014115rm -f core conftest.err conftest.$ac_objext \
14116 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14118$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14119if test "$have_gcc_asm_for_mc68881" = yes
14120then
14121
14122$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14123
14124fi
14125
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014126# Detect whether system arithmetic is subject to x87-style double
14127# rounding issues. The result of this test has little meaning on non
14128# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14129# mode is round-to-nearest and double rounding issues are present, and
14130# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14132$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014133# $BASECFLAGS may affect the result
14134ac_save_cc="$CC"
14135CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014137 ac_cv_x87_double_rounding=no
14138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014140/* end confdefs.h. */
14141
14142#include <stdlib.h>
14143#include <math.h>
14144int main() {
14145 volatile double x, y, z;
14146 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14147 x = 0.99999999999999989; /* 1-2**-53 */
14148 y = 1./x;
14149 if (y != 1.)
14150 exit(0);
14151 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14152 x = 1e16;
14153 y = 2.99999;
14154 z = x + y;
14155 if (z != 1e16+4.)
14156 exit(0);
14157 /* both tests show evidence of double rounding */
14158 exit(1);
14159}
14160
14161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014162if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014163 ac_cv_x87_double_rounding=no
14164else
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014169fi
14170
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014171CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14173$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014174if test "$ac_cv_x87_double_rounding" = yes
14175then
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178
14179fi
14180
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014181# ************************************
14182# * Check for mathematical functions *
14183# ************************************
14184
14185LIBS_SAVE=$LIBS
14186LIBS="$LIBS $LIBM"
14187
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14189do :
14190 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14191ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014192if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014193 cat >>confdefs.h <<_ACEOF
14194#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14195_ACEOF
14196
14197fi
14198done
14199
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014200for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014201do :
14202 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14203ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014204if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014205 cat >>confdefs.h <<_ACEOF
14206#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14207_ACEOF
14208
14209fi
14210done
14211
14212ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14213"
Victor Stinnere0be4232011-10-25 13:06:09 +020014214if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014215 ac_have_decl=1
14216else
14217 ac_have_decl=0
14218fi
14219
14220cat >>confdefs.h <<_ACEOF
14221#define HAVE_DECL_ISINF $ac_have_decl
14222_ACEOF
14223ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14224"
Victor Stinnere0be4232011-10-25 13:06:09 +020014225if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226 ac_have_decl=1
14227else
14228 ac_have_decl=0
14229fi
14230
14231cat >>confdefs.h <<_ACEOF
14232#define HAVE_DECL_ISNAN $ac_have_decl
14233_ACEOF
14234ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14235"
Victor Stinnere0be4232011-10-25 13:06:09 +020014236if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014237 ac_have_decl=1
14238else
14239 ac_have_decl=0
14240fi
14241
14242cat >>confdefs.h <<_ACEOF
14243#define HAVE_DECL_ISFINITE $ac_have_decl
14244_ACEOF
14245
14246
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014247# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14248# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14250$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014251if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014253else
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014256 ac_cv_tanh_preserves_zero_sign=no
14257else
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014259/* end confdefs.h. */
14260
14261#include <math.h>
14262#include <stdlib.h>
14263int main() {
14264 /* return 0 if either negative zeros don't exist
14265 on this platform or if negative zeros exist
14266 and tanh(-0.) == -0. */
14267 if (atan2(0., -1.) == atan2(-0., -1.) ||
14268 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14269 else exit(1);
14270}
14271
14272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014273if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014274 ac_cv_tanh_preserves_zero_sign=yes
14275else
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014280fi
14281
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014282fi
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14285$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014286if test "$ac_cv_tanh_preserves_zero_sign" = yes
14287then
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014290
14291fi
14292
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014293if test "$ac_cv_func_log1p" = yes
14294then
14295 # On some versions of AIX, log1p(-0.) returns 0. instead of
14296 # -0. See issue #9920.
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14298$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014299 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014300 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014301else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014302
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014303 if test "$cross_compiling" = yes; then :
14304 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014305else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14307/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014308
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014309 #include <math.h>
14310 #include <stdlib.h>
14311 int main() {
14312 /* Fail if the signs of log1p(-0.) and -0. can be
14313 distinguished. */
14314 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14315 return 0;
14316 else
14317 return 1;
14318 }
14319
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014320_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014321if ac_fn_c_try_run "$LINENO"; then :
14322 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014323else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014324 ac_cv_log1p_drops_zero_sign=yes
14325fi
14326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014328fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014329
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014330fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014331
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14333$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14334fi
14335if test "$ac_cv_log1p_drops_zero_sign" = yes
14336then
14337
14338$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14339
14340fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014341
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014342LIBS=$LIBS_SAVE
14343
Mark Dickinsona614f042009-11-28 12:48:43 +000014344# For multiprocessing module, check that sem_open
14345# actually works. For FreeBSD versions <= 7.2,
14346# the kernel module that provides POSIX semaphores
14347# isn't loaded by default, so an attempt to call
14348# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14350$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014351if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014355 ac_cv_posix_semaphores_enabled=yes
14356else
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014358/* end confdefs.h. */
14359
14360#include <unistd.h>
14361#include <fcntl.h>
14362#include <stdio.h>
14363#include <semaphore.h>
14364#include <sys/stat.h>
14365
14366int main(void) {
14367 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14368 if (a == SEM_FAILED) {
14369 perror("sem_open");
14370 return 1;
14371 }
14372 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014373 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014374 return 0;
14375}
14376
14377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014378if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014379 ac_cv_posix_semaphores_enabled=yes
14380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14384 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014385fi
14386
14387
Mark Dickinsona614f042009-11-28 12:48:43 +000014388fi
14389
Matthias Kloseb9621712010-04-24 17:59:49 +000014390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14391$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014392if test $ac_cv_posix_semaphores_enabled = no
14393then
14394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014396
14397fi
14398
Mark Dickinson10683072009-04-18 21:18:19 +000014399# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14401$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014402if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014406 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014409/* end confdefs.h. */
14410
14411#include <unistd.h>
14412#include <fcntl.h>
14413#include <stdio.h>
14414#include <semaphore.h>
14415#include <sys/stat.h>
14416
14417int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014418 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014419 int count;
14420 int res;
14421 if(a==SEM_FAILED){
14422 perror("sem_open");
14423 return 1;
14424
14425 }
14426 res = sem_getvalue(a, &count);
14427 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014428 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014429 return res==-1 ? 1 : 0;
14430}
14431
Mark Dickinson10683072009-04-18 21:18:19 +000014432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014433if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014434 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014435else
Matthias Kloseb9621712010-04-24 17:59:49 +000014436 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014440fi
14441
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014442
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14446$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447if test $ac_cv_broken_sem_getvalue = yes
14448then
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014451
14452fi
14453
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014454ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14455"
14456if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14457 ac_have_decl=1
14458else
14459 ac_have_decl=0
14460fi
14461
14462cat >>confdefs.h <<_ACEOF
14463#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14464_ACEOF
14465ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14466"
14467if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14468 ac_have_decl=1
14469else
14470 ac_have_decl=0
14471fi
14472
14473cat >>confdefs.h <<_ACEOF
14474#define HAVE_DECL_RTLD_NOW $ac_have_decl
14475_ACEOF
14476ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14477"
14478if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14479 ac_have_decl=1
14480else
14481 ac_have_decl=0
14482fi
14483
14484cat >>confdefs.h <<_ACEOF
14485#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14486_ACEOF
14487ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14488"
14489if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14490 ac_have_decl=1
14491else
14492 ac_have_decl=0
14493fi
14494
14495cat >>confdefs.h <<_ACEOF
14496#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14497_ACEOF
14498ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14499"
14500if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14501 ac_have_decl=1
14502else
14503 ac_have_decl=0
14504fi
14505
14506cat >>confdefs.h <<_ACEOF
14507#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14508_ACEOF
14509ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14510"
14511if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14512 ac_have_decl=1
14513else
14514 ac_have_decl=0
14515fi
14516
14517cat >>confdefs.h <<_ACEOF
14518#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14519_ACEOF
14520ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14521"
14522if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14523 ac_have_decl=1
14524else
14525 ac_have_decl=0
14526fi
14527
14528cat >>confdefs.h <<_ACEOF
14529#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14530_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014531ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14532"
14533if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14534 ac_have_decl=1
14535else
14536 ac_have_decl=0
14537fi
14538
14539cat >>confdefs.h <<_ACEOF
14540#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14541_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014542
14543
Mark Dickinsonbd792642009-03-18 20:06:12 +000014544# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14546$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014547# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014548if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014549 enableval=$enable_big_digits; case $enable_big_digits in
14550yes)
14551 enable_big_digits=30 ;;
14552no)
14553 enable_big_digits=15 ;;
1455415|30)
14555 ;;
14556*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014557 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 +000014558esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14560$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014561
14562cat >>confdefs.h <<_ACEOF
14563#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14564_ACEOF
14565
14566
14567else
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14569$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014570fi
14571
14572
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014574ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014575if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014576
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014580 wchar_h="yes"
14581
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584
14585fi
14586
Michael W. Hudson54241132001-12-07 15:38:26 +000014587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014589# determine wchar_t size
14590if test "$wchar_h" = yes
14591then
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14595# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14597$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014598if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014600else
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14602"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
Martin v. Löwis11437992002-04-12 09:54:03 +000014604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 if test "$ac_cv_type_wchar_t" = yes; then
14606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014608as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014609See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610 else
14611 ac_cv_sizeof_wchar_t=0
14612 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14617$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618
14619
14620
Martin v. Löwis11437992002-04-12 09:54:03 +000014621cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014622#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014623_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014624
Michael W. Hudson54241132001-12-07 15:38:26 +000014625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014626fi
14627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14629$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014630have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014632/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014633
14634#include <tcl.h>
14635#if TCL_UTF_MAX != 6
14636# error "NOT UCS4_TCL"
14637#endif
14638int
14639main ()
14640{
14641
14642 ;
14643 return 0;
14644}
14645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014647
14648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014650
14651 have_ucs4_tcl=yes
14652
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14656$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014657
Skip Montanaro6dead952003-09-25 14:50:04 +000014658# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014659if test "$wchar_h" = yes
14660then
14661 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14663$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014664 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014666else
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014669 ac_cv_wchar_t_signed=yes
14670else
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014672/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014673
14674 #include <wchar.h>
14675 int main()
14676 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014677 /* Success: exit code 0 */
14678 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014679 }
14680
14681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014682if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014683 ac_cv_wchar_t_signed=yes
14684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014689fi
14690
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014691fi
14692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14694$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695fi
14696
Georg Brandl52d168a2008-01-07 18:10:24 +000014697# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014698if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014699 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014700then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014701 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Georg Brandl52d168a2008-01-07 18:10:24 +000014705else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014706 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014707fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14709$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710
14711# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14713$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014714if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 ac_cv_c_bigendian=unknown
14718 # See if we're dealing with a universal compiler.
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720/* end confdefs.h. */
14721#ifndef __APPLE_CC__
14722 not a universal capable compiler
14723 #endif
14724 typedef int dummy;
14725
Skip Montanaro6dead952003-09-25 14:50:04 +000014726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727if ac_fn_c_try_compile "$LINENO"; then :
14728
14729 # Check for potential -arch flags. It is not universal unless
14730 # there are at least two -arch flags with different values.
14731 ac_arch=
14732 ac_prev=
14733 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14734 if test -n "$ac_prev"; then
14735 case $ac_word in
14736 i?86 | x86_64 | ppc | ppc64)
14737 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14738 ac_arch=$ac_word
14739 else
14740 ac_cv_c_bigendian=universal
14741 break
14742 fi
14743 ;;
14744 esac
14745 ac_prev=
14746 elif test "x$ac_word" = "x-arch"; then
14747 ac_prev=arch
14748 fi
14749 done
14750fi
14751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14752 if test $ac_cv_c_bigendian = unknown; then
14753 # See if sys/param.h defines the BYTE_ORDER macro.
14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014755/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014756#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014758
Martin v. Löwis11437992002-04-12 09:54:03 +000014759int
14760main ()
14761{
Matthias Kloseb9621712010-04-24 17:59:49 +000014762#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14763 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14764 && LITTLE_ENDIAN)
14765 bogus endian macros
14766 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
14768 ;
14769 return 0;
14770}
14771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014772if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014773 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014775/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014776#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014778
Martin v. Löwis11437992002-04-12 09:54:03 +000014779int
14780main ()
14781{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014782#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 not big endian
14784 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
14786 ;
14787 return 0;
14788}
14789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014790if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014791 ac_cv_c_bigendian=yes
14792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014796fi
14797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14798 fi
14799 if test $ac_cv_c_bigendian = unknown; then
14800 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014803#include <limits.h>
14804
Martin v. Löwis11437992002-04-12 09:54:03 +000014805int
14806main ()
14807{
Matthias Kloseb9621712010-04-24 17:59:49 +000014808#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14809 bogus endian macros
14810 #endif
14811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 ;
14813 return 0;
14814}
14815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014816if ac_fn_c_try_compile "$LINENO"; then :
14817 # It does; now see whether it defined to _BIG_ENDIAN or not.
14818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14819/* end confdefs.h. */
14820#include <limits.h>
14821
14822int
14823main ()
14824{
14825#ifndef _BIG_ENDIAN
14826 not big endian
14827 #endif
14828
14829 ;
14830 return 0;
14831}
14832_ACEOF
14833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839fi
14840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14841 fi
14842 if test $ac_cv_c_bigendian = unknown; then
14843 # Compile a test program.
14844 if test "$cross_compiling" = yes; then :
14845 # Try to guess by grepping values from an object file.
14846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14847/* end confdefs.h. */
14848short int ascii_mm[] =
14849 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14850 short int ascii_ii[] =
14851 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14852 int use_ascii (int i) {
14853 return ascii_mm[i] + ascii_ii[i];
14854 }
14855 short int ebcdic_ii[] =
14856 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14857 short int ebcdic_mm[] =
14858 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14859 int use_ebcdic (int i) {
14860 return ebcdic_mm[i] + ebcdic_ii[i];
14861 }
14862 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864int
14865main ()
14866{
14867return use_ascii (foo) == use_ebcdic (foo);
14868 ;
14869 return 0;
14870}
14871_ACEOF
14872if ac_fn_c_try_compile "$LINENO"; then :
14873 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14874 ac_cv_c_bigendian=yes
14875 fi
14876 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14877 if test "$ac_cv_c_bigendian" = unknown; then
14878 ac_cv_c_bigendian=no
14879 else
14880 # finding both strings is unlikely to happen, but who knows?
14881 ac_cv_c_bigendian=unknown
14882 fi
14883 fi
14884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014886else
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014888/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014890int
14891main ()
14892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 /* Are we little or big endian? From Harbison&Steele. */
14895 union
14896 {
14897 long int l;
14898 char c[sizeof (long int)];
14899 } u;
14900 u.l = 1;
14901 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902
14903 ;
14904 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014905}
Martin v. Löwis11437992002-04-12 09:54:03 +000014906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014907if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014908 ac_cv_c_bigendian=no
14909else
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14919$as_echo "$ac_cv_c_bigendian" >&6; }
14920 case $ac_cv_c_bigendian in #(
14921 yes)
14922 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14923;; #(
14924 no)
14925 ;; #(
14926 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 ;; #(
14931 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014932 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014933 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935
Michael W. Hudson54241132001-12-07 15:38:26 +000014936
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014937# ABI version string for Python extension modules. This appears between the
14938# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14939# from the following attributes which affect the ABI of this Python build (in
14940# this order):
14941#
14942# * The Python implementation (always 'cpython-' for us)
14943# * The major and minor version numbers
14944# * --with-pydebug (adds a 'd')
14945# * --with-pymalloc (adds a 'm')
14946# * --with-wide-unicode (adds a 'u')
14947#
14948# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014949# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14950# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014951
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14953$as_echo_n "checking ABIFLAGS... " >&6; }
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14955$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14957$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014958SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14960$as_echo "$SOABI" >&6; }
14961
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014962
14963case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014964 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014965 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14966 *)
14967 EXT_SUFFIX=${SHLIB_SUFFIX};;
14968esac
14969
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14971$as_echo_n "checking LDVERSION... " >&6; }
14972LDVERSION='$(VERSION)$(ABIFLAGS)'
14973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14974$as_echo "$LDVERSION" >&6; }
14975
doko@python.org87421192013-01-26 11:39:31 +010014976
doko@ubuntu.com55532312016-06-14 08:55:19 +020014977if test x$PLATFORM_TRIPLET = x; then
14978 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14979else
14980 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14981fi
doko@python.org87421192013-01-26 11:39:31 +010014982
14983
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014984# Check whether right shifting a negative integer extends the sign bit
14985# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14987$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014988if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014990else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014993 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014997
14998int main()
14999{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015000 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015001}
15002
Martin v. Löwis11437992002-04-12 09:54:03 +000015003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015004if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015005 ac_cv_rshift_extends_sign=yes
15006else
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015011fi
15012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013fi
15014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15016$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015017if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015018then
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015021
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015022fi
15023
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015024# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15026$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015027if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015029else
Martin v. Löwis11437992002-04-12 09:54:03 +000015030
Matthias Kloseb9621712010-04-24 17:59:49 +000015031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015032/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015033#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015034int
15035main ()
15036{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015037
15038 FILE *f = fopen("/dev/null", "r");
15039 flockfile(f);
15040 getc_unlocked(f);
15041 funlockfile(f);
15042
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015047if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015048 ac_cv_have_getc_unlocked=yes
15049else
Matthias Kloseb9621712010-04-24 17:59:49 +000015050 ac_cv_have_getc_unlocked=no
15051fi
15052rm -f core conftest.err conftest.$ac_objext \
15053 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055
Matthias Kloseb9621712010-04-24 17:59:49 +000015056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15057$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015058if test "$ac_cv_have_getc_unlocked" = yes
15059then
Martin v. Löwis11437992002-04-12 09:54:03 +000015060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015062
15063fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015064
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015065# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015066# save the value of LIBS so we don't actually link Python with readline
15067LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015068
Gregory P. Smith18820942008-09-07 06:24:49 +000015069# On some systems we need to link readline to a termcap compatible
15070# library. NOTE: Keep the precedence of listed libraries synchronised
15071# with setup.py.
15072py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15074$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015075for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015076 if test -z "$py_libtermcap"; then
15077 READLINE_LIBS="-lreadline"
15078 else
15079 READLINE_LIBS="-lreadline -l$py_libtermcap"
15080 fi
15081 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015083/* end confdefs.h. */
15084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085/* Override any GCC internal prototype to avoid an error.
15086 Use char because int might match the return type of a GCC
15087 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015088#ifdef __cplusplus
15089extern "C"
15090#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015091char readline ();
15092int
15093main ()
15094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015096 ;
15097 return 0;
15098}
15099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015100if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015101 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015103rm -f core conftest.err conftest.$ac_objext \
15104 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015105 if test $py_cv_lib_readline = yes; then
15106 break
15107 fi
15108done
15109# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15110#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015111if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15113$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015114else
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15116$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015117
Matthias Kloseb9621712010-04-24 17:59:49 +000015118$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015119
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015120fi
15121
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015122# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015124/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015125#include <readline/readline.h>
15126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015128 have_readline=yes
15129else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015130 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015131
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015132fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015134if test $have_readline = yes
15135then
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015137/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015138#include <readline/readline.h>
15139
15140_ACEOF
15141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015145
15146fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015147rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015150/* end confdefs.h. */
15151#include <readline/readline.h>
15152
15153_ACEOF
15154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015158
15159fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015160rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015161
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015162fi
15163
Martin v. Löwis0daad592001-09-30 21:09:59 +000015164# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15166$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015167if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015169else
Martin v. Löwis11437992002-04-12 09:54:03 +000015170 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015171LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175/* Override any GCC internal prototype to avoid an error.
15176 Use char because int might match the return type of a GCC
15177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015178#ifdef __cplusplus
15179extern "C"
15180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015181char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015182int
15183main ()
15184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ;
15187 return 0;
15188}
15189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015192else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015195rm -f core conftest.err conftest.$ac_objext \
15196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015197LIBS=$ac_check_lib_save_LIBS
15198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15200$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015201if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015204
Martin v. Löwis0daad592001-09-30 21:09:59 +000015205fi
15206
Michael W. Hudson54241132001-12-07 15:38:26 +000015207
Thomas Wouters89d996e2007-09-08 17:39:28 +000015208# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15210$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015211if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015213else
15214 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015215LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015217/* end confdefs.h. */
15218
15219/* Override any GCC internal prototype to avoid an error.
15220 Use char because int might match the return type of a GCC
15221 builtin and then its argument prototype would still apply. */
15222#ifdef __cplusplus
15223extern "C"
15224#endif
15225char rl_completion_display_matches_hook ();
15226int
15227main ()
15228{
15229return rl_completion_display_matches_hook ();
15230 ;
15231 return 0;
15232}
15233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015234if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015235 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15236else
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015239rm -f core conftest.err conftest.$ac_objext \
15240 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015241LIBS=$ac_check_lib_save_LIBS
15242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15244$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015245if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015246
Matthias Kloseb9621712010-04-24 17:59:49 +000015247$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015248
15249fi
15250
15251
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015252# also in 4.0, but not in editline
15253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15254$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15255if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15256 $as_echo_n "(cached) " >&6
15257else
15258 ac_check_lib_save_LIBS=$LIBS
15259LIBS="-lreadline $READLINE_LIBS $LIBS"
15260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261/* end confdefs.h. */
15262
15263/* Override any GCC internal prototype to avoid an error.
15264 Use char because int might match the return type of a GCC
15265 builtin and then its argument prototype would still apply. */
15266#ifdef __cplusplus
15267extern "C"
15268#endif
15269char rl_resize_terminal ();
15270int
15271main ()
15272{
15273return rl_resize_terminal ();
15274 ;
15275 return 0;
15276}
15277_ACEOF
15278if ac_fn_c_try_link "$LINENO"; then :
15279 ac_cv_lib_readline_rl_resize_terminal=yes
15280else
15281 ac_cv_lib_readline_rl_resize_terminal=no
15282fi
15283rm -f core conftest.err conftest.$ac_objext \
15284 conftest$ac_exeext conftest.$ac_ext
15285LIBS=$ac_check_lib_save_LIBS
15286fi
15287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15288$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15289if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15290
15291$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15292
15293fi
15294
15295
Martin v. Löwis0daad592001-09-30 21:09:59 +000015296# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15298$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015299if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015301else
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015303LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307/* Override any GCC internal prototype to avoid an error.
15308 Use char because int might match the return type of a GCC
15309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015310#ifdef __cplusplus
15311extern "C"
15312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015313char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015314int
15315main ()
15316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 ;
15319 return 0;
15320}
15321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015327rm -f core conftest.err conftest.$ac_objext \
15328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015329LIBS=$ac_check_lib_save_LIBS
15330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15332$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015333if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015336
Guido van Rossum353ae582001-07-10 16:45:32 +000015337fi
15338
Jack Jansendd19cf82001-12-06 22:36:17 +000015339
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015340# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015342/* end confdefs.h. */
15343#include <readline/readline.h>
15344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015345if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015346 have_readline=yes
15347else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015348 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015349
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015350fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015351rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015352if test $have_readline = yes
15353then
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015355/* end confdefs.h. */
15356#include <readline/readline.h>
15357
15358_ACEOF
15359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015363
15364fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015365rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015366
15367fi
15368
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15370$as_echo_n "checking for append_history in -lreadline... " >&6; }
15371if ${ac_cv_lib_readline_append_history+:} false; then :
15372 $as_echo_n "(cached) " >&6
15373else
15374 ac_check_lib_save_LIBS=$LIBS
15375LIBS="-lreadline $READLINE_LIBS $LIBS"
15376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15377/* end confdefs.h. */
15378
15379/* Override any GCC internal prototype to avoid an error.
15380 Use char because int might match the return type of a GCC
15381 builtin and then its argument prototype would still apply. */
15382#ifdef __cplusplus
15383extern "C"
15384#endif
15385char append_history ();
15386int
15387main ()
15388{
15389return append_history ();
15390 ;
15391 return 0;
15392}
15393_ACEOF
15394if ac_fn_c_try_link "$LINENO"; then :
15395 ac_cv_lib_readline_append_history=yes
15396else
15397 ac_cv_lib_readline_append_history=no
15398fi
15399rm -f core conftest.err conftest.$ac_objext \
15400 conftest$ac_exeext conftest.$ac_ext
15401LIBS=$ac_check_lib_save_LIBS
15402fi
15403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15404$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15405if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15406
15407$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15408
15409fi
15410
15411
Martin v. Löwis82bca632006-02-10 20:49:30 +000015412# End of readline checks: restore LIBS
15413LIBS=$LIBS_no_readline
15414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15416$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015417if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015419else
Martin v. Löwis11437992002-04-12 09:54:03 +000015420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015422 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015423else
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015426
15427int main()
15428{
15429 int val1 = nice(1);
15430 if (val1 != -1 && val1 == nice(2))
15431 exit(0);
15432 exit(1);
15433}
15434
Martin v. Löwis11437992002-04-12 09:54:03 +000015435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015436if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015437 ac_cv_broken_nice=yes
15438else
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15442 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015443fi
15444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445fi
15446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15448$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015449if test "$ac_cv_broken_nice" = yes
15450then
Martin v. Löwis11437992002-04-12 09:54:03 +000015451
Matthias Kloseb9621712010-04-24 17:59:49 +000015452$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015453
15454fi
15455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15457$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015458if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015460else
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015462 ac_cv_broken_poll=no
15463else
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015465/* end confdefs.h. */
15466
15467#include <poll.h>
15468
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015469int main()
15470{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015471 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015472 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015473
15474 close (42);
15475
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015476 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015477 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015478 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015479 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015480 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015481 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015482 return 1;
15483}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015484
15485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015486if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015487 ac_cv_broken_poll=yes
15488else
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015495fi
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15498$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015499if test "$ac_cv_broken_poll" = yes
15500then
15501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015503
15504fi
15505
Brett Cannon43802422005-02-10 20:48:03 +000015506# 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 +000015507# (which is not required by ISO C or UNIX spec) and/or if we support
15508# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015509ac_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 +000015510#include <$ac_cv_struct_tm>
15511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512"
Victor Stinnere0be4232011-10-25 13:06:09 +020015513if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015514
15515cat >>confdefs.h <<_ACEOF
15516#define HAVE_STRUCT_TM_TM_ZONE 1
15517_ACEOF
15518
15519
15520fi
15521
15522if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015525
15526else
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15528"
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531else
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533fi
15534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015536#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537_ACEOF
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15540$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015541if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015545/* end confdefs.h. */
15546#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547#if !HAVE_DECL_TZNAME
15548extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015549#endif
15550
15551int
15552main ()
15553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015555 ;
15556 return 0;
15557}
15558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015559if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015560 ac_cv_var_tzname=yes
15561else
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015564rm -f core conftest.err conftest.$ac_objext \
15565 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15568$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015569 if test $ac_cv_var_tzname = yes; then
15570
Matthias Kloseb9621712010-04-24 17:59:49 +000015571$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015572
15573 fi
15574fi
15575
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015576
Martin v. Löwis1d459062005-03-14 21:23:33 +000015577# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15579$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015580if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015582else
15583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015585 ac_cv_working_tzset=no
15586else
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015588/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015589
15590#include <stdlib.h>
15591#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015592#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015593
15594#if HAVE_TZNAME
15595extern char *tzname[];
15596#endif
15597
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015598int main()
15599{
Brett Cannon18367812003-09-19 00:59:16 +000015600 /* Note that we need to ensure that not only does tzset(3)
15601 do 'something' with localtime, but it works as documented
15602 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015603 This includes making sure that tzname is set properly if
15604 tm->tm_zone does not exist since it is the alternative way
15605 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015606
15607 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015608 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015609 */
15610
Martin v. Löwis1d459062005-03-14 21:23:33 +000015611 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015612 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15613
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015614 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015615 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015616 if (localtime(&groundhogday)->tm_hour != 0)
15617 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015618#if HAVE_TZNAME
15619 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15620 if (strcmp(tzname[0], "UTC") ||
15621 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15622 exit(1);
15623#endif
Brett Cannon18367812003-09-19 00:59:16 +000015624
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015625 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015626 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015627 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015628 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015629#if HAVE_TZNAME
15630 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15631 exit(1);
15632#endif
Brett Cannon18367812003-09-19 00:59:16 +000015633
15634 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15635 tzset();
15636 if (localtime(&groundhogday)->tm_hour != 11)
15637 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015638#if HAVE_TZNAME
15639 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15640 exit(1);
15641#endif
15642
15643#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015644 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15645 exit(1);
15646 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15647 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015648#endif
Brett Cannon18367812003-09-19 00:59:16 +000015649
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015650 exit(0);
15651}
15652
15653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015654if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015655 ac_cv_working_tzset=yes
15656else
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015661fi
15662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663fi
15664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15666$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015667if test "$ac_cv_working_tzset" = yes
15668then
15669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015671
15672fi
15673
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015674# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15676$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015677if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015679else
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015682#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015683int
15684main ()
15685{
15686
15687struct stat st;
15688st.st_mtim.tv_nsec = 1;
15689
15690 ;
15691 return 0;
15692}
15693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015695 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15700fi
15701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15703$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015704if test "$ac_cv_stat_tv_nsec" = yes
15705then
15706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015708
15709fi
15710
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015711# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15713$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015714if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015716else
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015718/* end confdefs.h. */
15719#include <sys/stat.h>
15720int
15721main ()
15722{
15723
15724struct stat st;
15725st.st_mtimespec.tv_nsec = 1;
15726
15727 ;
15728 return 0;
15729}
15730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015732 ac_cv_stat_tv_nsec2=yes
15733else
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15737fi
15738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15740$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015741if test "$ac_cv_stat_tv_nsec2" = yes
15742then
15743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015745
15746fi
15747
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015748# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015749ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015750if test "$cross_compiling" = no; then
15751 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15752fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015753
15754for ac_header in curses.h ncurses.h
15755do :
15756 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15757ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15759 cat >>confdefs.h <<_ACEOF
15760#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15761_ACEOF
15762
15763fi
15764
15765done
15766
15767
15768# On Solaris, term.h requires curses.h
15769for ac_header in term.h
15770do :
15771 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15772#ifdef HAVE_CURSES_H
15773#include <curses.h>
15774#endif
15775
15776"
15777if test "x$ac_cv_header_term_h" = xyes; then :
15778 cat >>confdefs.h <<_ACEOF
15779#define HAVE_TERM_H 1
15780_ACEOF
15781
15782fi
15783
15784done
15785
15786
Jack Jansen666b1e72001-10-31 12:11:48 +000015787# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15789$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015790if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015792else
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015794/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015795#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015796int
15797main ()
15798{
Jack Jansen666b1e72001-10-31 12:11:48 +000015799
15800 int rtn;
15801 rtn = mvwdelch(0,0,0);
15802
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 ;
15804 return 0;
15805}
15806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015807if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015808 ac_cv_mvwdelch_is_expression=yes
15809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15813fi
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15816$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015817
15818if test "$ac_cv_mvwdelch_is_expression" = yes
15819then
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015822
15823fi
15824
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015825# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15826# structs since version 5.7. If the macro is defined as zero before including
15827# [n]curses.h, ncurses will expose fields of the structs regardless of the
15828# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15830$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015831if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015836
15837 #define NCURSES_OPAQUE 0
15838 #include <curses.h>
15839
Martin v. Löwis11437992002-04-12 09:54:03 +000015840int
15841main ()
15842{
Jack Jansen666b1e72001-10-31 12:11:48 +000015843
15844 WINDOW *w;
15845 w->_flags = 0;
15846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 ;
15848 return 0;
15849}
15850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015851if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015852 ac_cv_window_has_flags=yes
15853else
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15857fi
15858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15860$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015861
Jack Jansen666b1e72001-10-31 12:11:48 +000015862
15863if test "$ac_cv_window_has_flags" = yes
15864then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865
Matthias Kloseb9621712010-04-24 17:59:49 +000015866$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015867
15868fi
15869
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15871$as_echo_n "checking for is_pad... " >&6; }
15872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15873/* end confdefs.h. */
15874#include <curses.h>
15875int
15876main ()
15877{
15878
15879#ifndef is_pad
15880void *x=is_pad
15881#endif
15882
15883 ;
15884 return 0;
15885}
15886_ACEOF
15887if ac_fn_c_try_compile "$LINENO"; then :
15888
15889$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15890
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15892$as_echo "yes" >&6; }
15893else
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15895$as_echo "no" >&6; }
15896
15897fi
15898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15901$as_echo_n "checking for is_term_resized... " >&6; }
15902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015903/* end confdefs.h. */
15904#include <curses.h>
15905int
15906main ()
15907{
15908void *x=is_term_resized
15909 ;
15910 return 0;
15911}
15912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015916
Matthias Kloseb159a552010-04-25 21:00:44 +000015917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015918$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919else
Matthias Kloseb9621712010-04-24 17:59:49 +000015920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015922
15923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15927$as_echo_n "checking for resize_term... " >&6; }
15928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015929/* end confdefs.h. */
15930#include <curses.h>
15931int
15932main ()
15933{
15934void *x=resize_term
15935 ;
15936 return 0;
15937}
15938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015939if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015942
Matthias Kloseb159a552010-04-25 21:00:44 +000015943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015944$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945else
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15947$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015948
15949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15953$as_echo_n "checking for resizeterm... " >&6; }
15954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015955/* end confdefs.h. */
15956#include <curses.h>
15957int
15958main ()
15959{
15960void *x=resizeterm
15961 ;
15962 return 0;
15963}
15964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015965if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968
Matthias Kloseb159a552010-04-25 21:00:44 +000015969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015970$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015971else
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15973$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015974
15975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015977
15978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15979$as_echo_n "checking for immedok... " >&6; }
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15981/* end confdefs.h. */
15982#include <curses.h>
15983int
15984main ()
15985{
15986
15987#ifndef immedok
15988void *x=immedok
15989#endif
15990
15991 ;
15992 return 0;
15993}
15994_ACEOF
15995if ac_fn_c_try_compile "$LINENO"; then :
15996
15997$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15998
15999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16000$as_echo "yes" >&6; }
16001else
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16003$as_echo "no" >&6; }
16004
16005fi
16006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16007
16008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16009$as_echo_n "checking for syncok... " >&6; }
16010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h. */
16012#include <curses.h>
16013int
16014main ()
16015{
16016
16017#ifndef syncok
16018void *x=syncok
16019#endif
16020
16021 ;
16022 return 0;
16023}
16024_ACEOF
16025if ac_fn_c_try_compile "$LINENO"; then :
16026
16027$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16028
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16030$as_echo "yes" >&6; }
16031else
16032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16033$as_echo "no" >&6; }
16034
16035fi
16036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16037
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16039$as_echo_n "checking for wchgat... " >&6; }
16040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16041/* end confdefs.h. */
16042#include <curses.h>
16043int
16044main ()
16045{
16046
16047#ifndef wchgat
16048void *x=wchgat
16049#endif
16050
16051 ;
16052 return 0;
16053}
16054_ACEOF
16055if ac_fn_c_try_compile "$LINENO"; then :
16056
16057$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16058
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16060$as_echo "yes" >&6; }
16061else
16062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16063$as_echo "no" >&6; }
16064
16065fi
16066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16067
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16069$as_echo_n "checking for filter... " >&6; }
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16071/* end confdefs.h. */
16072#include <curses.h>
16073int
16074main ()
16075{
16076
16077#ifndef filter
16078void *x=filter
16079#endif
16080
16081 ;
16082 return 0;
16083}
16084_ACEOF
16085if ac_fn_c_try_compile "$LINENO"; then :
16086
16087$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16088
16089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16090$as_echo "yes" >&6; }
16091else
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16093$as_echo "no" >&6; }
16094
16095fi
16096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16097
16098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16099$as_echo_n "checking for has_key... " >&6; }
16100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16101/* end confdefs.h. */
16102#include <curses.h>
16103int
16104main ()
16105{
16106
16107#ifndef has_key
16108void *x=has_key
16109#endif
16110
16111 ;
16112 return 0;
16113}
16114_ACEOF
16115if ac_fn_c_try_compile "$LINENO"; then :
16116
16117$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16118
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16120$as_echo "yes" >&6; }
16121else
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16123$as_echo "no" >&6; }
16124
16125fi
16126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16127
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16129$as_echo_n "checking for typeahead... " >&6; }
16130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16131/* end confdefs.h. */
16132#include <curses.h>
16133int
16134main ()
16135{
16136
16137#ifndef typeahead
16138void *x=typeahead
16139#endif
16140
16141 ;
16142 return 0;
16143}
16144_ACEOF
16145if ac_fn_c_try_compile "$LINENO"; then :
16146
16147$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16148
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16150$as_echo "yes" >&6; }
16151else
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16153$as_echo "no" >&6; }
16154
16155fi
16156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16157
16158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16159$as_echo_n "checking for use_env... " >&6; }
16160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16161/* end confdefs.h. */
16162#include <curses.h>
16163int
16164main ()
16165{
16166
16167#ifndef use_env
16168void *x=use_env
16169#endif
16170
16171 ;
16172 return 0;
16173}
16174_ACEOF
16175if ac_fn_c_try_compile "$LINENO"; then :
16176
16177$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16178
16179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16180$as_echo "yes" >&6; }
16181else
16182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16183$as_echo "no" >&6; }
16184
16185fi
16186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016187# last curses configure check
16188CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16191$as_echo "$as_me: checking for device files" >&6;}
16192
16193if test "x$cross_compiling" = xyes; then
16194 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16196$as_echo_n "checking for /dev/ptmx... " >&6; }
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16198$as_echo "not set" >&6; }
16199 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16200 fi
16201 if test "${ac_cv_file__dev_ptc+set}" != set; then
16202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16203$as_echo_n "checking for /dev/ptc... " >&6; }
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16205$as_echo "not set" >&6; }
16206 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16207 fi
16208fi
16209
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16211$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016212if ${ac_cv_file__dev_ptmx+:} false; then :
16213 $as_echo_n "(cached) " >&6
16214else
16215 test "$cross_compiling" = yes &&
16216 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16217if test -r "/dev/ptmx"; then
16218 ac_cv_file__dev_ptmx=yes
16219else
16220 ac_cv_file__dev_ptmx=no
16221fi
16222fi
16223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16224$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16225if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016226
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016227fi
16228
16229if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016232
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16235$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016236if ${ac_cv_file__dev_ptc+:} false; then :
16237 $as_echo_n "(cached) " >&6
16238else
16239 test "$cross_compiling" = yes &&
16240 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16241if test -r "/dev/ptc"; then
16242 ac_cv_file__dev_ptc=yes
16243else
16244 ac_cv_file__dev_ptc=no
16245fi
16246fi
16247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16248$as_echo "$ac_cv_file__dev_ptc" >&6; }
16249if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016250
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016251fi
16252
16253if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016254
Matthias Kloseb9621712010-04-24 17:59:49 +000016255$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016256
Neal Norwitz865400f2003-03-21 01:42:58 +000016257fi
16258
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016259if test $ac_sys_system = Darwin
16260then
16261 LIBS="$LIBS -framework CoreFoundation"
16262fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16265$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016266if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016267 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016268else
Matthias Kloseb9621712010-04-24 17:59:49 +000016269 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016270 ac_cv_have_size_t_format="cross -- assuming yes"
16271
Thomas Wouters477c8d52006-05-27 19:21:47 +000016272else
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016274/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016275
Thomas Wouters477c8d52006-05-27 19:21:47 +000016276#include <stdio.h>
16277#include <stddef.h>
16278#include <string.h>
16279
Christian Heimes2c181612007-12-17 20:04:13 +000016280#ifdef HAVE_SYS_TYPES_H
16281#include <sys/types.h>
16282#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016283
16284#ifdef HAVE_SSIZE_T
16285typedef ssize_t Py_ssize_t;
16286#elif SIZEOF_VOID_P == SIZEOF_LONG
16287typedef long Py_ssize_t;
16288#else
16289typedef int Py_ssize_t;
16290#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016291
Christian Heimes2c181612007-12-17 20:04:13 +000016292int main()
16293{
16294 char buffer[256];
16295
Thomas Wouters477c8d52006-05-27 19:21:47 +000016296 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16297 return 1;
16298
Thomas Wouters89f507f2006-12-13 04:49:30 +000016299 if (strcmp(buffer, "123"))
16300 return 1;
16301
16302 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16303 return 1;
16304
16305 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016306 return 1;
16307
16308 return 0;
16309}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016310
Thomas Wouters477c8d52006-05-27 19:21:47 +000016311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016312if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016313 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016314else
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016319fi
16320
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16323$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016324if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016325
Matthias Kloseb9621712010-04-24 17:59:49 +000016326$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016327
16328fi
16329
Matthias Kloseb9621712010-04-24 17:59:49 +000016330ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016331#ifdef HAVE_SYS_TYPES_H
16332#include <sys/types.h>
16333#endif
16334#ifdef HAVE_SYS_SOCKET_H
16335#include <sys/socket.h>
16336#endif
16337
Matthias Kloseb9621712010-04-24 17:59:49 +000016338"
Victor Stinnere0be4232011-10-25 13:06:09 +020016339if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016340
Martin v. Löwis11437992002-04-12 09:54:03 +000016341else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016342
Matthias Kloseb9621712010-04-24 17:59:49 +000016343$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016344
16345fi
16346
Michael W. Hudson54241132001-12-07 15:38:26 +000016347
Matthias Kloseb9621712010-04-24 17:59:49 +000016348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16349$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016350if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016351 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016352else
Matthias Kloseb9621712010-04-24 17:59:49 +000016353 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016354 ac_cv_broken_mbstowcs=no
16355else
Matthias Kloseb9621712010-04-24 17:59:49 +000016356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016357/* end confdefs.h. */
16358
Stefan Krah19c21392012-11-22 23:47:32 +010016359#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016360#include<stdlib.h>
16361int main() {
16362 size_t len = -1;
16363 const char *str = "text";
16364 len = mbstowcs(NULL, str, 0);
16365 return (len != 4);
16366}
16367
16368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016369if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016370 ac_cv_broken_mbstowcs=no
16371else
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016376fi
16377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016378fi
16379
Matthias Kloseb9621712010-04-24 17:59:49 +000016380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16381$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016382if test "$ac_cv_broken_mbstowcs" = yes
16383then
16384
Matthias Kloseb9621712010-04-24 17:59:49 +000016385$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016386
16387fi
16388
Antoine Pitroub52ec782009-01-25 16:34:23 +000016389# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16391$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016392
16393# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016394if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016395 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016396if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016397then
16398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16402$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016403fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016404if test "$withval" = no
16405then
16406
16407$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16408
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16410$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016411fi
16412
Antoine Pitrou042b1282010-08-13 21:15:58 +000016413else
16414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16415$as_echo "no value specified" >&6; }
16416fi
16417
Antoine Pitroub52ec782009-01-25 16:34:23 +000016418
Matthias Kloseb17289e2012-03-15 19:51:34 +010016419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16420$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16421if ${ac_cv_computed_gotos+:} false; then :
16422 $as_echo_n "(cached) " >&6
16423else
16424 if test "$cross_compiling" = yes; then :
16425 if test "${with_computed_gotos+set}" = set; then
16426 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16427 else
16428 ac_cv_computed_gotos=no
16429 fi
16430else
16431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433
16434int main(int argc, char **argv)
16435{
16436 static void *targets[1] = { &&LABEL1 };
16437 goto LABEL2;
16438LABEL1:
16439 return 0;
16440LABEL2:
16441 goto *targets[0];
16442 return 1;
16443}
16444
16445_ACEOF
16446if ac_fn_c_try_run "$LINENO"; then :
16447 ac_cv_computed_gotos=yes
16448else
16449 ac_cv_computed_gotos=no
16450fi
16451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16452 conftest.$ac_objext conftest.beam conftest.$ac_ext
16453fi
16454
16455fi
16456
16457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16458$as_echo "$ac_cv_computed_gotos" >&6; }
16459case "$ac_cv_computed_gotos" in yes*)
16460
16461$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16462
16463esac
16464
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016465case $ac_sys_system in
16466AIX*)
16467
16468$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16469 ;;
16470esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016471
Michael W. Hudson54241132001-12-07 15:38:26 +000016472
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016473
16474
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016475for h in `(cd $srcdir;echo Python/thread_*.h)`
16476do
16477 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16478done
16479
Michael W. Hudson54241132001-12-07 15:38:26 +000016480
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016481SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16483$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016484for dir in $SRCDIRS; do
16485 if test ! -d $dir; then
16486 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016487 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016488done
Matthias Kloseb9621712010-04-24 17:59:49 +000016489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16490$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016491
Stefan Krah1919b7e2012-03-21 18:25:23 +010016492# Availability of -O2:
16493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16494$as_echo_n "checking for -O2... " >&6; }
16495saved_cflags="$CFLAGS"
16496CFLAGS="-O2"
16497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498/* end confdefs.h. */
16499
16500int
16501main ()
16502{
16503
16504
16505 ;
16506 return 0;
16507}
16508_ACEOF
16509if ac_fn_c_try_compile "$LINENO"; then :
16510 have_O2=yes
16511else
16512 have_O2=no
16513fi
16514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16516$as_echo "$have_O2" >&6; }
16517CFLAGS="$saved_cflags"
16518
16519# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16520# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16522$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16523saved_cflags="$CFLAGS"
16524CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16525if test "$have_O2" = no; then
16526 CFLAGS=""
16527fi
16528if test "$cross_compiling" = yes; then :
16529 have_glibc_memmove_bug=undefined
16530else
16531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16532/* end confdefs.h. */
16533
16534#include <stdio.h>
16535#include <stdlib.h>
16536#include <string.h>
16537void foo(void *p, void *q) { memmove(p, q, 19); }
16538int main() {
16539 char a[32] = "123456789000000000";
16540 foo(&a[9], a);
16541 if (strcmp(a, "123456789123456789000000000") != 0)
16542 return 1;
16543 foo(a, &a[9]);
16544 if (strcmp(a, "123456789000000000") != 0)
16545 return 1;
16546 return 0;
16547}
16548
16549_ACEOF
16550if ac_fn_c_try_run "$LINENO"; then :
16551 have_glibc_memmove_bug=no
16552else
16553 have_glibc_memmove_bug=yes
16554fi
16555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16556 conftest.$ac_objext conftest.beam conftest.$ac_ext
16557fi
16558
16559CFLAGS="$saved_cflags"
16560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16561$as_echo "$have_glibc_memmove_bug" >&6; }
16562if test "$have_glibc_memmove_bug" = yes; then
16563
16564$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16565
16566fi
16567
16568if test "$have_gcc_asm_for_x87" = yes; then
16569 # Some versions of gcc miscompile inline asm:
16570 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16571 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16572 case $CC in
16573 *gcc*)
16574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16575$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16576 saved_cflags="$CFLAGS"
16577 CFLAGS="-O2"
16578 if test "$cross_compiling" = yes; then :
16579 have_ipa_pure_const_bug=undefined
16580else
16581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16582/* end confdefs.h. */
16583
16584 __attribute__((noinline)) int
16585 foo(int *p) {
16586 int r;
16587 asm ( "movl \$6, (%1)\n\t"
16588 "xorl %0, %0\n\t"
16589 : "=r" (r) : "r" (p) : "memory"
16590 );
16591 return r;
16592 }
16593 int main() {
16594 int p = 8;
16595 if ((foo(&p) ? : p) != 6)
16596 return 1;
16597 return 0;
16598 }
16599
16600_ACEOF
16601if ac_fn_c_try_run "$LINENO"; then :
16602 have_ipa_pure_const_bug=no
16603else
16604 have_ipa_pure_const_bug=yes
16605fi
16606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16607 conftest.$ac_objext conftest.beam conftest.$ac_ext
16608fi
16609
16610 CFLAGS="$saved_cflags"
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16612$as_echo "$have_ipa_pure_const_bug" >&6; }
16613 if test "$have_ipa_pure_const_bug" = yes; then
16614
16615$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16616
16617 fi
16618 ;;
16619 esac
16620fi
16621
Victor Stinner4f5366e2015-01-09 02:13:19 +010016622# Check for stdatomic.h
16623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16624$as_echo_n "checking for stdatomic.h... " >&6; }
16625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16626/* end confdefs.h. */
16627
16628
16629 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016630 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016631 int main() {
16632 int loaded_value = atomic_load(&value);
16633 return 0;
16634 }
16635
16636
16637_ACEOF
16638if ac_fn_c_try_link "$LINENO"; then :
16639 have_stdatomic_h=yes
16640else
16641 have_stdatomic_h=no
16642fi
16643rm -f core conftest.err conftest.$ac_objext \
16644 conftest$ac_exeext conftest.$ac_ext
16645
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16647$as_echo "$have_stdatomic_h" >&6; }
16648
16649if test "$have_stdatomic_h" = yes; then
16650
16651$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16652
16653fi
16654
16655# Check for GCC >= 4.7 __atomic builtins
16656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16657$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16659/* end confdefs.h. */
16660
16661
16662 volatile int val = 1;
16663 int main() {
16664 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16665 return 0;
16666 }
16667
16668
16669_ACEOF
16670if ac_fn_c_try_link "$LINENO"; then :
16671 have_builtin_atomic=yes
16672else
16673 have_builtin_atomic=no
16674fi
16675rm -f core conftest.err conftest.$ac_objext \
16676 conftest$ac_exeext conftest.$ac_ext
16677
16678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16679$as_echo "$have_builtin_atomic" >&6; }
16680
16681if test "$have_builtin_atomic" = yes; then
16682
16683$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16684
16685fi
16686
Ned Deily322f5ba2013-11-21 23:01:59 -080016687# ensurepip option
16688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16689$as_echo_n "checking for ensurepip... " >&6; }
16690
16691# Check whether --with-ensurepip was given.
16692if test "${with_ensurepip+set}" = set; then :
16693 withval=$with_ensurepip;
16694else
16695 with_ensurepip=upgrade
16696fi
16697
16698case $with_ensurepip in #(
16699 yes|upgrade) :
16700 ENSUREPIP=upgrade ;; #(
16701 install) :
16702 ENSUREPIP=install ;; #(
16703 no) :
16704 ENSUREPIP=no ;; #(
16705 *) :
16706 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16707esac
16708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16709$as_echo "$ENSUREPIP" >&6; }
16710
16711
Victor Stinner35a97c02015-03-08 02:59:09 +010016712# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16714$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16716/* end confdefs.h. */
16717
16718
16719 #include <dirent.h>
16720
16721 int main() {
16722 struct dirent entry;
16723 return entry.d_type == DT_UNKNOWN;
16724 }
16725
16726
16727_ACEOF
16728if ac_fn_c_try_link "$LINENO"; then :
16729 have_dirent_d_type=yes
16730else
16731 have_dirent_d_type=no
16732fi
16733rm -f core conftest.err conftest.$ac_objext \
16734 conftest$ac_exeext conftest.$ac_ext
16735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16736$as_echo "$have_dirent_d_type" >&6; }
16737
16738if test "$have_dirent_d_type" = yes; then
16739
16740$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16741
16742fi
16743
Victor Stinner9eb57c52015-03-19 22:21:49 +010016744# check if the Linux getrandom() syscall is available
16745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16746$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16748/* end confdefs.h. */
16749
16750
Victor Stinner1b80b242016-04-12 22:34:58 +020016751 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016752 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016753 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016754
16755 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016756 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016757 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016758 const int flags = GRND_NONBLOCK;
16759 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016760 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016761 return 0;
16762 }
16763
16764
16765_ACEOF
16766if ac_fn_c_try_link "$LINENO"; then :
16767 have_getrandom_syscall=yes
16768else
16769 have_getrandom_syscall=no
16770fi
16771rm -f core conftest.err conftest.$ac_objext \
16772 conftest$ac_exeext conftest.$ac_ext
16773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16774$as_echo "$have_getrandom_syscall" >&6; }
16775
16776if test "$have_getrandom_syscall" = yes; then
16777
16778$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16779
16780fi
16781
Victor Stinner3abf44e2015-09-18 15:38:37 +020016782# check if the getrandom() function is available
16783# the test was written for the Solaris function of <sys/random.h>
16784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16785$as_echo_n "checking for the getrandom() function... " >&6; }
16786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787/* end confdefs.h. */
16788
16789
16790 #include <sys/random.h>
16791
16792 int main() {
16793 char buffer[1];
16794 const size_t buflen = sizeof(buffer);
16795 const int flags = 0;
16796 /* ignore the result, Python checks for ENOSYS at runtime */
16797 (void)getrandom(buffer, buflen, flags);
16798 return 0;
16799 }
16800
16801
16802_ACEOF
16803if ac_fn_c_try_link "$LINENO"; then :
16804 have_getrandom=yes
16805else
16806 have_getrandom=no
16807fi
16808rm -f core conftest.err conftest.$ac_objext \
16809 conftest$ac_exeext conftest.$ac_ext
16810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16811$as_echo "$have_getrandom" >&6; }
16812
16813if test "$have_getrandom" = yes; then
16814
16815$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16816
16817fi
16818
Christian Heimesff5be6e2018-01-20 13:19:21 +010016819# Check for usable OpenSSL
16820
16821 found=false
16822
16823# Check whether --with-openssl was given.
16824if test "${with_openssl+set}" = set; then :
16825 withval=$with_openssl;
16826 case "$withval" in
16827 "" | y | ye | yes | n | no)
16828 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16829 ;;
16830 *) ssldirs="$withval"
16831 ;;
16832 esac
16833
16834else
16835
16836 # if pkg-config is installed and openssl has installed a .pc file,
16837 # then use that information and don't search ssldirs
16838 if test -n "$ac_tool_prefix"; then
16839 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16840set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16842$as_echo_n "checking for $ac_word... " >&6; }
16843if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16844 $as_echo_n "(cached) " >&6
16845else
16846 if test -n "$PKG_CONFIG"; then
16847 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16848else
16849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16850for as_dir in $PATH
16851do
16852 IFS=$as_save_IFS
16853 test -z "$as_dir" && as_dir=.
16854 for ac_exec_ext in '' $ac_executable_extensions; do
16855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16856 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16858 break 2
16859 fi
16860done
16861 done
16862IFS=$as_save_IFS
16863
16864fi
16865fi
16866PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16867if test -n "$PKG_CONFIG"; then
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16869$as_echo "$PKG_CONFIG" >&6; }
16870else
16871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16872$as_echo "no" >&6; }
16873fi
16874
16875
16876fi
16877if test -z "$ac_cv_prog_PKG_CONFIG"; then
16878 ac_ct_PKG_CONFIG=$PKG_CONFIG
16879 # Extract the first word of "pkg-config", so it can be a program name with args.
16880set dummy pkg-config; ac_word=$2
16881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16882$as_echo_n "checking for $ac_word... " >&6; }
16883if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16884 $as_echo_n "(cached) " >&6
16885else
16886 if test -n "$ac_ct_PKG_CONFIG"; then
16887 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16888else
16889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16890for as_dir in $PATH
16891do
16892 IFS=$as_save_IFS
16893 test -z "$as_dir" && as_dir=.
16894 for ac_exec_ext in '' $ac_executable_extensions; do
16895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16896 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16898 break 2
16899 fi
16900done
16901 done
16902IFS=$as_save_IFS
16903
16904fi
16905fi
16906ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16907if test -n "$ac_ct_PKG_CONFIG"; then
16908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16909$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16910else
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16912$as_echo "no" >&6; }
16913fi
16914
16915 if test "x$ac_ct_PKG_CONFIG" = x; then
16916 PKG_CONFIG=""
16917 else
16918 case $cross_compiling:$ac_tool_warned in
16919yes:)
16920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16922ac_tool_warned=yes ;;
16923esac
16924 PKG_CONFIG=$ac_ct_PKG_CONFIG
16925 fi
16926else
16927 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16928fi
16929
16930 if test x"$PKG_CONFIG" != x""; then
16931 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16932 if test $? = 0; then
16933 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16934 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16935 found=true
16936 fi
16937 fi
16938
16939 # no such luck; use some default ssldirs
16940 if ! $found; then
16941 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16942 fi
16943
16944
16945fi
16946
16947
16948
16949 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16950 # an 'openssl' subdirectory
16951
16952 if ! $found; then
16953 OPENSSL_INCLUDES=
16954 for ssldir in $ssldirs; do
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16956$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16957 if test -f "$ssldir/include/openssl/ssl.h"; then
16958 OPENSSL_INCLUDES="-I$ssldir/include"
16959 OPENSSL_LDFLAGS="-L$ssldir/lib"
16960 OPENSSL_LIBS="-lssl -lcrypto"
16961 found=true
16962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16963$as_echo "yes" >&6; }
16964 break
16965 else
16966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16967$as_echo "no" >&6; }
16968 fi
16969 done
16970
16971 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16972 # it will just work!
16973 fi
16974
16975 # try the preprocessor and linker with our new flags,
16976 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16977
16978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16979$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16980 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16981 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16982
16983 save_LIBS="$LIBS"
16984 save_LDFLAGS="$LDFLAGS"
16985 save_CPPFLAGS="$CPPFLAGS"
16986 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16987 LIBS="$OPENSSL_LIBS $LIBS"
16988 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h. */
16991#include <openssl/ssl.h>
16992int
16993main ()
16994{
16995SSL_new(NULL)
16996 ;
16997 return 0;
16998}
16999_ACEOF
17000if ac_fn_c_try_link "$LINENO"; then :
17001
17002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17003$as_echo "yes" >&6; }
17004 have_openssl=yes
17005
17006else
17007
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17009$as_echo "no" >&6; }
17010 have_openssl=no
17011
17012fi
17013rm -f core conftest.err conftest.$ac_objext \
17014 conftest$ac_exeext conftest.$ac_ext
17015 CPPFLAGS="$save_CPPFLAGS"
17016 LDFLAGS="$save_LDFLAGS"
17017 LIBS="$save_LIBS"
17018
17019
17020
17021
17022
17023
17024if test "$have_openssl" = yes; then
17025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17026$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17027
17028 save_LIBS="$LIBS"
17029 save_LDFLAGS="$LDFLAGS"
17030 save_CPPFLAGS="$CPPFLAGS"
17031 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17032 LIBS="$OPENSSL_LIBS $LIBS"
17033 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17034
17035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17036/* end confdefs.h. */
17037
17038 #include <openssl/x509_vfy.h>
17039
17040int
17041main ()
17042{
17043
17044 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17045 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17046 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17047 X509_VERIFY_PARAM_set_hostflags(p, 0);
17048
17049 ;
17050 return 0;
17051}
17052
17053_ACEOF
17054if ac_fn_c_try_link "$LINENO"; then :
17055
17056 ac_cv_has_x509_verify_param_set1_host=yes
17057
17058else
17059
17060 ac_cv_has_x509_verify_param_set1_host=no
17061
17062fi
17063rm -f core conftest.err conftest.$ac_objext \
17064 conftest$ac_exeext conftest.$ac_ext
17065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17066$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17067 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17068
17069$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17070
17071 fi
17072
17073 CPPFLAGS="$save_CPPFLAGS"
17074 LDFLAGS="$save_LDFLAGS"
17075 LIBS="$save_LIBS"
17076fi
17077
Christian Heimes892d66e2018-01-29 14:10:18 +010017078# ssl module default cipher suite string
17079
17080
17081
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17083$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17084
17085# Check whether --with-ssl-default-suites was given.
17086if test "${with_ssl_default_suites+set}" = set; then :
17087 withval=$with_ssl_default_suites;
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17089$as_echo "$withval" >&6; }
17090case "$withval" in
17091 python)
17092 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17093
17094 ;;
17095 openssl)
17096 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17097
17098 ;;
17099 *)
17100 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17101
17102 cat >>confdefs.h <<_ACEOF
17103#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17104_ACEOF
17105
17106 ;;
17107esac
17108
17109else
17110
17111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17112$as_echo "python" >&6; }
17113$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17114
17115
17116fi
17117
17118
17119
Guido van Rossum627b2d71993-12-24 10:39:16 +000017120# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017121ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017122
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017123ac_config_files="$ac_config_files Modules/ld_so_aix"
17124
Martin v. Löwis11437992002-04-12 09:54:03 +000017125cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017126# This file is a shell script that caches the results of configure
17127# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017128# scripts and configure runs, see configure's option --config-cache.
17129# It is not useful on other systems. If it contains results you don't
17130# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017131#
Martin v. Löwis11437992002-04-12 09:54:03 +000017132# config.status only pays attention to the cache file if you give it
17133# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017134#
Skip Montanaro6dead952003-09-25 14:50:04 +000017135# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017136# loading this file, other *unset* `ac_cv_foo' will be assigned the
17137# following values.
17138
17139_ACEOF
17140
Guido van Rossumf78abae1997-01-21 22:02:36 +000017141# The following way of writing the cache mishandles newlines in values,
17142# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017144# Ultrix sh set writes to stderr and can't be redirected directly,
17145# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146(
17147 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17148 eval ac_val=\$$ac_var
17149 case $ac_val in #(
17150 *${as_nl}*)
17151 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017152 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17153$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017154 esac
17155 case $ac_var in #(
17156 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17158 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017159 esac ;;
17160 esac
17161 done
17162
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17165 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017166 # `set' does not quote correctly, so add quotes: double-quote
17167 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017169 "s/'/'\\\\''/g;
17170 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 *)
17173 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176 esac |
17177 sort
17178) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017181 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017183 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17184 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17186 :end' >>confcache
17187if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17188 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017189 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017190 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17191$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017192 if test ! -f "$cache_file" || test -h "$cache_file"; then
17193 cat confcache >"$cache_file"
17194 else
17195 case $cache_file in #(
17196 */* | ?:*)
17197 mv -f confcache "$cache_file"$$ &&
17198 mv -f "$cache_file"$$ "$cache_file" ;; #(
17199 *)
17200 mv -f confcache "$cache_file" ;;
17201 esac
17202 fi
17203 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017204 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017205 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17206$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017207 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017208fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017209rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017211test "x$prefix" = xNONE && prefix=$ac_default_prefix
17212# Let make expand exec_prefix.
17213test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017214
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017215DEFS=-DHAVE_CONFIG_H
17216
Skip Montanaro6dead952003-09-25 14:50:04 +000017217ac_libobjs=
17218ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017219U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017220for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17221 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17225 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017226 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17227 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017228done
17229LIBOBJS=$ac_libobjs
17230
17231LTLIBOBJS=$ac_ltlibobjs
17232
17233
Martin v. Löwis11437992002-04-12 09:54:03 +000017234
Matthias Kloseb9621712010-04-24 17:59:49 +000017235
Victor Stinnere0be4232011-10-25 13:06:09 +020017236: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017237ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017238ac_clean_files_save=$ac_clean_files
17239ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017240{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17241$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17242as_write_fail=0
17243cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017244#! $SHELL
17245# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017246# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017247# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017248# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017249
Martin v. Löwis11437992002-04-12 09:54:03 +000017250debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017251ac_cs_recheck=false
17252ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017253
Matthias Kloseb9621712010-04-24 17:59:49 +000017254SHELL=\${CONFIG_SHELL-$SHELL}
17255export SHELL
17256_ASEOF
17257cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17258## -------------------- ##
17259## M4sh Initialization. ##
17260## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262# Be more Bourne compatible
17263DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 emulate sh
17266 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017267 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017268 # is contrary to our usage. Disable this feature.
17269 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017271else
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 case `(set -o) 2>/dev/null` in #(
17273 *posix*) :
17274 set -o posix ;; #(
17275 *) :
17276 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017278fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017279
17280
Matthias Kloseb9621712010-04-24 17:59:49 +000017281as_nl='
17282'
17283export as_nl
17284# Printing a long string crashes Solaris 7 /usr/bin/printf.
17285as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17286as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17287as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17288# Prefer a ksh shell builtin over an external printf program on Solaris,
17289# but without wasting forks for bash or zsh.
17290if test -z "$BASH_VERSION$ZSH_VERSION" \
17291 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17292 as_echo='print -r --'
17293 as_echo_n='print -rn --'
17294elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17295 as_echo='printf %s\n'
17296 as_echo_n='printf %s'
17297else
17298 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17299 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17300 as_echo_n='/usr/ucb/echo -n'
17301 else
17302 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17303 as_echo_n_body='eval
17304 arg=$1;
17305 case $arg in #(
17306 *"$as_nl"*)
17307 expr "X$arg" : "X\\(.*\\)$as_nl";
17308 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17309 esac;
17310 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17311 '
17312 export as_echo_n_body
17313 as_echo_n='sh -c $as_echo_n_body as_echo'
17314 fi
17315 export as_echo_body
17316 as_echo='sh -c $as_echo_body as_echo'
17317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017318
17319# The user is always right.
17320if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017321 PATH_SEPARATOR=:
17322 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17323 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17324 PATH_SEPARATOR=';'
17325 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328
17329# IFS
17330# We need space, tab and new line, in precisely that order. Quoting is
17331# there to prevent editors from complaining about space-tab.
17332# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17333# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334IFS=" "" $as_nl"
17335
17336# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017337as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017338case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339 *[\\/]* ) as_myself=$0 ;;
17340 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017341for as_dir in $PATH
17342do
17343 IFS=$as_save_IFS
17344 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017345 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17346 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 ;;
17350esac
17351# We did not find ourselves, most probably we were run as `sh COMMAND'
17352# in which case we are not to be found in the path.
17353if test "x$as_myself" = x; then
17354 as_myself=$0
17355fi
17356if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017357 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17358 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359fi
17360
Matthias Kloseb9621712010-04-24 17:59:49 +000017361# Unset variables that we do not need and which cause bugs (e.g. in
17362# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17363# suppresses any "Segmentation fault" message there. '((' could
17364# trigger a bug in pdksh 5.2.14.
17365for as_var in BASH_ENV ENV MAIL MAILPATH
17366do eval test x\${$as_var+set} = xset \
17367 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368done
17369PS1='$ '
17370PS2='> '
17371PS4='+ '
17372
17373# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017374LC_ALL=C
17375export LC_ALL
17376LANGUAGE=C
17377export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378
Matthias Kloseb9621712010-04-24 17:59:49 +000017379# CDPATH.
17380(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17381
17382
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017383# as_fn_error STATUS ERROR [LINENO LOG_FD]
17384# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017385# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17386# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017387# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017388as_fn_error ()
17389{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017390 as_status=$1; test $as_status -eq 0 && as_status=1
17391 if test "$4"; then
17392 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17393 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017394 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017395 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 as_fn_exit $as_status
17397} # as_fn_error
17398
17399
17400# as_fn_set_status STATUS
17401# -----------------------
17402# Set $? to STATUS, without forking.
17403as_fn_set_status ()
17404{
17405 return $1
17406} # as_fn_set_status
17407
17408# as_fn_exit STATUS
17409# -----------------
17410# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17411as_fn_exit ()
17412{
17413 set +e
17414 as_fn_set_status $1
17415 exit $1
17416} # as_fn_exit
17417
17418# as_fn_unset VAR
17419# ---------------
17420# Portably unset VAR.
17421as_fn_unset ()
17422{
17423 { eval $1=; unset $1;}
17424}
17425as_unset=as_fn_unset
17426# as_fn_append VAR VALUE
17427# ----------------------
17428# Append the text in VALUE to the end of the definition contained in VAR. Take
17429# advantage of any shell optimizations that allow amortized linear growth over
17430# repeated appends, instead of the typical quadratic growth present in naive
17431# implementations.
17432if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17433 eval 'as_fn_append ()
17434 {
17435 eval $1+=\$2
17436 }'
17437else
17438 as_fn_append ()
17439 {
17440 eval $1=\$$1\$2
17441 }
17442fi # as_fn_append
17443
17444# as_fn_arith ARG...
17445# ------------------
17446# Perform arithmetic evaluation on the ARGs, and store the result in the
17447# global $as_val. Take advantage of shells that can avoid forks. The arguments
17448# must be portable across $(()) and expr.
17449if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17450 eval 'as_fn_arith ()
17451 {
17452 as_val=$(( $* ))
17453 }'
17454else
17455 as_fn_arith ()
17456 {
17457 as_val=`expr "$@" || test $? -eq 1`
17458 }
17459fi # as_fn_arith
17460
17461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462if expr a : '\(a\)' >/dev/null 2>&1 &&
17463 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17464 as_expr=expr
17465else
17466 as_expr=false
17467fi
17468
17469if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17470 as_basename=basename
17471else
17472 as_basename=false
17473fi
17474
Matthias Kloseb9621712010-04-24 17:59:49 +000017475if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17476 as_dirname=dirname
17477else
17478 as_dirname=false
17479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481as_me=`$as_basename -- "$0" ||
17482$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17483 X"$0" : 'X\(//\)$' \| \
17484 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017485$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486 sed '/^.*\/\([^/][^/]*\)\/*$/{
17487 s//\1/
17488 q
17489 }
17490 /^X\/\(\/\/\)$/{
17491 s//\1/
17492 q
17493 }
17494 /^X\/\(\/\).*/{
17495 s//\1/
17496 q
17497 }
17498 s/.*/./; q'`
17499
Matthias Kloseb9621712010-04-24 17:59:49 +000017500# Avoid depending upon Character Ranges.
17501as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17502as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17503as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17504as_cr_digits='0123456789'
17505as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506
17507ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017508case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017510 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017512 xy) ECHO_C='\c';;
17513 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17514 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515 esac;;
17516*)
17517 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017519
Martin v. Löwis11437992002-04-12 09:54:03 +000017520rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521if test -d conf$$.dir; then
17522 rm -f conf$$.dir/conf$$.file
17523else
17524 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017527if (echo >conf$$.file) 2>/dev/null; then
17528 if ln -s conf$$.file conf$$ 2>/dev/null; then
17529 as_ln_s='ln -s'
17530 # ... but there are two gotchas:
17531 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17532 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017533 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017536 elif ln conf$$.file conf$$ 2>/dev/null; then
17537 as_ln_s=ln
17538 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017539 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017541else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017542 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17545rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017546
Matthias Kloseb9621712010-04-24 17:59:49 +000017547
17548# as_fn_mkdir_p
17549# -------------
17550# Create "$as_dir" as a directory, including parents if necessary.
17551as_fn_mkdir_p ()
17552{
17553
17554 case $as_dir in #(
17555 -*) as_dir=./$as_dir;;
17556 esac
17557 test -d "$as_dir" || eval $as_mkdir_p || {
17558 as_dirs=
17559 while :; do
17560 case $as_dir in #(
17561 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17562 *) as_qdir=$as_dir;;
17563 esac
17564 as_dirs="'$as_qdir' $as_dirs"
17565 as_dir=`$as_dirname -- "$as_dir" ||
17566$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17567 X"$as_dir" : 'X\(//\)[^/]' \| \
17568 X"$as_dir" : 'X\(//\)$' \| \
17569 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17570$as_echo X"$as_dir" |
17571 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17572 s//\1/
17573 q
17574 }
17575 /^X\(\/\/\)[^/].*/{
17576 s//\1/
17577 q
17578 }
17579 /^X\(\/\/\)$/{
17580 s//\1/
17581 q
17582 }
17583 /^X\(\/\).*/{
17584 s//\1/
17585 q
17586 }
17587 s/.*/./; q'`
17588 test -d "$as_dir" && break
17589 done
17590 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017592
17593
17594} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017595if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017597else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017598 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017599 as_mkdir_p=false
17600fi
17601
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017602
17603# as_fn_executable_p FILE
17604# -----------------------
17605# Test if FILE is an executable regular file.
17606as_fn_executable_p ()
17607{
17608 test -f "$1" && test -x "$1"
17609} # as_fn_executable_p
17610as_test_x='test -x'
17611as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017612
17613# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017614as_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 +000017615
17616# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017617as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017618
17619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017621## ----------------------------------- ##
17622## Main body of $CONFIG_STATUS script. ##
17623## ----------------------------------- ##
17624_ASEOF
17625test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17628# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017629# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630# values after options handling.
17631ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017632This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017633generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017634
17635 CONFIG_FILES = $CONFIG_FILES
17636 CONFIG_HEADERS = $CONFIG_HEADERS
17637 CONFIG_LINKS = $CONFIG_LINKS
17638 CONFIG_COMMANDS = $CONFIG_COMMANDS
17639 $ $0 $@
17640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641on `(hostname || uname -n) 2>/dev/null | sed 1q`
17642"
17643
Martin v. Löwis11437992002-04-12 09:54:03 +000017644_ACEOF
17645
Matthias Kloseb9621712010-04-24 17:59:49 +000017646case $ac_config_files in *"
17647"*) set x $ac_config_files; shift; ac_config_files=$*;;
17648esac
17649
17650case $ac_config_headers in *"
17651"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17652esac
17653
17654
17655cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017656# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017657config_files="$ac_config_files"
17658config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017661
Matthias Kloseb9621712010-04-24 17:59:49 +000017662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017663ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017664\`$as_me' instantiates files and other configuration actions
17665from templates according to the current configuration. Unless the files
17666and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017667
Matthias Kloseb9621712010-04-24 17:59:49 +000017668Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017669
17670 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017672 --config print configuration, then exit
17673 -q, --quiet, --silent
17674 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 -d, --debug don't remove temporary files
17676 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017677 --file=FILE[:TEMPLATE]
17678 instantiate the configuration file FILE
17679 --header=FILE[:TEMPLATE]
17680 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
17682Configuration files:
17683$config_files
17684
17685Configuration headers:
17686$config_headers
17687
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017688Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17692ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017693ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017694python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017695configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017697
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017698Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017699This config.status script is free software; the Free Software Foundation
17700gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701
17702ac_pwd='$ac_pwd'
17703srcdir='$srcdir'
17704INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017705MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017706test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017707_ACEOF
17708
Matthias Kloseb9621712010-04-24 17:59:49 +000017709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17710# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017711ac_need_defaults=:
17712while test $# != 0
17713do
17714 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017715 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17717 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017718 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017720 --*=)
17721 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17722 ac_optarg=
17723 ac_shift=:
17724 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017726 ac_option=$1
17727 ac_optarg=$2
17728 ac_shift=shift
17729 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 esac
17731
Skip Montanaro6dead952003-09-25 14:50:04 +000017732 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017734 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17735 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 $as_echo "$ac_cs_version"; exit ;;
17738 --config | --confi | --conf | --con | --co | --c )
17739 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017741 debug=: ;;
17742 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017743 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 case $ac_optarg in
17745 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017746 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017747 esac
17748 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 ac_need_defaults=false;;
17750 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017751 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 case $ac_optarg in
17753 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17754 esac
17755 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 --he | --h)
17758 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017760Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017763 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17764 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17765 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017766
17767 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017768 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017769Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
Matthias Kloseb9621712010-04-24 17:59:49 +000017771 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017773
17774 esac
17775 shift
17776done
17777
Skip Montanaro6dead952003-09-25 14:50:04 +000017778ac_configure_extra_args=
17779
17780if $ac_cs_silent; then
17781 exec 6>/dev/null
17782 ac_configure_extra_args="$ac_configure_extra_args --silent"
17783fi
17784
17785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017787if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017788 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017789 shift
17790 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17791 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017794fi
17795
Martin v. Löwis11437992002-04-12 09:54:03 +000017796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017797cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798exec 5>>config.log
17799{
17800 echo
17801 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17802## Running $as_me. ##
17803_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017804 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017810
Matthias Kloseb9621712010-04-24 17:59:49 +000017811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812
17813# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017814for ac_config_target in $ac_config_targets
17815do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816 case $ac_config_target in
17817 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17818 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17819 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017820 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17821 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017823 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017824 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017825 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826
Victor Stinnere0be4232011-10-25 13:06:09 +020017827 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017828 esac
17829done
17830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831
Martin v. Löwis11437992002-04-12 09:54:03 +000017832# If the user did not use the arguments to specify the items to instantiate,
17833# then the envvar interface is used. Set only those that are not.
17834# We use the long form for the default assignment because of an extremely
17835# bizarre bug on SunOS 4.1.3.
17836if $ac_need_defaults; then
17837 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17838 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17839fi
17840
Skip Montanaro6dead952003-09-25 14:50:04 +000017841# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017843# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844# Hook for its removal unless debugging.
17845# Note that there is a small window in which the directory will not be cleaned:
17846# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017847$debug ||
17848{
Victor Stinnere0be4232011-10-25 13:06:09 +020017849 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017851 : "${ac_tmp:=$tmp}"
17852 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017855}
Martin v. Löwis11437992002-04-12 09:54:03 +000017856# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017857
Martin v. Löwis11437992002-04-12 09:54:03 +000017858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017860 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017861} ||
17862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863 tmp=./conf$$-$RANDOM
17864 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017865} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017866ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868# Set up the scripts for CONFIG_FILES section.
17869# No need to generate them if there are no CONFIG_FILES.
17870# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017872
Matthias Kloseb9621712010-04-24 17:59:49 +000017873
17874ac_cr=`echo X | tr X '\015'`
17875# On cygwin, bash can eat \r inside `` if the user requested igncr.
17876# But we know of no other shell where ac_cr would be empty at this
17877# point, so we can use a bashism as a fallback.
17878if test "x$ac_cr" = x; then
17879 eval ac_cr=\$\'\\r\'
17880fi
17881ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17882if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017883 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017884else
17885 ac_cs_awk_cr=$ac_cr
17886fi
17887
Victor Stinnere0be4232011-10-25 13:06:09 +020017888echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017889_ACEOF
17890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891
Matthias Kloseb9621712010-04-24 17:59:49 +000017892{
17893 echo "cat >conf$$subs.awk <<_ACEOF" &&
17894 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17895 echo "_ACEOF"
17896} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017897 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17898ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899ac_delim='%!_!# '
17900for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017901 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017902 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017903
Matthias Kloseb9621712010-04-24 17:59:49 +000017904 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17905 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017906 break
17907 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017909 else
17910 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912done
Matthias Kloseb9621712010-04-24 17:59:49 +000017913rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017916cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017918sed -n '
17919h
17920s/^/S["/; s/!.*/"]=/
17921p
17922g
17923s/^[^!]*!//
17924:repl
17925t repl
17926s/'"$ac_delim"'$//
17927t delim
17928:nl
17929h
17930s/\(.\{148\}\)..*/\1/
17931t more1
17932s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17933p
17934n
17935b repl
17936:more1
17937s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17938p
17939g
17940s/.\{148\}//
17941t nl
17942:delim
17943h
17944s/\(.\{148\}\)..*/\1/
17945t more2
17946s/["\\]/\\&/g; s/^/"/; s/$/"/
17947p
17948b
17949:more2
17950s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17951p
17952g
17953s/.\{148\}//
17954t delim
17955' <conf$$subs.awk | sed '
17956/^[^""]/{
17957 N
17958 s/\n//
17959}
17960' >>$CONFIG_STATUS || ac_write_fail=1
17961rm -f conf$$subs.awk
17962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17963_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017964cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 for (key in S) S_is_set[key] = 1
17966 FS = ""
17967
17968}
17969{
17970 line = $ 0
17971 nfields = split(line, field, "@")
17972 substed = 0
17973 len = length(field[1])
17974 for (i = 2; i < nfields; i++) {
17975 key = field[i]
17976 keylen = length(key)
17977 if (S_is_set[key]) {
17978 value = S[key]
17979 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17980 len += length(value) + length(field[++i])
17981 substed = 1
17982 } else
17983 len += 1 + keylen
17984 }
17985
17986 print line
17987}
17988
17989_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17992if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17993 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17994else
17995 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017996fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017997 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017998_ACEOF
17999
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018000# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18001# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002# trailing colons and then remove the whole line if VPATH becomes empty
18003# (actually we leave an empty line to preserve line numbers).
18004if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018005 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18006h
18007s///
18008s/^/:/
18009s/[ ]*$/:/
18010s/:\$(srcdir):/:/g
18011s/:\${srcdir}:/:/g
18012s/:@srcdir@:/:/g
18013s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018015x
18016s/\(=[ ]*\).*/\1/
18017G
18018s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019s/^[^=]*=[ ]*$//
18020}'
18021fi
18022
Matthias Kloseb9621712010-04-24 17:59:49 +000018023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018024fi # test -n "$CONFIG_FILES"
18025
Matthias Kloseb9621712010-04-24 17:59:49 +000018026# Set up the scripts for CONFIG_HEADERS section.
18027# No need to generate them if there are no CONFIG_HEADERS.
18028# This happens for instance with `./config.status Makefile'.
18029if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018030cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018031BEGIN {
18032_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033
Matthias Kloseb9621712010-04-24 17:59:49 +000018034# Transform confdefs.h into an awk script `defines.awk', embedded as
18035# here-document in config.status, that substitutes the proper values into
18036# config.h.in to produce config.h.
18037
18038# Create a delimiter string that does not exist in confdefs.h, to ease
18039# handling of long lines.
18040ac_delim='%!_!# '
18041for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018042 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18043 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018044 break
18045 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018046 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018047 else
18048 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18049 fi
18050done
18051
18052# For the awk script, D is an array of macro values keyed by name,
18053# likewise P contains macro parameters if any. Preserve backslash
18054# newline sequences.
18055
18056ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18057sed -n '
18058s/.\{148\}/&'"$ac_delim"'/g
18059t rset
18060:rset
18061s/^[ ]*#[ ]*define[ ][ ]*/ /
18062t def
18063d
18064:def
18065s/\\$//
18066t bsnl
18067s/["\\]/\\&/g
18068s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18069D["\1"]=" \3"/p
18070s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18071d
18072:bsnl
18073s/["\\]/\\&/g
18074s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18075D["\1"]=" \3\\\\\\n"\\/p
18076t cont
18077s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18078t cont
18079d
18080:cont
18081n
18082s/.\{148\}/&'"$ac_delim"'/g
18083t clear
18084:clear
18085s/\\$//
18086t bsnlc
18087s/["\\]/\\&/g; s/^/"/; s/$/"/p
18088d
18089:bsnlc
18090s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18091b cont
18092' <confdefs.h | sed '
18093s/'"$ac_delim"'/"\\\
18094"/g' >>$CONFIG_STATUS || ac_write_fail=1
18095
18096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18097 for (key in D) D_is_set[key] = 1
18098 FS = ""
18099}
18100/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18101 line = \$ 0
18102 split(line, arg, " ")
18103 if (arg[1] == "#") {
18104 defundef = arg[2]
18105 mac1 = arg[3]
18106 } else {
18107 defundef = substr(arg[1], 2)
18108 mac1 = arg[2]
18109 }
18110 split(mac1, mac2, "(") #)
18111 macro = mac2[1]
18112 prefix = substr(line, 1, index(line, defundef) - 1)
18113 if (D_is_set[macro]) {
18114 # Preserve the white space surrounding the "#".
18115 print prefix "define", macro P[macro] D[macro]
18116 next
18117 } else {
18118 # Replace #undef with comments. This is necessary, for example,
18119 # in the case of _POSIX_SOURCE, which is predefined and required
18120 # on some systems where configure will not decide to define it.
18121 if (defundef == "undef") {
18122 print "/*", prefix defundef, macro, "*/"
18123 next
18124 }
18125 }
18126}
18127{ print }
18128_ACAWK
18129_ACEOF
18130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018131 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018132fi # test -n "$CONFIG_HEADERS"
18133
18134
18135eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18136shift
18137for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138do
18139 case $ac_tag in
18140 :[FHLC]) ac_mode=$ac_tag; continue;;
18141 esac
18142 case $ac_mode$ac_tag in
18143 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018144 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145 :[FH]-) ac_tag=-:-;;
18146 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18147 esac
18148 ac_save_IFS=$IFS
18149 IFS=:
18150 set x $ac_tag
18151 IFS=$ac_save_IFS
18152 shift
18153 ac_file=$1
18154 shift
18155
18156 case $ac_mode in
18157 :L) ac_source=$1;;
18158 :[FH])
18159 ac_file_inputs=
18160 for ac_f
18161 do
18162 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018163 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164 *) # Look for the file first in the build tree, then in the source tree
18165 # (if the path is not absolute). The absolute path cannot be DOS-style,
18166 # because $ac_f cannot contain `:'.
18167 test -f "$ac_f" ||
18168 case $ac_f in
18169 [\\/$]*) false;;
18170 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18171 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018172 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018174 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18175 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018176 done
18177
18178 # Let's still pretend it is `configure' which instantiates (i.e., don't
18179 # use $as_me), people would be surprised to read:
18180 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018181 configure_input='Generated from '`
18182 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18183 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 if test x"$ac_file" != x-; then
18185 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018186 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18187$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018189 # Neutralize special characters interpreted by sed in replacement strings.
18190 case $configure_input in #(
18191 *\&* | *\|* | *\\* )
18192 ac_sed_conf_input=`$as_echo "$configure_input" |
18193 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18194 *) ac_sed_conf_input=$configure_input;;
18195 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196
18197 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018198 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18199 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200 esac
18201 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018202 esac
18203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018205$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018206 X"$ac_file" : 'X\(//\)[^/]' \| \
18207 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018209$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18211 s//\1/
18212 q
18213 }
18214 /^X\(\/\/\)[^/].*/{
18215 s//\1/
18216 q
18217 }
18218 /^X\(\/\/\)$/{
18219 s//\1/
18220 q
18221 }
18222 /^X\(\/\).*/{
18223 s//\1/
18224 q
18225 }
18226 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018227 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 ac_builddir=.
18229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230case "$ac_dir" in
18231.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18232*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018233 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236 case $ac_top_builddir_sub in
18237 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18238 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18239 esac ;;
18240esac
18241ac_abs_top_builddir=$ac_pwd
18242ac_abs_builddir=$ac_pwd$ac_dir_suffix
18243# for backward compatibility:
18244ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018245
18246case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249 ac_top_srcdir=$ac_top_builddir_sub
18250 ac_abs_top_srcdir=$ac_pwd ;;
18251 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018252 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018253 ac_top_srcdir=$srcdir
18254 ac_abs_top_srcdir=$srcdir ;;
18255 *) # Relative name.
18256 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18257 ac_top_srcdir=$ac_top_build_prefix$srcdir
18258 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018259esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018260ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018261
Martin v. Löwis11437992002-04-12 09:54:03 +000018262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263 case $ac_mode in
18264 :F)
18265 #
18266 # CONFIG_FILE
18267 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018268
18269 case $INSTALL in
18270 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018271 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018273 ac_MKDIR_P=$MKDIR_P
18274 case $MKDIR_P in
18275 [\\/$]* | ?:[\\/]* ) ;;
18276 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18277 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018278_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279
Matthias Kloseb9621712010-04-24 17:59:49 +000018280cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018281# If the template does not know about datarootdir, expand it.
18282# FIXME: This hack should be removed a few years after 2.60.
18283ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018284ac_sed_dataroot='
18285/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286 p
18287 q
18288}
18289/@datadir@/p
18290/@docdir@/p
18291/@infodir@/p
18292/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018293/@mandir@/p'
18294case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295*datarootdir*) ac_datarootdir_seen=yes;;
18296*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18298$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301 ac_datarootdir_hack='
18302 s&@datadir@&$datadir&g
18303 s&@docdir@&$docdir&g
18304 s&@infodir@&$infodir&g
18305 s&@localedir@&$localedir&g
18306 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018307 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308esac
18309_ACEOF
18310
18311# Neutralize VPATH when `$srcdir' = `.'.
18312# Shell code in configure.ac might set extrasub.
18313# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018314cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18315ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018316$extrasub
18317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018319:t
18320/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018321s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018323s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018324s&@srcdir@&$ac_srcdir&;t t
18325s&@abs_srcdir@&$ac_abs_srcdir&;t t
18326s&@top_srcdir@&$ac_top_srcdir&;t t
18327s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18328s&@builddir@&$ac_builddir&;t t
18329s&@abs_builddir@&$ac_abs_builddir&;t t
18330s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18331s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018332s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018333$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018334"
Victor Stinnere0be4232011-10-25 13:06:09 +020018335eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18336 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018339 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18340 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18341 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018343which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018344$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018345which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018346
Victor Stinnere0be4232011-10-25 13:06:09 +020018347 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018349 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18350 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018351 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018352 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353 ;;
18354 :H)
18355 #
18356 # CONFIG_HEADER
18357 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018358 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018359 {
18360 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018361 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18362 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018363 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018364 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018365 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18366$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018367 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018368 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018369 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018371 fi
18372 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018373 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018374 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018375 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018376 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379
18380 esac
18381
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018382
18383 case $ac_file$ac_mode in
18384 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18385
18386 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387done # for ac_tag
18388
Guido van Rossum627b2d71993-12-24 10:39:16 +000018389
Matthias Kloseb9621712010-04-24 17:59:49 +000018390as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018391_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018392ac_clean_files=$ac_clean_files_save
18393
Matthias Kloseb9621712010-04-24 17:59:49 +000018394test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018395 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018396
Martin v. Löwis11437992002-04-12 09:54:03 +000018397
18398# configure is writing to config.log, and then calls config.status.
18399# config.status does its own redirection, appending to config.log.
18400# Unfortunately, on DOS this fails, as config.log is still kept open
18401# by configure, so config.status won't be able to write to it; its
18402# output is simply discarded. So we exec the FD to /dev/null,
18403# effectively closing config.log, so it can be properly (re)opened and
18404# appended to by config.status. When coming back to configure, we
18405# need to make the FD available again.
18406if test "$no_create" != yes; then
18407 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018408 ac_config_status_args=
18409 test "$silent" = yes &&
18410 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018411 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018412 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 exec 5>>config.log
18414 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18415 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018416 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018417fi
18418if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18419 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18420$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018421fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018422
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018423
Christian Heimes75ed8902013-11-20 01:11:18 +010018424echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018425if test ! -f Modules/Setup
18426then
18427 cp $srcdir/Modules/Setup.dist Modules/Setup
18428fi
18429
Christian Heimes75ed8902013-11-20 01:11:18 +010018430echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018431if test ! -f Modules/Setup.local
18432then
18433 echo "# Edit this file for local setup changes" >Modules/Setup.local
18434fi
18435
Christian Heimes75ed8902013-11-20 01:11:18 +010018436echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018437$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018438 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018439 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018440mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018441
18442if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18443 echo "" >&6
18444 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018445 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 +000018446 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018447 echo "" >&6
18448 echo "" >&6
18449fi
18450