blob: b4dc5f132884f560a7becb0737add9216bc21ade [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
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
671OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700672LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700673target_os
674target_vendor
675target_cpu
676target
677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700683LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
697RANLIB
698GNULD
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
730SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000751GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200753PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_fpectl
840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700897runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001150 -runstatedir | --runstatedir | --runstatedi | --runstated \
1151 | --runstate | --runstat | --runsta | --runst | --runs \
1152 | --run | --ru | --r)
1153 ac_prev=runstatedir ;;
1154 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156 | --run=* | --ru=* | --r=*)
1157 runstatedir=$ac_optarg ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160 ac_prev=sbindir ;;
1161 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
1165 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167 | --sharedst | --shareds | --shared | --share | --shar \
1168 | --sha | --sh)
1169 ac_prev=sharedstatedir ;;
1170 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176 -site | --site | --sit)
1177 ac_prev=site ;;
1178 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182 ac_prev=srcdir ;;
1183 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001186 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187 | --syscon | --sysco | --sysc | --sys | --sy)
1188 ac_prev=sysconfdir ;;
1189 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199 verbose=yes ;;
1200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 -version | --version | --versio | --versi | --vers | -V)
1202 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001224 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt_orig=$ac_useropt
1226 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227 case $ac_user_opts in
1228 *"
1229"with_$ac_useropt"
1230"*) ;;
1231 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232 ac_unrecognized_sep=', ';;
1233 esac
1234 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 --x)
1237 # Obsolete; use --with-x.
1238 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241 | --x-incl | --x-inc | --x-in | --x-i)
1242 ac_prev=x_includes ;;
1243 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
1247 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249 ac_prev=x_libraries ;;
1250 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 *=*)
1259 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 case $ac_envvar in #(
1262 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 export $ac_envvar ;;
1267
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001268 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001273 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274 ;;
1275
1276 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277done
1278
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
1283
Matthias Kloseb9621712010-04-24 17:59:49 +00001284if test -n "$ac_unrecognized_opts"; then
1285 case $enable_option_checking in
1286 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289 esac
1290fi
1291
1292# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294 datadir sysconfdir sharedstatedir localstatedir includedir \
1295 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001296 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 # Remove trailing slashes.
1300 case $ac_val in
1301 */ )
1302 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303 eval $ac_var=\$ac_val;;
1304 esac
1305 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307 [\\/$]* | ?:[\\/]* ) continue;;
1308 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001311done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319
Martin v. Löwis11437992002-04-12 09:54:03 +00001320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322 if test "x$build_alias" = x; then
1323 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 elif test "x$build_alias" != "x$host_alias"; then
1325 cross_compiling=yes
1326 fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341
1342
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349 X"$as_myself" : 'X\(//\)[^/]' \| \
1350 X"$as_myself" : 'X\(//\)$' \| \
1351 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)[^/].*/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)$/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\).*/{
1366 s//\1/
1367 q
1368 }
1369 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372 srcdir=..
1373 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001374else
1375 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377if test ! -r "$srcdir/$ac_unique_file"; then
1378 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001384 pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387 srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_env_${ac_var}_value=\$${ac_var}
1398 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001401
Martin v. Löwis11437992002-04-12 09:54:03 +00001402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406 # Omit some internal or obsolete options to make the list less imposing.
1407 # This message is too long to be a string in the A/UX 3.1 sh.
1408 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001409\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE. See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419 -h, --help display this help and exit
1420 --help=short display options specific to this package
1421 --help=recursive display the short help of all the included packages
1422 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001423 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --cache-file=FILE cache test results in FILE [disabled]
1425 -C, --config-cache alias for \`--cache-file=config.cache'
1426 -n, --no-create do not create output files
1427 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429Installation directories:
1430 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --bindir=DIR user executables [EPREFIX/bin]
1444 --sbindir=DIR system admin executables [EPREFIX/sbin]
1445 --libexecdir=DIR program executables [EPREFIX/libexec]
1446 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1447 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1448 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001449 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001470 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001471_ACEOF
1472fi
1473
1474if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001476 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 cat <<\_ACEOF
1479
1480Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001481 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001484 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001485 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-framework[=INSTALLDIR]
1487 Build (MacOSX|Darwin) framework
1488 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001489 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001490 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1491 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001492 --enable-loadable-sqlite-extensions
1493 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --enable-ipv6 Enable ipv6 (with ipv4) support
1495 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001496 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499Optional Packages:
1500 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1501 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001502 --with-universal-archs=ARCH
1503 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001504 "64-bit", "3-way", "intel", "intel-32", 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
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001515 --with-lto Enable Link Time Optimization in PGO builds.
1516 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001517 --with-hash-algorithm=[fnv|siphash24]
1518 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001519 --with-address-sanitizer
1520 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001522 --with-system-expat build pyexpat module using an installed expat
1523 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001524 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001525 --with-system-libmpdec build _decimal module using an installed libmpdec
1526 library
Ned Deilyd819b932013-09-06 01:07:05 -07001527 --with-tcltk-includes='-I...'
1528 override search for Tcl and Tk include files
1529 --with-tcltk-libs='-L...'
1530 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001531 --with-dbmliborder=db1:db2:...
1532 order to check db backends for dbm. Valid value is a
1533 colon separated string with the backend names
1534 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with(out)-threads[=DIRECTORY]
1536 disable/enable thread support
1537 --with(out)-thread[=DIRECTORY]
1538 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-doc-strings disable/enable documentation strings
1540 --with(out)-pymalloc disable/enable specialized mallocs
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-fpectl enable SIGFPE catching
1544 --with-libm=STRING math library
1545 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001546 --with(out)-computed-gotos
1547 Use computed gotos in evaluation loop (enabled by
1548 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001549 --with(out)-ensurepip=[=upgrade]
1550 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001634python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily4829bc62016-09-12 17:29:04 -04002343It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712if test -e $srcdir/.git/HEAD
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily554626a2017-03-20 23:41:52 -04002757 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2758 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
2882if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test -n "$PYTHON_FOR_GEN"; then
2886 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2895 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
2905PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2906if test -n "$PYTHON_FOR_GEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2908$as_echo "$PYTHON_FOR_GEN" >&6; }
2909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
2915 test -n "$PYTHON_FOR_GEN" && break
2916done
2917test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2918
2919if test "$PYTHON_FOR_GEN" = not-found; then
2920 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2921 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2922 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2923fi
2924
2925
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926if test "$cross_compiling" = yes; then
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2928$as_echo_n "checking for python interpreter for cross build... " >&6; }
2929 if test -z "$PYTHON_FOR_BUILD"; then
2930 for interp in python$PACKAGE_VERSION python3 python; do
2931 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002932 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 +02002933 break
2934 fi
2935 interp=
2936 done
2937 if test x$interp = x; then
2938 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2939 fi
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2941$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002942 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 +02002943 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002944 # Used to comment out stuff for rebuilding generated files
2945 GENERATED_COMMENT='#'
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'
Martin Panter43a94a72016-07-29 05:52:32 +00002950 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Martin Pantereac67be2016-07-28 01:28:27 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily4829bc62016-09-12 17:29:04 -04002970VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000
3001
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3004# them.
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007
3008
3009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003012# Arguments passed to configure.
3013
3014CONFIG_ARGS="$ac_configure_args"
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3017$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003019if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 case $enableval in
3022 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 # Locate the best usable SDK, see Mac/README.txt for more
3024 # information
3025 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003026 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3029 if test ! -d "${enableval}"
3030 then
3031 enableval=/
3032 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
3036 case $enableval in
3037 no)
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040 ;;
3041 *)
3042 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 if test ! -d "${UNIVERSALSDK}"
3044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003045 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 ;;
3048 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051else
3052
3053 UNIVERSALSDK=
3054 enable_universalsdk=
3055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058if test -n "${UNIVERSALSDK}"
3059then
Matthias Kloseb9621712010-04-24 17:59:49 +00003060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3061$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062else
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deily87adb6e2013-10-18 21:09:56 -07003069ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003078 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094fi
3095
Ned Deily87adb6e2013-10-18 21:09:56 -07003096if test -n "${UNIVERSALSDK}"
3097then
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3100else
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105
3106# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 withval=$with_framework_name;
3109 PYTHONFRAMEWORK=${withval}
3110 PYTHONFRAMEWORKDIR=${withval}.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3112
3113else
3114
3115 PYTHONFRAMEWORK=Python
3116 PYTHONFRAMEWORKDIR=Python.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3118
3119fi
3120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003124 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003126 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 esac
3128 case $enableval in
3129 no)
3130 PYTHONFRAMEWORK=
3131 PYTHONFRAMEWORKDIR=no-framework
3132 PYTHONFRAMEWORKPREFIX=
3133 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST=
3135 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 FRAMEWORKALTINSTALLFIRST=
3137 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003153 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 if test "x${prefix}" = "xNONE" ; then
3157 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
3163 case "${enableval}" in
3164 /System*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 if test "${prefix}" = "NONE" ; then
3167 # See below
3168 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3169 fi
3170 ;;
3171
3172 /Library*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175
3176 */Library/Frameworks)
3177 MDIR="`dirname "${enableval}"`"
3178 MDIR="`dirname "${MDIR}"`"
3179 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3180
3181 if test "${prefix}" = "NONE"; then
3182 # User hasn't specified the
3183 # --prefix option, but wants to install
3184 # the framework in a non-default location,
3185 # ensure that the compatibility links get
3186 # installed relative to that prefix as well
3187 # instead of in /usr/local.
3188 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3189 fi
3190 ;;
3191
3192 *)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195 esac
3196
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003205 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3206
3207 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Guido van Rossum563e7081996-09-10 18:20:48 +00003211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORKPREFIX=
3216 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST=
3218 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219 FRAMEWORKALTINSTALLFIRST=
3220 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003261 *-*-linux-android*)
3262 ac_sys_system=Linux-android
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *-*-linux*)
3265 ac_sys_system=Linux
3266 ;;
3267 *-*-cygwin*)
3268 ac_sys_system=Cygwin
3269 ;;
3270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003292 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003294 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003295 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
Guido van Rossum91922671997-10-09 20:24:13 +00003299
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003300
3301if test "$cross_compiling" = yes; then
3302 case "$host" in
3303 *-*-linux*)
3304 case "$host_cpu" in
3305 arm*)
3306 _host_cpu=arm
3307 ;;
3308 *)
3309 _host_cpu=$host_cpu
3310 esac
3311 ;;
3312 *-*-cygwin*)
3313 _host_cpu=
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On FreeBSD 4, the math functions C89 does not cover are never defined
3377 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3378 FreeBSD/4.*)
3379 define_xopen_source=no;;
3380 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3381 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3382 # identifies itself as Darwin/7.*
3383 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3384 # disables platform specific features beyond repair.
3385 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3386 # has no effect, don't bother defining them
3387 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003388 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003389 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3392 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3393 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003394 AIX/4)
3395 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003396 AIX/5)
3397 if test `uname -r` -eq 1; then
3398 define_xopen_source=no
3399 fi
3400 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003401 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3402 # defining NI_NUMERICHOST.
3403 QNX/6.3.2)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Guido van Rossum91922671997-10-09 20:24:13 +00003444#
3445# SGI compilers allow the specification of the both the ABI and the
3446# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003447# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003448#
3449# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3450# thus supply support for various ABI/ISA combinations. The MACHDEP
3451# variable is also adjusted.
3452#
3453
3454if test ! -z "$SGI_ABI"
3455then
3456 CC="cc $SGI_ABI"
3457 LDFLAGS="$SGI_ABI $LDFLAGS"
3458 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3461$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3464# it may influence the way we can build extensions, so distutils
3465# needs to check it
3466
Thomas Wouters477c8d52006-05-27 19:21:47 +00003467
Jack Jansen6b08a402004-06-03 12:41:45 +00003468CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003469EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003470
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003472
3473# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3474# for debug/optimization stuff. BASECFLAGS is for flags that are required
3475# just to get things to compile and link. Users are free to override OPT
3476# when running configure or make. The build should not break if they do.
3477# BASECFLAGS should generally not be messed with, however.
3478
3479# XXX shouldn't some/most/all of this code be merged with the stuff later
3480# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3482$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003485if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003487 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003488 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003489 without_gcc=yes;;
3490 yes) CC=gcc
3491 without_gcc=no;;
3492 *) CC=$withval
3493 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003494 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003495else
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003497 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003498 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003499 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003500 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003501 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003502fi
3503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3505$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Zachary Ware5af85642015-12-21 12:09:17 -06003507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3508$as_echo_n "checking for --with-icc... " >&6; }
3509
3510# Check whether --with-icc was given.
3511if test "${with_icc+set}" = set; then :
3512 withval=$with_icc;
3513 case $withval in
3514 no) CC=${CC:-cc}
3515 with_icc=no;;
3516 yes) CC=icc
3517 CXX=icpc
3518 with_icc=yes;;
3519 *) CC=$withval
3520 with_icc=$withval;;
3521 esac
3522else
3523
3524 with_icc=no
3525fi
3526
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3528$as_echo "$with_icc" >&6; }
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 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 Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004392ac_ext=c
4393ac_cpp='$CPP $CPPFLAGS'
4394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4396ac_compiler_gnu=$ac_cv_c_compiler_gnu
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4398$as_echo_n "checking how to run the C preprocessor... " >&6; }
4399# On Suns, sometimes $CPP names a directory.
4400if test -n "$CPP" && test -d "$CPP"; then
4401 CPP=
4402fi
4403if test -z "$CPP"; then
4404 if ${ac_cv_prog_CPP+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 # Double quotes because CPP needs to be expanded
4408 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4409 do
4410 ac_preproc_ok=false
4411for ac_c_preproc_warn_flag in '' yes
4412do
4413 # Use a header file that comes with gcc, so configuring glibc
4414 # with a fresh cross-compiler works.
4415 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4416 # <limits.h> exists even on freestanding compilers.
4417 # On the NeXT, cc -E runs the code through the compiler's parser,
4418 # not just through cpp. "Syntax error" is here to catch this case.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#ifdef __STDC__
4422# include <limits.h>
4423#else
4424# include <assert.h>
4425#endif
4426 Syntax error
4427_ACEOF
4428if ac_fn_c_try_cpp "$LINENO"; then :
4429
4430else
4431 # Broken: fails on valid input.
4432continue
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436 # OK, works on sane cases. Now check whether nonexistent headers
4437 # can be detected and how.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#include <ac_nonexistent.h>
4441_ACEOF
4442if ac_fn_c_try_cpp "$LINENO"; then :
4443 # Broken: success on invalid input.
4444continue
4445else
4446 # Passes both tests.
4447ac_preproc_ok=:
4448break
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452done
4453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4454rm -f conftest.i conftest.err conftest.$ac_ext
4455if $ac_preproc_ok; then :
4456 break
4457fi
4458
4459 done
4460 ac_cv_prog_CPP=$CPP
4461
4462fi
4463 CPP=$ac_cv_prog_CPP
4464else
4465 ac_cv_prog_CPP=$CPP
4466fi
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4468$as_echo "$CPP" >&6; }
4469ac_preproc_ok=false
4470for ac_c_preproc_warn_flag in '' yes
4471do
4472 # Use a header file that comes with gcc, so configuring glibc
4473 # with a fresh cross-compiler works.
4474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4475 # <limits.h> exists even on freestanding compilers.
4476 # On the NeXT, cc -E runs the code through the compiler's parser,
4477 # not just through cpp. "Syntax error" is here to catch this case.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#ifdef __STDC__
4481# include <limits.h>
4482#else
4483# include <assert.h>
4484#endif
4485 Syntax error
4486_ACEOF
4487if ac_fn_c_try_cpp "$LINENO"; then :
4488
4489else
4490 # Broken: fails on valid input.
4491continue
4492fi
4493rm -f conftest.err conftest.i conftest.$ac_ext
4494
4495 # OK, works on sane cases. Now check whether nonexistent headers
4496 # can be detected and how.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ac_nonexistent.h>
4500_ACEOF
4501if ac_fn_c_try_cpp "$LINENO"; then :
4502 # Broken: success on invalid input.
4503continue
4504else
4505 # Passes both tests.
4506ac_preproc_ok=:
4507break
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511done
4512# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4513rm -f conftest.i conftest.err conftest.$ac_ext
4514if $ac_preproc_ok; then :
4515
4516else
4517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4518$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4519as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4520See \`config.log' for more details" "$LINENO" 5; }
4521fi
4522
4523ac_ext=c
4524ac_cpp='$CPP $CPPFLAGS'
4525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4527ac_compiler_gnu=$ac_cv_c_compiler_gnu
4528
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4530$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4531if ${ac_cv_path_GREP+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 if test -z "$GREP"; then
4535 ac_path_GREP_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in grep ggrep; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4545 as_fn_executable_p "$ac_path_GREP" || continue
4546# Check for GNU ac_path_GREP and select it if it is found.
4547 # Check for GNU $ac_path_GREP
4548case `"$ac_path_GREP" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4551*)
4552 ac_count=0
4553 $as_echo_n 0123456789 >"conftest.in"
4554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
4559 $as_echo 'GREP' >> "conftest.nl"
4560 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_GREP="$ac_path_GREP"
4566 ac_path_GREP_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_GREP_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_GREP"; then
4580 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_GREP=$GREP
4584fi
4585
4586fi
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4588$as_echo "$ac_cv_path_GREP" >&6; }
4589 GREP="$ac_cv_path_GREP"
4590
4591
Łukasz Langaa785c872016-09-09 17:37:37 -07004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4593$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4594if ${ac_cv_path_SED+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
4597 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4598 for ac_i in 1 2 3 4 5 6 7; do
4599 ac_script="$ac_script$as_nl$ac_script"
4600 done
4601 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4602 { ac_script=; unset ac_script;}
4603 if test -z "$SED"; then
4604 ac_path_SED_found=false
4605 # Loop through the user's path and test for each of PROGNAME-LIST
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_prog in sed gsed; do
4612 for ac_exec_ext in '' $ac_executable_extensions; do
4613 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4614 as_fn_executable_p "$ac_path_SED" || continue
4615# Check for GNU ac_path_SED and select it if it is found.
4616 # Check for GNU $ac_path_SED
4617case `"$ac_path_SED" --version 2>&1` in
4618*GNU*)
4619 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4620*)
4621 ac_count=0
4622 $as_echo_n 0123456789 >"conftest.in"
4623 while :
4624 do
4625 cat "conftest.in" "conftest.in" >"conftest.tmp"
4626 mv "conftest.tmp" "conftest.in"
4627 cp "conftest.in" "conftest.nl"
4628 $as_echo '' >> "conftest.nl"
4629 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4630 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4631 as_fn_arith $ac_count + 1 && ac_count=$as_val
4632 if test $ac_count -gt ${ac_path_SED_max-0}; then
4633 # Best one so far, save it but keep looking for a better one
4634 ac_cv_path_SED="$ac_path_SED"
4635 ac_path_SED_max=$ac_count
4636 fi
4637 # 10*(2^10) chars as input seems more than enough
4638 test $ac_count -gt 10 && break
4639 done
4640 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4641esac
4642
4643 $ac_path_SED_found && break 3
4644 done
4645 done
4646 done
4647IFS=$as_save_IFS
4648 if test -z "$ac_cv_path_SED"; then
4649 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4650 fi
4651else
4652 ac_cv_path_SED=$SED
4653fi
4654
4655fi
4656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4657$as_echo "$ac_cv_path_SED" >&6; }
4658 SED="$ac_cv_path_SED"
4659 rm -f conftest.sed
4660
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004661
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663
Matthias Kloseb9621712010-04-24 17:59:49 +00004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4665$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004667# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004668if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670
4671 case $withval in
4672 no) with_cxx_main=no
4673 MAINCC='$(CC)';;
4674 yes) with_cxx_main=yes
4675 MAINCC='$(CXX)';;
4676 *) with_cxx_main=yes
4677 MAINCC=$withval
4678 if test -z "$CXX"
4679 then
4680 CXX=$withval
4681 fi;;
4682 esac
4683else
4684
4685 with_cxx_main=no
4686 MAINCC='$(CC)'
4687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004688fi
4689
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4691$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692
4693preset_cxx="$CXX"
4694if test -z "$CXX"
4695then
4696 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 gcc) if test -n "$ac_tool_prefix"; then
4698 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4699set dummy ${ac_tool_prefix}g++; ac_word=$2
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_CXX+:} false; then :
4703 $as_echo_n "(cached) " >&6
4704else
4705 case $CXX in
4706 [\\/]* | ?:[\\/]*)
4707 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4708 ;;
4709 *)
4710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in notfound
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
4715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004717 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4719 break 2
4720 fi
4721done
4722 done
4723IFS=$as_save_IFS
4724
4725 ;;
4726esac
4727fi
4728CXX=$ac_cv_path_CXX
4729if test -n "$CXX"; then
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4731$as_echo "$CXX" >&6; }
4732else
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736
4737
4738fi
4739if test -z "$ac_cv_path_CXX"; then
4740 ac_pt_CXX=$CXX
4741 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745if ${ac_cv_path_ac_pt_CXX+:} false; then :
4746 $as_echo_n "(cached) " >&6
4747else
4748 case $ac_pt_CXX in
4749 [\\/]* | ?:[\\/]*)
4750 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4751 ;;
4752 *)
4753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in notfound
4755do
4756 IFS=$as_save_IFS
4757 test -z "$as_dir" && as_dir=.
4758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762 break 2
4763 fi
4764done
4765 done
4766IFS=$as_save_IFS
4767
4768 ;;
4769esac
4770fi
4771ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4772if test -n "$ac_pt_CXX"; then
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4774$as_echo "$ac_pt_CXX" >&6; }
4775else
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780 if test "x$ac_pt_CXX" = x; then
4781 CXX="g++"
4782 else
4783 case $cross_compiling:$ac_tool_warned in
4784yes:)
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4787ac_tool_warned=yes ;;
4788esac
4789 CXX=$ac_pt_CXX
4790 fi
4791else
4792 CXX="$ac_cv_path_CXX"
4793fi
4794 ;;
4795 cc) if test -n "$ac_tool_prefix"; then
4796 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4797set dummy ${ac_tool_prefix}c++; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004800if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802else
4803 case $CXX in
4804 [\\/]* | ?:[\\/]*)
4805 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4806 ;;
4807 *)
4808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in notfound
4810do
4811 IFS=$as_save_IFS
4812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 break 2
4818 fi
4819done
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
4824esac
4825fi
4826CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004827if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4829$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004830else
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835
4836fi
4837if test -z "$ac_cv_path_CXX"; then
4838 ac_pt_CXX=$CXX
4839 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004845else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004846 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 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 +00004849 ;;
4850 *)
4851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in notfound
4853do
4854 IFS=$as_save_IFS
4855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 break 2
4861 fi
4862done
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866 ;;
4867esac
4868fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4870if test -n "$ac_pt_CXX"; then
4871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4872$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004873else
Matthias Kloseb9621712010-04-24 17:59:49 +00004874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 if test "x$ac_pt_CXX" = x; then
4879 CXX="c++"
4880 else
4881 case $cross_compiling:$ac_tool_warned in
4882yes:)
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4885ac_tool_warned=yes ;;
4886esac
4887 CXX=$ac_pt_CXX
4888 fi
4889else
4890 CXX="$ac_cv_path_CXX"
4891fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 clang|*/clang) if test -n "$ac_tool_prefix"; then
4894 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4895set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
4898if ${ac_cv_path_CXX+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900else
4901 case $CXX in
4902 [\\/]* | ?:[\\/]*)
4903 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4904 ;;
4905 *)
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in notfound
4908do
4909 IFS=$as_save_IFS
4910 test -z "$as_dir" && as_dir=.
4911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4915 break 2
4916 fi
4917done
4918 done
4919IFS=$as_save_IFS
4920
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
4922esac
4923fi
4924CXX=$ac_cv_path_CXX
4925if test -n "$CXX"; then
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4927$as_echo "$CXX" >&6; }
4928else
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004933
4934fi
4935if test -z "$ac_cv_path_CXX"; then
4936 ac_pt_CXX=$CXX
4937 # Extract the first word of "clang++", so it can be a program name with args.
4938set dummy clang++; ac_word=$2
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
4941if ${ac_cv_path_ac_pt_CXX+:} false; then :
4942 $as_echo_n "(cached) " >&6
4943else
4944 case $ac_pt_CXX in
4945 [\\/]* | ?:[\\/]*)
4946 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4947 ;;
4948 *)
4949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950for as_dir in notfound
4951do
4952 IFS=$as_save_IFS
4953 test -z "$as_dir" && as_dir=.
4954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004956 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4958 break 2
4959 fi
4960done
4961 done
4962IFS=$as_save_IFS
4963
4964 ;;
4965esac
4966fi
4967ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4968if test -n "$ac_pt_CXX"; then
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4970$as_echo "$ac_pt_CXX" >&6; }
4971else
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4973$as_echo "no" >&6; }
4974fi
4975
4976 if test "x$ac_pt_CXX" = x; then
4977 CXX="clang++"
4978 else
4979 case $cross_compiling:$ac_tool_warned in
4980yes:)
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4983ac_tool_warned=yes ;;
4984esac
4985 CXX=$ac_pt_CXX
4986 fi
4987else
4988 CXX="$ac_cv_path_CXX"
4989fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004990 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004991 icc|*/icc) if test -n "$ac_tool_prefix"; then
4992 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4993set dummy ${ac_tool_prefix}icpc; ac_word=$2
4994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4995$as_echo_n "checking for $ac_word... " >&6; }
4996if ${ac_cv_path_CXX+:} false; then :
4997 $as_echo_n "(cached) " >&6
4998else
4999 case $CXX in
5000 [\\/]* | ?:[\\/]*)
5001 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5002 ;;
5003 *)
5004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5005for as_dir in notfound
5006do
5007 IFS=$as_save_IFS
5008 test -z "$as_dir" && as_dir=.
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5011 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5013 break 2
5014 fi
5015done
5016 done
5017IFS=$as_save_IFS
5018
5019 ;;
5020esac
5021fi
5022CXX=$ac_cv_path_CXX
5023if test -n "$CXX"; then
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5025$as_echo "$CXX" >&6; }
5026else
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5028$as_echo "no" >&6; }
5029fi
5030
5031
5032fi
5033if test -z "$ac_cv_path_CXX"; then
5034 ac_pt_CXX=$CXX
5035 # Extract the first word of "icpc", so it can be a program name with args.
5036set dummy icpc; ac_word=$2
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038$as_echo_n "checking for $ac_word... " >&6; }
5039if ${ac_cv_path_ac_pt_CXX+:} false; then :
5040 $as_echo_n "(cached) " >&6
5041else
5042 case $ac_pt_CXX in
5043 [\\/]* | ?:[\\/]*)
5044 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5045 ;;
5046 *)
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in notfound
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
5052 for ac_exec_ext in '' $ac_executable_extensions; do
5053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056 break 2
5057 fi
5058done
5059 done
5060IFS=$as_save_IFS
5061
5062 ;;
5063esac
5064fi
5065ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5066if test -n "$ac_pt_CXX"; then
5067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5068$as_echo "$ac_pt_CXX" >&6; }
5069else
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
5072fi
5073
5074 if test "x$ac_pt_CXX" = x; then
5075 CXX="icpc"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
5079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5081ac_tool_warned=yes ;;
5082esac
5083 CXX=$ac_pt_CXX
5084 fi
5085else
5086 CXX="$ac_cv_path_CXX"
5087fi
5088 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 esac
5090 if test "$CXX" = "notfound"
5091 then
5092 CXX=""
5093 fi
5094fi
5095if test -z "$CXX"
5096then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005104if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106else
5107 if test -n "$CXX"; then
5108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005117 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119 break 2
5120 fi
5121done
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125fi
5126fi
5127CXX=$ac_cv_prog_CXX
5128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131else
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 test -n "$CXX" && break
5138 done
5139fi
5140if test -z "$CXX"; then
5141 ac_ct_CXX=$CXX
5142 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5149 $as_echo_n "(cached) " >&6
5150else
5151 if test -n "$ac_ct_CXX"; then
5152 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
5159 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005160 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005161 ac_cv_prog_ac_ct_CXX="$ac_prog"
5162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163 break 2
5164 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005165done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5172if test -n "$ac_ct_CXX"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5174$as_echo "$ac_ct_CXX" >&6; }
5175else
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181 test -n "$ac_ct_CXX" && break
5182done
5183
5184 if test "x$ac_ct_CXX" = x; then
5185 CXX="notfound"
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5191ac_tool_warned=yes ;;
5192esac
5193 CXX=$ac_ct_CXX
5194 fi
5195fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196
5197 if test "$CXX" = "notfound"
5198 then
5199 CXX=""
5200 fi
5201fi
5202if test "$preset_cxx" != "$CXX"
5203then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005204 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005205
5206 By default, distutils will build C++ extension modules with \"$CXX\".
5207 If this is not intended, then set CXX on the configure command line.
5208 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005209$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210
5211 By default, distutils will build C++ extension modules with \"$CXX\".
5212 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005213 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005214fi
5215
5216
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005217MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5218
5219
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5221$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5222cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef bfin
5224#undef cris
5225#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005227#undef hppa
5228#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005230#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005231#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005232#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005233#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005234#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005235 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005236#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005237# if defined(__x86_64__) && defined(__LP64__)
5238 x86_64-linux-gnu
5239# elif defined(__x86_64__) && defined(__ILP32__)
5240 x86_64-linux-gnux32
5241# elif defined(__i386__)
5242 i386-linux-gnu
5243# elif defined(__aarch64__) && defined(__AARCH64EL__)
5244# if defined(__ILP32__)
5245 aarch64_ilp32-linux-gnu
5246# else
5247 aarch64-linux-gnu
5248# endif
5249# elif defined(__aarch64__) && defined(__AARCH64EB__)
5250# if defined(__ILP32__)
5251 aarch64_be_ilp32-linux-gnu
5252# else
5253 aarch64_be-linux-gnu
5254# endif
5255# elif defined(__alpha__)
5256 alpha-linux-gnu
5257# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabihf
5260# else
5261 armeb-linux-gnueabihf
5262# endif
5263# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5264# if defined(__ARMEL__)
5265 arm-linux-gnueabi
5266# else
5267 armeb-linux-gnueabi
5268# endif
5269# elif defined(__hppa__)
5270 hppa-linux-gnu
5271# elif defined(__ia64__)
5272 ia64-linux-gnu
5273# elif defined(__m68k__) && !defined(__mcoldfire__)
5274 m68k-linux-gnu
5275# elif defined(__mips_hard_float) && defined(_MIPSEL)
5276# if _MIPS_SIM == _ABIO32
5277 mipsel-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mips64el-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mips64el-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__mips_hard_float)
5286# if _MIPS_SIM == _ABIO32
5287 mips-linux-gnu
5288# elif _MIPS_SIM == _ABIN32
5289 mips64-linux-gnuabin32
5290# elif _MIPS_SIM == _ABI64
5291 mips64-linux-gnuabi64
5292# else
5293# error unknown platform triplet
5294# endif
5295# elif defined(__or1k__)
5296 or1k-linux-gnu
5297# elif defined(__powerpc__) && defined(__SPE__)
5298 powerpc-linux-gnuspe
5299# elif defined(__powerpc64__)
5300# if defined(__LITTLE_ENDIAN__)
5301 powerpc64le-linux-gnu
5302# else
5303 powerpc64-linux-gnu
5304# endif
5305# elif defined(__powerpc__)
5306 powerpc-linux-gnu
5307# elif defined(__s390x__)
5308 s390x-linux-gnu
5309# elif defined(__s390__)
5310 s390-linux-gnu
5311# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5312 sh4-linux-gnu
5313# elif defined(__sparc__) && defined(__arch64__)
5314 sparc64-linux-gnu
5315# elif defined(__sparc__)
5316 sparc-linux-gnu
5317# else
5318# error unknown platform triplet
5319# endif
5320#elif defined(__FreeBSD_kernel__)
5321# if defined(__LP64__)
5322 x86_64-kfreebsd-gnu
5323# elif defined(__i386__)
5324 i386-kfreebsd-gnu
5325# else
5326# error unknown platform triplet
5327# endif
5328#elif defined(__gnu_hurd__)
5329 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005330#elif defined(__APPLE__)
5331 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332#else
5333# error unknown platform triplet
5334#endif
5335
5336EOF
5337
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005338if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005339 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5341$as_echo "$PLATFORM_TRIPLET" >&6; }
5342else
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5344$as_echo "none" >&6; }
5345fi
5346rm -f conftest.c conftest.out
5347
5348if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5349 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5350 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5351 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005352elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5353 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005354fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355
doko@ubuntu.com55532312016-06-14 08:55:19 +02005356if test x$MULTIARCH != x; then
5357 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5358fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005359
5360
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5362$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5363save_LDFLAGS="$LDFLAGS"
5364LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005365
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367/* end confdefs.h. */
5368
5369int
5370main ()
5371{
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_link "$LINENO"; then :
5378 NO_AS_NEEDED="-Wl,--no-as-needed"
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380$as_echo "yes" >&6; }
5381else
5382 NO_AS_NEEDED=""
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5384$as_echo "no" >&6; }
5385fi
5386rm -f core conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388LDFLAGS="$save_LDFLAGS"
5389
5390
5391
5392# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393
Matthias Kloseb9621712010-04-24 17:59:49 +00005394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5395$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005396if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398else
5399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5400 then ac_cv_path_EGREP="$GREP -E"
5401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 # Loop through the user's path and test for each of PROGNAME-LIST
5405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5407do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 for ac_prog in egrep; do
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005413 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 # Check for GNU $ac_path_EGREP
5416case `"$ac_path_EGREP" --version 2>&1` in
5417*GNU*)
5418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5419*)
5420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 while :
5423 do
5424 cat "conftest.in" "conftest.in" >"conftest.tmp"
5425 mv "conftest.tmp" "conftest.in"
5426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5432 # Best one so far, save it but keep looking for a better one
5433 ac_cv_path_EGREP="$ac_path_EGREP"
5434 ac_path_EGREP_max=$ac_count
5435 fi
5436 # 10*(2^10) chars as input seems more than enough
5437 test $ac_count -gt 10 && break
5438 done
5439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5440esac
5441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $ac_path_EGREP_found && break 3
5443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005448 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 +00005449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450else
5451 ac_cv_path_EGREP=$EGREP
5452fi
5453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 fi
5455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005459
5460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5462$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005463if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 $as_echo_n "(cached) " >&6
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005468#include <stdlib.h>
5469#include <stdarg.h>
5470#include <string.h>
5471#include <float.h>
5472
5473int
5474main ()
5475{
5476
5477 ;
5478 return 0;
5479}
5480_ACEOF
5481if ac_fn_c_try_compile "$LINENO"; then :
5482 ac_cv_header_stdc=yes
5483else
5484 ac_cv_header_stdc=no
5485fi
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498else
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503fi
5504
5505if test $ac_cv_header_stdc = yes; then
5506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5508/* end confdefs.h. */
5509#include <stdlib.h>
5510
5511_ACEOF
5512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 $EGREP "free" >/dev/null 2>&1; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f conftest*
5519
5520fi
5521
5522if test $ac_cv_header_stdc = yes; then
5523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5524 if test "$cross_compiling" = yes; then :
5525 :
5526else
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529#include <ctype.h>
5530#include <stdlib.h>
5531#if ((' ' & 0x0FF) == 0x020)
5532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5534#else
5535# define ISLOWER(c) \
5536 (('a' <= (c) && (c) <= 'i') \
5537 || ('j' <= (c) && (c) <= 'r') \
5538 || ('s' <= (c) && (c) <= 'z'))
5539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5540#endif
5541
5542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5543int
5544main ()
5545{
5546 int i;
5547 for (i = 0; i < 256; i++)
5548 if (XOR (islower (i), ISLOWER (i))
5549 || toupper (i) != TOUPPER (i))
5550 return 2;
5551 return 0;
5552}
5553_ACEOF
5554if ac_fn_c_try_run "$LINENO"; then :
5555
5556else
5557 ac_cv_header_stdc=no
5558fi
5559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5560 conftest.$ac_objext conftest.beam conftest.$ac_ext
5561fi
5562
5563fi
5564fi
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5566$as_echo "$ac_cv_header_stdc" >&6; }
5567if test $ac_cv_header_stdc = yes; then
5568
5569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5570
5571fi
5572
5573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5575 inttypes.h stdint.h unistd.h
5576do :
5577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5579"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 cat >>confdefs.h <<_ACEOF
5582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5583_ACEOF
5584
5585fi
5586
5587done
5588
5589
5590
5591 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 +02005592if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 MINIX=yes
5594else
5595 MINIX=
5596fi
5597
5598
5599 if test "$MINIX" = yes; then
5600
5601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5602
5603
5604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5605
5606
5607$as_echo "#define _MINIX 1" >>confdefs.h
5608
5609 fi
5610
5611
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005614if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005615 $as_echo_n "(cached) " >&6
5616else
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005620# define __EXTENSIONS__ 1
5621 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005622int
5623main ()
5624{
5625
5626 ;
5627 return 0;
5628}
5629_ACEOF
5630if ac_fn_c_try_compile "$LINENO"; then :
5631 ac_cv_safe_to_define___extensions__=yes
5632else
5633 ac_cv_safe_to_define___extensions__=no
5634fi
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636fi
5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5639 test $ac_cv_safe_to_define___extensions__ = yes &&
5640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5641
5642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5643
5644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5645
5646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5647
5648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5649
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5653$as_echo_n "checking for the Android API level... " >&6; }
5654cat >> conftest.c <<EOF
5655#ifdef __ANDROID__
5656#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005657android_api = __ANDROID_API__
5658arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659#else
5660#error not Android
5661#endif
5662EOF
5663
5664if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005665 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5666 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5668$as_echo "$ANDROID_API_LEVEL" >&6; }
5669
5670cat >>confdefs.h <<_ACEOF
5671#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5672_ACEOF
5673
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5676$as_echo_n "checking for the Android arm ABI... " >&6; }
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5678$as_echo "$_arm_arch" >&6; }
5679 if test "$_arm_arch" = 7; then
5680 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5681 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5685$as_echo "not Android" >&6; }
5686fi
5687rm -f conftest.c conftest.out
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689# Check for unsupported systems
5690case $ac_sys_system/$ac_sys_release in
5691atheos*|Linux*/1*)
5692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5693 echo See README for details.
5694 exit 1;;
5695esac
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 withval=$with_suffix;
5704 case $withval in
5705 no) EXEEXT=;;
5706 yes) EXEEXT=.exe;;
5707 *) EXEEXT=$withval;;
5708 esac
5709fi
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Test whether we're running on a non-case-sensitive system, in which
5715# case we give a warning if no ext is given
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719if test ! -d CaseSensitiveTestDir; then
5720mkdir CaseSensitiveTestDir
5721fi
5722
5723if test -d casesensitivetestdir
5724then
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5726$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 BUILDEXEEXT=.exe
5728else
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 BUILDEXEEXT=$EXEEXT
5732fi
5733rmdir CaseSensitiveTestDir
5734
5735case $MACHDEP in
5736bsdos*)
5737 case $CC in
5738 gcc) CC="$CC -D_HAVE_BSDI";;
5739 esac;;
5740esac
5741
5742case $ac_sys_system in
5743hp*|HP*)
5744 case $CC in
5745 cc|*/cc) CC="$CC -Ae";;
5746 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747esac
5748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5751$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test -z "$LIBRARY"
5753then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005754 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5757$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
5759# LDLIBRARY is the name of the library to link against (as opposed to the
5760# name of the library into which to insert object files). BLDLIBRARY is also
5761# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5762# is blank as the main program is not linked directly against LDLIBRARY.
5763# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5764# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5765# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5766# DLLLIBRARY is the shared (i.e., DLL) library.
5767#
5768# RUNSHARED is used to run shared python without installed libraries
5769#
5770# INSTSONAME is the name of the shared library that will be use to install
5771# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005772#
5773# LDVERSION is the shared library version number, normally the Python version
5774# with the ABI build flags appended.
5775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777
5778
5779
5780
5781
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783LDLIBRARY="$LIBRARY"
5784BLDLIBRARY='$(LDLIBRARY)'
5785INSTSONAME='$(LDLIBRARY)'
5786DLLLIBRARY=''
5787LDLIBRARYDIR=''
5788RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005789LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791# LINKCC is the command that links the python executable -- default is $(CC).
5792# If CXX is set, and if it is needed to link a main function that was
5793# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5794# python might then depend on the C++ runtime
5795# This is altered for AIX in order to build the export list before
5796# linking.
5797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800if test -z "$LINKCC"
5801then
5802 LINKCC='$(PURIFY) $(MAINCC)'
5803 case $ac_sys_system in
5804 AIX*)
5805 exp_extra="\"\""
5806 if test $ac_sys_release -ge 5 -o \
5807 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5808 exp_extra="."
5809 fi
5810 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 QNX*)
5812 # qcc must be used because the other compilers do not
5813 # support -N.
5814 LINKCC=qcc;;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5818$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
5820# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5821# make sure we default having it set to "no": this is used by
5822# distutils.unixccompiler to know if it should add --enable-new-dtags
5823# to linker command lines, and failing to detect GNU ld simply results
5824# in the same bahaviour as before.
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5827$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828ac_prog=ld
5829if test "$GCC" = yes; then
5830 ac_prog=`$CC -print-prog-name=ld`
5831fi
5832case `"$ac_prog" -V 2>&1 < /dev/null` in
5833 *GNU*)
5834 GNULD=yes;;
5835 *)
5836 GNULD=no;;
5837esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5839$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5842$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005844if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845 enableval=$enable_shared;
5846fi
5847
5848
5849if test -z "$enable_shared"
5850then
5851 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005852 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853 enable_shared="yes";;
5854 *)
5855 enable_shared="no";;
5856 esac
5857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5859$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5862$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865 enableval=$enable_profiling;
5866fi
5867
5868if test "x$enable_profiling" = xyes; then
5869 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005870 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872/* end confdefs.h. */
5873int main() { return 0; }
5874_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875if ac_fn_c_try_link "$LINENO"; then :
5876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005878 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880rm -f core conftest.err conftest.$ac_objext \
5881 conftest$ac_exeext conftest.$ac_ext
5882 CC="$ac_save_cc"
5883else
5884 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5887$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
doko@ubuntu.comba015832012-06-30 16:52:05 +02005889if test "x$enable_profiling" = xyes; then
5890 BASECFLAGS="-pg $BASECFLAGS"
5891 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Matthias Kloseb9621712010-04-24 17:59:49 +00005894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5895$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896
5897# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5898# library that we build, but we do not want to link against it (we
5899# will find it with a -framework option). For this reason there is an
5900# extra variable BLDLIBRARY against which Python and the extension
5901# modules are linked, BLDLIBRARY. This is normally the same as
5902# LDLIBRARY, but empty for MacOSX framework builds.
5903if test "$enable_framework"
5904then
5905 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 BLDLIBRARY=''
5908else
5909 BLDLIBRARY='$(LDLIBRARY)'
5910fi
5911
5912# Other platforms follow
5913if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005914 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917
5918 case $ac_sys_system in
5919 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).dll.a'
5921 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005933 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
5935 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005938 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005939 then
5940 PY3LIBRARY=libpython3.so
5941 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 hp*|HP*)
5944 case `uname -m` in
5945 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
5948 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
5951 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dylib'
5957 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005958 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005960 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005962 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005963 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
5965 esac
5966else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005967 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 case $ac_sys_system in
5969 CYGWIN*)
5970 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005971 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
5973 esac
5974fi
5975
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005976if test "$cross_compiling" = yes; then
5977 RUNSHARED=
5978fi
5979
Matthias Kloseb9621712010-04-24 17:59:49 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5981$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982
5983if test -n "$ac_tool_prefix"; then
5984 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5985set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005988if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
5991 if test -n "$RANLIB"; then
5992 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997 IFS=$as_save_IFS
5998 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 break 2
6004 fi
6005done
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007IFS=$as_save_IFS
6008
6009fi
6010fi
6011RANLIB=$ac_cv_prog_RANLIB
6012if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6014$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
6020
6021fi
6022if test -z "$ac_cv_prog_RANLIB"; then
6023 ac_ct_RANLIB=$RANLIB
6024 # Extract the first word of "ranlib", so it can be a program name with args.
6025set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 if test -n "$ac_ct_RANLIB"; then
6032 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 break 2
6044 fi
6045done
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047IFS=$as_save_IFS
6048
6049fi
6050fi
6051ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6052if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6054$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
6059
6060 if test "x$ac_ct_RANLIB" = x; then
6061 RANLIB=":"
6062 else
6063 case $cross_compiling:$ac_tool_warned in
6064yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067ac_tool_warned=yes ;;
6068esac
6069 RANLIB=$ac_ct_RANLIB
6070 fi
6071else
6072 RANLIB="$ac_cv_prog_RANLIB"
6073fi
6074
6075
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006076if test -n "$ac_tool_prefix"; then
6077 for ac_prog in ar aal
6078 do
6079 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6080set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006083if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085else
6086 if test -n "$AR"; then
6087 ac_cv_prog_AR="$AR" # Let the user override the test.
6088else
6089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092 IFS=$as_save_IFS
6093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006096 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 break 2
6099 fi
6100done
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102IFS=$as_save_IFS
6103
6104fi
6105fi
6106AR=$ac_cv_prog_AR
6107if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6109$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110else
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113fi
6114
6115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006116 test -n "$AR" && break
6117 done
6118fi
6119if test -z "$AR"; then
6120 ac_ct_AR=$AR
6121 for ac_prog in ar aal
6122do
6123 # Extract the first word of "$ac_prog", so it can be a program name with args.
6124set dummy $ac_prog; ac_word=$2
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
6127if ${ac_cv_prog_ac_ct_AR+:} false; then :
6128 $as_echo_n "(cached) " >&6
6129else
6130 if test -n "$ac_ct_AR"; then
6131 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6132else
6133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
6138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006140 ac_cv_prog_ac_ct_AR="$ac_prog"
6141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142 break 2
6143 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006145 done
6146IFS=$as_save_IFS
6147
6148fi
6149fi
6150ac_ct_AR=$ac_cv_prog_ac_ct_AR
6151if test -n "$ac_ct_AR"; then
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6153$as_echo "$ac_ct_AR" >&6; }
6154else
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156$as_echo "no" >&6; }
6157fi
6158
6159
6160 test -n "$ac_ct_AR" && break
6161done
6162
6163 if test "x$ac_ct_AR" = x; then
6164 AR="ar"
6165 else
6166 case $cross_compiling:$ac_tool_warned in
6167yes:)
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6170ac_tool_warned=yes ;;
6171esac
6172 AR=$ac_ct_AR
6173 fi
6174fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175
6176
6177# tweak ARFLAGS only if the user didn't set it on the command line
6178
6179if test -z "$ARFLAGS"
6180then
6181 ARFLAGS="rc"
6182fi
6183
doko@ubuntu.com58844492012-06-30 18:25:32 +02006184if test -n "$ac_tool_prefix"; then
6185 for ac_prog in readelf
6186 do
6187 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6188set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6190$as_echo_n "checking for $ac_word... " >&6; }
6191if ${ac_cv_prog_READELF+:} false; then :
6192 $as_echo_n "(cached) " >&6
6193else
6194 if test -n "$READELF"; then
6195 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6196else
6197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200 IFS=$as_save_IFS
6201 test -z "$as_dir" && as_dir=.
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006204 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6205 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206 break 2
6207 fi
6208done
6209 done
6210IFS=$as_save_IFS
6211
6212fi
6213fi
6214READELF=$ac_cv_prog_READELF
6215if test -n "$READELF"; then
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6217$as_echo "$READELF" >&6; }
6218else
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224 test -n "$READELF" && break
6225 done
6226fi
6227if test -z "$READELF"; then
6228 ac_ct_READELF=$READELF
6229 for ac_prog in readelf
6230do
6231 # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6236 $as_echo_n "(cached) " >&6
6237else
6238 if test -n "$ac_ct_READELF"; then
6239 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6240else
6241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244 IFS=$as_save_IFS
6245 test -z "$as_dir" && as_dir=.
6246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006248 ac_cv_prog_ac_ct_READELF="$ac_prog"
6249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250 break 2
6251 fi
6252done
6253 done
6254IFS=$as_save_IFS
6255
6256fi
6257fi
6258ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6259if test -n "$ac_ct_READELF"; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6261$as_echo "$ac_ct_READELF" >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268 test -n "$ac_ct_READELF" && break
6269done
6270
6271 if test "x$ac_ct_READELF" = x; then
6272 READELF=":"
6273 else
6274 case $cross_compiling:$ac_tool_warned in
6275yes:)
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6278ac_tool_warned=yes ;;
6279esac
6280 READELF=$ac_ct_READELF
6281 fi
6282fi
6283
6284if test "$cross_compiling" = yes; then
6285 case "$READELF" in
6286 readelf|:)
6287 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6288 ;;
6289 esac
6290fi
6291
6292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294case $MACHDEP in
6295bsdos*|hp*|HP*)
6296 # install -d does not work on BSDI or HP-UX
6297 if test -z "$INSTALL"
6298 then
6299 INSTALL="${srcdir}/install-sh -c"
6300 fi
6301esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Find a good install program. We prefer a C program (faster),
6303# so one script is as good as another. But avoid the broken or
6304# incompatible versions:
6305# SysV /etc/install, /usr/sbin/install
6306# SunOS /usr/etc/install
6307# IRIX /sbin/install
6308# AIX /bin/install
6309# AmigaOS /C/install, which installs bootblocks on floppy discs
6310# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6311# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6312# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6313# OS/2's system install, which has a completely different semantic
6314# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006315# Reject install programs that cannot install multiple files.
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6317$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006319if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
6322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325 IFS=$as_save_IFS
6326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 # Account for people who put trailing slashes in PATH elements.
6328case $as_dir/ in #((
6329 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 /usr/ucb/* ) ;;
6333 *)
6334 # OSF1 and SCO ODT 3.0 have their own names for install.
6335 # Don't use installbsd from OSF since it installs stuff as root
6336 # by default.
6337 for ac_prog in ginstall scoinst install; do
6338 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006339 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340 if test $ac_prog = install &&
6341 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6342 # AIX install. It has an incompatible calling convention.
6343 :
6344 elif test $ac_prog = install &&
6345 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6346 # program-specific install script used by HP pwplus--don't use.
6347 :
6348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 rm -rf conftest.one conftest.two conftest.dir
6350 echo one > conftest.one
6351 echo two > conftest.two
6352 mkdir conftest.dir
6353 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6354 test -s conftest.one && test -s conftest.two &&
6355 test -s conftest.dir/conftest.one &&
6356 test -s conftest.dir/conftest.two
6357 then
6358 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6359 break 3
6360 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361 fi
6362 fi
6363 done
6364 done
6365 ;;
6366esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006367
6368 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369IFS=$as_save_IFS
6370
Matthias Kloseb9621712010-04-24 17:59:49 +00006371rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372
6373fi
6374 if test "${ac_cv_path_install+set}" = set; then
6375 INSTALL=$ac_cv_path_install
6376 else
6377 # As a last resort, use the slow shell script. Don't cache a
6378 # value for INSTALL within a source directory, because that will
6379 # break other packages using the cache if that directory is
6380 # removed, or if the value is a relative name.
6381 INSTALL=$ac_install_sh
6382 fi
6383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6385$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386
6387# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6388# It thinks the first close brace ends the variable substitution.
6389test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6390
6391test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6392
6393test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6394
Matthias Klose93a0ef12012-03-15 18:08:34 +01006395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6396$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6397if test -z "$MKDIR_P"; then
6398 if ${ac_cv_path_mkdir+:} false; then :
6399 $as_echo_n "(cached) " >&6
6400else
6401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6403do
6404 IFS=$as_save_IFS
6405 test -z "$as_dir" && as_dir=.
6406 for ac_prog in mkdir gmkdir; do
6407 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006408 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006409 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6410 'mkdir (GNU coreutils) '* | \
6411 'mkdir (coreutils) '* | \
6412 'mkdir (fileutils) '4.1*)
6413 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6414 break 3;;
6415 esac
6416 done
6417 done
6418 done
6419IFS=$as_save_IFS
6420
6421fi
6422
6423 test -d ./--version && rmdir ./--version
6424 if test "${ac_cv_path_mkdir+set}" = set; then
6425 MKDIR_P="$ac_cv_path_mkdir -p"
6426 else
6427 # As a last resort, use the slow shell script. Don't cache a
6428 # value for MKDIR_P within a source directory, because that will
6429 # break other packages using the cache if that directory is
6430 # removed, or if the value is a relative name.
6431 MKDIR_P="$ac_install_sh -d"
6432 fi
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6435$as_echo "$MKDIR_P" >&6; }
6436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437
6438# Not every filesystem supports hard links
6439
6440if test -z "$LN" ; then
6441 case $ac_sys_system in
6442 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 *) LN=ln;;
6444 esac
6445fi
6446
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006447# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006448
6449ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6453$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454
6455# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006456if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457 withval=$with_pydebug;
6458if test "$withval" != no
6459then
6460
Matthias Kloseb9621712010-04-24 17:59:49 +00006461$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6464$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006466 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006467else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469fi
6470else
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473fi
6474
6475
Brett Cannon63d98bc2016-09-06 17:12:40 -07006476# Enable optimization flags
6477
6478
6479Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6481$as_echo_n "checking for --enable-optimizations... " >&6; }
6482# Check whether --enable-optimizations was given.
6483if test "${enable_optimizations+set}" = set; then :
6484 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006485if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006486then
6487 Py_OPT='true'
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6489$as_echo "yes" >&6; };
6490else
6491 Py_OPT='false'
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6493$as_echo "no" >&6; };
6494fi
6495else
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6497$as_echo "no" >&6; }
6498fi
6499
6500if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006501 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6502 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006503 # 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 +00006504 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006505 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006507 DEF_MAKE_RULE="build_all"
6508else
6509 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006510 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006511 DEF_MAKE_RULE="all"
6512fi
6513
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006514# Enable LTO flags
6515
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6517$as_echo_n "checking for --with-lto... " >&6; }
6518
6519# Check whether --with-lto was given.
6520if test "${with_lto+set}" = set; then :
6521 withval=$with_lto;
6522if test "$withval" != no
6523then
6524 Py_LTO='true'
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6526$as_echo "yes" >&6; };
6527else
6528 Py_LTO='false'
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; };
6531fi
6532else
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535fi
6536
6537if test "$Py_LTO" = 'true' ; then
6538 case $CC in
6539 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006540 case $ac_sys_system in
6541 Darwin*)
6542 # Any changes made here should be reflected in the GCC+Darwin case below
6543 LTOFLAGS="-flto -Wl,-export_dynamic"
6544 ;;
6545 *)
6546 LTOFLAGS="-flto"
6547 ;;
6548 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006549 ;;
6550 *gcc*)
6551 case $ac_sys_system in
6552 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006553 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006554 ;;
6555 *)
6556 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6557 ;;
6558 esac
6559 ;;
6560 esac
6561fi
6562
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006564
6565
6566
6567
6568
Gregory P. Smith799520c2016-09-07 16:10:00 -07006569# Make this work on systems where llvm tools are not installed with their
6570# normal names in the default $PATH (ie: Ubuntu). They exist under the
6571# non-suffixed name in their versioned llvm directory.
6572llvm_bin_dir=''
6573llvm_path="${PATH}"
6574if test "${CC}" = "clang"
6575then
6576 clang_bin=`which clang`
6577 # Some systems install clang elsewhere as a symlink to the real path
6578 # which is where the related llvm tools are located.
6579 if test -L "${clang_bin}"
6580 then
6581 clang_dir=`dirname "${clang_bin}"`
6582 clang_bin=`readlink "${clang_bin}"`
6583 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6584 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6585 fi
6586fi
Zachary Ware5af85642015-12-21 12:09:17 -06006587
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6589$as_echo_n "checking target system type... " >&6; }
6590if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006591 $as_echo_n "(cached) " >&6
6592else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006593 if test "x$target_alias" = x; then
6594 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006595else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006596 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6598fi
6599
6600fi
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6602$as_echo "$ac_cv_target" >&6; }
6603case $ac_cv_target in
6604*-*-*) ;;
6605*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6606esac
6607target=$ac_cv_target
6608ac_save_IFS=$IFS; IFS='-'
6609set x $ac_cv_target
6610shift
6611target_cpu=$1
6612target_vendor=$2
6613shift; shift
6614# Remember, the first character of IFS is used to create $*,
6615# except with old shells:
6616target_os=$*
6617IFS=$ac_save_IFS
6618case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6619
6620
6621# The aliases save the names the user supplied, while $host etc.
6622# will get canonicalized.
6623test -n "$target_alias" &&
6624 test "$program_prefix$program_suffix$program_transform_name" = \
6625 NONENONEs,x,x, &&
6626 program_prefix=${target_alias}-
6627# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6628set dummy $target_alias-llvm-profdata; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6632 $as_echo_n "(cached) " >&6
6633else
6634 case $LLVM_PROFDATA in
6635 [\\/]* | ?:[\\/]*)
6636 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6637 ;;
6638 *)
6639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006641do
6642 IFS=$as_save_IFS
6643 test -z "$as_dir" && as_dir=.
6644 for ac_exec_ext in '' $ac_executable_extensions; do
6645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648 break 2
6649 fi
6650done
6651 done
6652IFS=$as_save_IFS
6653
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ;;
6655esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6658if test -n "$LLVM_PROFDATA"; then
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6660$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661else
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6668 if test "$build" = "$target"; then
6669 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6670 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6671set dummy llvm-profdata; ac_word=$2
6672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6673$as_echo_n "checking for $ac_word... " >&6; }
6674if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6675 $as_echo_n "(cached) " >&6
6676else
6677 case $ac_pt_LLVM_PROFDATA in
6678 [\\/]* | ?:[\\/]*)
6679 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6680 ;;
6681 *)
6682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6683for as_dir in ${llvm_path}
6684do
6685 IFS=$as_save_IFS
6686 test -z "$as_dir" && as_dir=.
6687 for ac_exec_ext in '' $ac_executable_extensions; do
6688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6689 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6691 break 2
6692 fi
6693done
6694 done
6695IFS=$as_save_IFS
6696
6697 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6698 ;;
6699esac
6700fi
6701ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6702if test -n "$ac_pt_LLVM_PROFDATA"; then
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6704$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6705else
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6711 else
6712 LLVM_PROFDATA="''"
6713 fi
6714else
6715 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6716fi
6717
6718
6719if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6720then
6721 LLVM_PROF_FOUND="found"
6722else
6723 LLVM_PROF_FOUND="not-found"
6724fi
6725if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6726then
6727 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6728 if test -n "${found_llvm_profdata}"
6729 then
6730 # llvm-profdata isn't directly in $PATH in some cases.
6731 # https://apple.stackexchange.com/questions/197053/
6732 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6733 LLVM_PROF_FOUND=found
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6735$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6736 fi
6737fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006738LLVM_PROF_ERR=no
6739case $CC in
6740 *clang*)
6741 # Any changes made here should be reflected in the GCC+Darwin case below
6742 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6743 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006745 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6746 if test $LLVM_PROF_FOUND = not-found
6747 then
6748 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006749 if test "${REQUIRE_PGO}" = "yes"
6750 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006751 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 -07006752 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 fi
6754 ;;
6755 *gcc*)
6756 case $ac_sys_system in
6757 Darwin*)
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *)
6772 PGO_PROF_GEN_FLAG="-fprofile-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6774 LLVM_PROF_MERGER="true"
6775 LLVM_PROF_FILE=""
6776 ;;
6777 esac
6778 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006779 *icc*)
6780 PGO_PROF_GEN_FLAG="-prof-gen"
6781 PGO_PROF_USE_FLAG="-prof-use"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785esac
6786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6788# merged with this chunk of code?
6789
6790# Optimizer/debugger flags
6791# ------------------------
6792# (The following bit of code is complicated enough - please keep things
6793# indented properly. Just pretend you're editing Python code. ;-)
6794
6795# There are two parallel sets of case statements below, one that checks to
6796# see if OPT was set and one that does BASECFLAGS setting based upon
6797# compiler and platform. BASECFLAGS tweaks need to be made even if the
6798# user set OPT.
6799
6800# tweak OPT based on compiler and platform, only if the user didn't set
6801# it on the command line
6802
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006803if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804then
6805 case $GCC in
6806 yes)
6807 if test "$CC" != 'g++' ; then
6808 STRICT_PROTO="-Wstrict-prototypes"
6809 fi
6810 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6811 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6812 WRAP="-fwrapv"
6813 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006814
6815 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006816 case $CC in
6817 *clang*) WRAP="-fwrapv"
6818 ;;
6819 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 case $ac_cv_prog_cc_g in
6822 yes)
6823 if test "$Py_DEBUG" = 'true' ; then
6824 # Optimization messes up debuggers, so turn it off for
6825 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006826 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6827 OPT="-g -Og -Wall $STRICT_PROTO"
6828 else
6829 OPT="-g -O0 -Wall $STRICT_PROTO"
6830 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 else
6832 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6833 fi
6834 ;;
6835 *)
6836 OPT="-O3 -Wall $STRICT_PROTO"
6837 ;;
6838 esac
6839 case $ac_sys_system in
6840 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6841 ;;
6842 esac
6843 ;;
6844
6845 *)
6846 OPT="-O"
6847 ;;
6848 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849fi
6850
6851
6852
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854# The -arch flags for universal builds on OSX
6855UNIVERSAL_ARCH_FLAGS=
6856
6857
6858# tweak BASECFLAGS based on compiler and platform
6859case $GCC in
6860yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006861 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006862
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6864$as_echo_n "checking for -Wextra... " >&6; }
6865 ac_save_cc="$CC"
6866 CC="$CC -Wextra -Werror"
6867 if ${ac_cv_extra_warnings+:} false; then :
6868 $as_echo_n "(cached) " >&6
6869else
6870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6871/* end confdefs.h. */
6872
6873
6874int
6875main ()
6876{
6877
6878 ;
6879 return 0;
6880}
6881
6882_ACEOF
6883if ac_fn_c_try_compile "$LINENO"; then :
6884
6885 ac_cv_extra_warnings=yes
6886
6887else
6888
6889 ac_cv_extra_warnings=no
6890
6891fi
6892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6893fi
6894
6895 CC="$ac_save_cc"
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6897$as_echo "$ac_cv_extra_warnings" >&6; }
6898
6899 if test $ac_cv_extra_warnings = yes
6900 then
6901 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6902 fi
6903
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006904 # Python doesn't violate C99 aliasing rules, but older versions of
6905 # GCC produce warnings for legal Python code. Enable
6906 # -fno-strict-aliasing on versions of GCC that support but produce
6907 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6909$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910 ac_save_cc="$CC"
6911 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006912 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006913 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006915else
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006918
Matthias Kloseb159a552010-04-25 21:00:44 +00006919
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006920int
6921main ()
6922{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006923
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006924 ;
6925 return 0;
6926}
Matthias Kloseb159a552010-04-25 21:00:44 +00006927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006929if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006930
6931 CC="$ac_save_cc -fstrict-aliasing"
6932 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006934/* end confdefs.h. */
6935
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006936 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006937int
6938main ()
6939{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006940double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006941 ;
6942 return 0;
6943}
Matthias Kloseb159a552010-04-25 21:00:44 +00006944
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006946if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006947
6948 ac_cv_no_strict_aliasing=no
6949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006950else
Matthias Kloseb159a552010-04-25 21:00:44 +00006951
6952 ac_cv_no_strict_aliasing=yes
6953
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006954fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006956
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957else
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
6959 ac_cv_no_strict_aliasing=no
6960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006963fi
6964
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6968$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006969 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970 then
6971 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6972 fi
6973
Zachary Ware5af85642015-12-21 12:09:17 -06006974 # ICC doesn't recognize the option, but only emits a warning
6975 ## XXX does it emit an unused result warning and can it be disabled?
6976 case "$CC" in
6977 *icc*)
6978 ac_cv_disable_unused_result_warning=no
6979 ;;
6980 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6982$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6983 ac_save_cc="$CC"
6984 CC="$CC -Wunused-result -Werror"
6985 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006986 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006987 $as_echo_n "(cached) " >&6
6988else
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6990/* end confdefs.h. */
6991
6992
6993int
6994main ()
6995{
6996
6997 ;
6998 return 0;
6999}
7000
7001_ACEOF
7002if ac_fn_c_try_compile "$LINENO"; then :
7003
7004 ac_cv_disable_unused_result_warning=yes
7005
7006else
7007
7008 ac_cv_disable_unused_result_warning=no
7009
7010fi
7011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7012fi
7013
7014 CFLAGS="$save_CFLAGS"
7015 CC="$ac_save_cc"
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7017$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007018 ;;
7019 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007020
7021 if test $ac_cv_disable_unused_result_warning = yes
7022 then
7023 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007024 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7025 fi
7026
7027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7028$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7029 ac_save_cc="$CC"
7030 CC="$CC -Wunused-parameter -Werror"
7031 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7032 $as_echo_n "(cached) " >&6
7033else
7034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7035/* end confdefs.h. */
7036
7037
7038int
7039main ()
7040{
7041
7042 ;
7043 return 0;
7044}
7045
7046_ACEOF
7047if ac_fn_c_try_compile "$LINENO"; then :
7048
7049 ac_cv_disable_unused_parameter_warning=yes
7050
7051else
7052
7053 ac_cv_disable_unused_parameter_warning=no
7054
7055fi
7056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7057fi
7058
7059 CC="$ac_save_cc"
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7061$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7062
7063 if test $ac_cv_disable_unused_parameter_warning = yes
7064 then
7065 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7066 fi
7067
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7069$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7070 ac_save_cc="$CC"
7071 CC="$CC -Wmissing-field-initializers -Werror"
7072 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7073 $as_echo_n "(cached) " >&6
7074else
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078
7079int
7080main ()
7081{
7082
7083 ;
7084 return 0;
7085}
7086
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089
7090 ac_cv_disable_missing_field_initializers=yes
7091
7092else
7093
7094 ac_cv_disable_missing_field_initializers=no
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099
7100 CC="$ac_save_cc"
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7102$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7103
7104 if test $ac_cv_disable_missing_field_initializers = yes
7105 then
7106 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007107 fi
7108
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7110$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7111 ac_save_cc="$CC"
7112 CC="$CC -Wsign-compare"
7113 save_CFLAGS="$CFLAGS"
7114 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7115 $as_echo_n "(cached) " >&6
7116else
7117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7118/* end confdefs.h. */
7119
7120
7121int
7122main ()
7123{
7124
7125 ;
7126 return 0;
7127}
7128
7129_ACEOF
7130if ac_fn_c_try_compile "$LINENO"; then :
7131
7132 ac_cv_enable_sign_compare_warning=yes
7133
7134else
7135
7136 ac_cv_enable_sign_compare_warning=no
7137
7138fi
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140fi
7141
7142 CFLAGS="$save_CFLAGS"
7143 CC="$ac_save_cc"
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7145$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7146
7147 if test $ac_cv_enable_sign_compare_warning = yes
7148 then
7149 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7150 fi
7151
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7153$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7154 ac_save_cc="$CC"
7155 CC="$CC -Wunreachable-code"
7156 save_CFLAGS="$CFLAGS"
7157 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7158 $as_echo_n "(cached) " >&6
7159else
7160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7161/* end confdefs.h. */
7162
7163
7164int
7165main ()
7166{
7167
7168 ;
7169 return 0;
7170}
7171
7172_ACEOF
7173if ac_fn_c_try_compile "$LINENO"; then :
7174
7175 ac_cv_enable_unreachable_code_warning=yes
7176
7177else
7178
7179 ac_cv_enable_unreachable_code_warning=no
7180
7181fi
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183fi
7184
7185 CFLAGS="$save_CFLAGS"
7186 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007187
7188 # Don't enable unreachable code warning in debug mode, since it usually
7189 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007190 # Issue #24324: Unfortunately, the unreachable code warning does not work
7191 # correctly on gcc and has been silently removed from the compiler.
7192 # It is supported on clang but on OS X systems gcc may be an alias
7193 # for clang. Try to determine if the compiler is not really gcc and,
7194 # if so, only then enable the warning.
7195 if test $ac_cv_enable_unreachable_code_warning = yes && \
7196 test "$Py_DEBUG" != "true" && \
7197 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007198 then
7199 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007200 else
7201 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007202 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7204$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007205
Victor Stinner193ee0a2017-02-06 14:24:00 +01007206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7207$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7208 ac_save_cc="$CC"
7209 CC="$CC -Werror=implicit-function-declaration"
7210 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7211 $as_echo_n "(cached) " >&6
7212else
7213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7214/* end confdefs.h. */
7215
7216
7217int
7218main ()
7219{
7220
7221 ;
7222 return 0;
7223}
7224
7225_ACEOF
7226if ac_fn_c_try_compile "$LINENO"; then :
7227
7228 ac_cv_enable_implicit_function_declaration_error=yes
7229
7230else
7231
7232 ac_cv_enable_implicit_function_declaration_error=no
7233
7234fi
7235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7236fi
7237
7238 CC="$ac_save_cc"
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7240$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7241
7242 if test $ac_cv_enable_implicit_function_declaration_error = yes
7243 then
7244 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7245 fi
7246
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7248 # support. Without this, treatment of subnormals doesn't follow
7249 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007250 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251 alpha*)
7252 BASECFLAGS="$BASECFLAGS -mieee"
7253 ;;
7254 esac
7255
7256 case $ac_sys_system in
7257 SCO_SV*)
7258 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7259 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007260
7261 # is there any other compiler on Darwin besides gcc?
7262 Darwin*)
7263 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7264 # used to be here, but non-Apple gcc doesn't accept them.
7265 if test "${CC}" = gcc
7266 then
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007268$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007269 case "${UNIVERSALSDK}" in
7270 */MacOSX10.4u.sdk)
7271 # Build using 10.4 SDK, force usage of gcc when the
7272 # compiler is gcc, otherwise the user will get very
7273 # confusing error messages when building on OSX 10.6
7274 CC=gcc-4.0
7275 CPP=cpp-4.0
7276 ;;
7277 esac
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007279$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007280 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 if test "${enable_universalsdk}"
7283 then
7284 case "$UNIVERSAL_ARCHS" in
7285 32-bit)
7286 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7287 LIPO_32BIT_FLAGS=""
7288 ARCH_RUN_32BIT=""
7289 ;;
7290 64-bit)
7291 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7292 LIPO_32BIT_FLAGS=""
7293 ARCH_RUN_32BIT="true"
7294 ;;
7295 all)
7296 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7297 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7298 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7299 ;;
7300 intel)
7301 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7302 LIPO_32BIT_FLAGS="-extract i386"
7303 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7304 ;;
7305 intel-32)
7306 UNIVERSAL_ARCH_FLAGS="-arch i386"
7307 LIPO_32BIT_FLAGS=""
7308 ARCH_RUN_32BIT=""
7309 ;;
7310 3-way)
7311 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7312 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7313 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7314 ;;
7315 *)
7316 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7317 ;;
7318 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319
Ned Deily87adb6e2013-10-18 21:09:56 -07007320 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7321 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7322 if test "${UNIVERSALSDK}" != "/"
7323 then
7324 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7325 fi
7326 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327
Ned Deily87adb6e2013-10-18 21:09:56 -07007328 # Calculate an appropriate deployment target for this build:
7329 # The deployment target value is used explicitly to enable certain
7330 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007331 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 # component of the string returned by distutils.get_platform().
7333 #
7334 # Use the value from:
7335 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7336 # 2. the operating system version of the build machine if >= 10.6
7337 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7338 # below to pick either 10.3, 10.4, or 10.5 as the target.
7339 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340
Ned Deily87adb6e2013-10-18 21:09:56 -07007341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7342$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007343 cur_target_major=`sw_vers -productVersion | \
7344 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7345 cur_target_minor=`sw_vers -productVersion | \
7346 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7347 cur_target="${cur_target_major}.${cur_target_minor}"
7348 if test ${cur_target_major} -eq 10 && \
7349 test ${cur_target_minor} -ge 3 && \
7350 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 then
Ned Deily36820b62014-06-25 13:44:22 -07007352 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007353 cur_target=10.3
7354 if test ${enable_universalsdk}
7355 then
7356 case "$UNIVERSAL_ARCHS" in
7357 all|3-way|intel|64-bit)
7358 # These configurations were first supported in 10.5
7359 cur_target='10.5'
7360 ;;
7361 esac
7362 else
7363 if test `/usr/bin/arch` = "i386"
7364 then
7365 # 10.4 was the first release to support Intel archs
7366 cur_target="10.4"
7367 fi
7368 fi
7369 fi
7370 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007371
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7373 # environment with a value that is the same as what we'll use
7374 # in the Makefile to ensure that we'll get the same compiler
7375 # environment during configure and build time.
7376 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7377 export MACOSX_DEPLOYMENT_TARGET
7378 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7380$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007381
Ned Deily87adb6e2013-10-18 21:09:56 -07007382 # end of Darwin* tests
7383 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384 esac
7385 ;;
7386
7387*)
7388 case $ac_sys_system in
7389 OpenUNIX*|UnixWare*)
7390 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7391 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392 SCO_SV*)
7393 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7394 ;;
7395 esac
7396 ;;
7397esac
7398
Zachary Ware5af85642015-12-21 12:09:17 -06007399# ICC needs -fp-model strict or floats behave badly
7400case "$CC" in
7401*icc*)
7402 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7403 ;;
7404esac
7405
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406if test "$Py_DEBUG" = 'true'; then
7407 :
7408else
7409 OPT="-DNDEBUG $OPT"
7410fi
7411
7412if test "$ac_arch_flags"
7413then
7414 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7415fi
7416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417# On some compilers, pthreads are available without further options
7418# (e.g. MacOS X). On some of these systems, the compiler will not
7419# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7420# So we have to see first whether pthreads are available without
7421# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7423$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007424if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426else
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428 ac_cv_pthread_is_default=no
7429else
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431/* end confdefs.h. */
7432
Stefan Krah7dba5942012-11-22 22:49:11 +01007433#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434#include <pthread.h>
7435
7436void* routine(void* p){return NULL;}
7437
7438int main(){
7439 pthread_t p;
7440 if(pthread_create(&p,NULL,routine,NULL)!=0)
7441 return 1;
7442 (void)pthread_detach(p);
7443 return 0;
7444}
7445
7446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007447if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448
7449 ac_cv_pthread_is_default=yes
7450 ac_cv_kthread=no
7451 ac_cv_pthread=no
7452
7453else
Matthias Kloseb9621712010-04-24 17:59:49 +00007454 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458fi
7459
7460
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461fi
7462
Matthias Kloseb9621712010-04-24 17:59:49 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7464$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465
7466
7467if test $ac_cv_pthread_is_default = yes
7468then
7469 ac_cv_kpthread=no
7470else
7471# -Kpthread, if available, provides the right #defines
7472# and linker options to make pthread_create available
7473# Some compilers won't report that they do not support -Kpthread,
7474# so we need to run a program to see whether it really made the
7475# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7477$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
7481 ac_save_cc="$CC"
7482CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 ac_cv_kpthread=no
7485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487/* end confdefs.h. */
7488
Stefan Krah7dba5942012-11-22 22:49:11 +01007489#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490#include <pthread.h>
7491
7492void* routine(void* p){return NULL;}
7493
7494int main(){
7495 pthread_t p;
7496 if(pthread_create(&p,NULL,routine,NULL)!=0)
7497 return 1;
7498 (void)pthread_detach(p);
7499 return 0;
7500}
7501
7502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_kpthread=yes
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512CC="$ac_save_cc"
7513fi
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7516$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
7519if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7520then
7521# -Kthread, if available, provides the right #defines
7522# and linker options to make pthread_create available
7523# Some compilers won't report that they do not support -Kthread,
7524# so we need to run a program to see whether it really made the
7525# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7527$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007528if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
7531 ac_save_cc="$CC"
7532CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007533if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 ac_cv_kthread=no
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538
Stefan Krah7dba5942012-11-22 22:49:11 +01007539#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540#include <pthread.h>
7541
7542void* routine(void* p){return NULL;}
7543
7544int main(){
7545 pthread_t p;
7546 if(pthread_create(&p,NULL,routine,NULL)!=0)
7547 return 1;
7548 (void)pthread_detach(p);
7549 return 0;
7550}
7551
7552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554 ac_cv_kthread=yes
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562CC="$ac_save_cc"
7563fi
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7566$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
7569if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7570then
7571# -pthread, if available, provides the right #defines
7572# and linker options to make pthread_create available
7573# Some compilers won't report that they do not support -pthread,
7574# so we need to run a program to see whether it really made the
7575# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7577$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007578if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580else
7581 ac_save_cc="$CC"
7582CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007583if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584 ac_cv_pthread=no
7585else
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587/* end confdefs.h. */
7588
Stefan Krah7dba5942012-11-22 22:49:11 +01007589#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590#include <pthread.h>
7591
7592void* routine(void* p){return NULL;}
7593
7594int main(){
7595 pthread_t p;
7596 if(pthread_create(&p,NULL,routine,NULL)!=0)
7597 return 1;
7598 (void)pthread_detach(p);
7599 return 0;
7600}
7601
7602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007603if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604 ac_cv_pthread=yes
7605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610fi
7611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612CC="$ac_save_cc"
7613fi
7614
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7616$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617fi
7618
7619# If we have set a CC compiler flag for thread support then
7620# check if it works for CXX, too.
7621ac_cv_cxx_thread=no
7622if test ! -z "$CXX"
7623then
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7625$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626ac_save_cxx="$CXX"
7627
7628if test "$ac_cv_kpthread" = "yes"
7629then
7630 CXX="$CXX -Kpthread"
7631 ac_cv_cxx_thread=yes
7632elif test "$ac_cv_kthread" = "yes"
7633then
7634 CXX="$CXX -Kthread"
7635 ac_cv_cxx_thread=yes
7636elif test "$ac_cv_pthread" = "yes"
7637then
7638 CXX="$CXX -pthread"
7639 ac_cv_cxx_thread=yes
7640fi
7641
7642if test $ac_cv_cxx_thread = yes
7643then
7644 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7645 $CXX -c conftest.$ac_ext 2>&5
7646 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7647 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7648 then
7649 ac_cv_cxx_thread=yes
7650 else
7651 ac_cv_cxx_thread=no
7652 fi
7653 rm -fr conftest*
7654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7656$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657fi
7658CXX="$ac_save_cxx"
7659
7660
7661# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7663$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007664if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666else
Matthias Kloseb9621712010-04-24 17:59:49 +00007667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668/* end confdefs.h. */
7669#include <stdlib.h>
7670#include <stdarg.h>
7671#include <string.h>
7672#include <float.h>
7673
7674int
7675main ()
7676{
7677
7678 ;
7679 return 0;
7680}
7681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683 ac_cv_header_stdc=yes
7684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7688
7689if test $ac_cv_header_stdc = yes; then
7690 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692/* end confdefs.h. */
7693#include <string.h>
7694
7695_ACEOF
7696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 $EGREP "memchr" >/dev/null 2>&1; then :
7698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699else
7700 ac_cv_header_stdc=no
7701fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007702rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703
7704fi
7705
7706if test $ac_cv_header_stdc = yes; then
7707 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709/* end confdefs.h. */
7710#include <stdlib.h>
7711
7712_ACEOF
7713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 $EGREP "free" >/dev/null 2>&1; then :
7715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716else
7717 ac_cv_header_stdc=no
7718fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007719rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720
7721fi
7722
7723if test $ac_cv_header_stdc = yes; then
7724 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726 :
7727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729/* end confdefs.h. */
7730#include <ctype.h>
7731#include <stdlib.h>
7732#if ((' ' & 0x0FF) == 0x020)
7733# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7734# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7735#else
7736# define ISLOWER(c) \
7737 (('a' <= (c) && (c) <= 'i') \
7738 || ('j' <= (c) && (c) <= 'r') \
7739 || ('s' <= (c) && (c) <= 'z'))
7740# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7741#endif
7742
7743#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7744int
7745main ()
7746{
7747 int i;
7748 for (i = 0; i < 256; i++)
7749 if (XOR (islower (i), ISLOWER (i))
7750 || toupper (i) != TOUPPER (i))
7751 return 2;
7752 return 0;
7753}
7754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007755if ac_fn_c_try_run "$LINENO"; then :
7756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762fi
7763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764fi
7765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7767$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768if test $ac_cv_header_stdc = yes; then
7769
Matthias Kloseb9621712010-04-24 17:59:49 +00007770$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771
7772fi
7773
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007774for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007775fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007776ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007777sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007778unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007779poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007780sys/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 +01007781sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007782sys/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 +01007783sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007784sys/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 -07007785libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007786linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007787sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007788do :
7789 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7790ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007791if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007793#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007794_ACEOF
7795
7796fi
7797
Guido van Rossum627b2d71993-12-24 10:39:16 +00007798done
7799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007801for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7804$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007805if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007807else
Matthias Kloseb9621712010-04-24 17:59:49 +00007808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007809/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007810#include <sys/types.h>
7811#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
7815{
7816if ((DIR *) 0)
7817return 0;
7818 ;
7819 return 0;
7820}
7821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829eval ac_res=\$$as_ac_Header
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7831$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007832if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007834#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007835_ACEOF
7836
7837ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007838fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007839
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007840done
7841# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7842if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7844$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007845if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847else
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852/* Override any GCC internal prototype to avoid an error.
7853 Use char because int might match the return type of a GCC
7854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007855#ifdef __cplusplus
7856extern "C"
7857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007858char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007859int
7860main ()
7861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ;
7864 return 0;
7865}
7866_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867for ac_lib in '' dir; do
7868 if test -z "$ac_lib"; then
7869 ac_res="none required"
7870 else
7871 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877rm -f core conftest.err conftest.$ac_objext \
7878 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007879 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882done
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885else
7886 ac_cv_search_opendir=no
7887fi
7888rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007889LIBS=$ac_func_search_save_LIBS
7890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7892$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Michael W. Hudson54241132001-12-07 15:38:26 +00007899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7901$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007904else
7905 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909/* Override any GCC internal prototype to avoid an error.
7910 Use char because int might match the return type of a GCC
7911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007912#ifdef __cplusplus
7913extern "C"
7914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007915char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007916int
7917main ()
7918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 ;
7921 return 0;
7922}
7923_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924for ac_lib in '' x; do
7925 if test -z "$ac_lib"; then
7926 ac_res="none required"
7927 else
7928 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007929 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934rm -f core conftest.err conftest.$ac_objext \
7935 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007936 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007939done
Victor Stinnere0be4232011-10-25 13:06:09 +02007940if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942else
7943 ac_cv_search_opendir=no
7944fi
7945rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007946LIBS=$ac_func_search_save_LIBS
7947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7949$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007951if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007954fi
7955
7956fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7959$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007960if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007962else
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007965#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007966int
7967main ()
7968{
7969return makedev(0, 0);
7970 ;
7971 return 0;
7972}
7973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007975 ac_cv_header_sys_types_h_makedev=yes
7976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979rm -f core conftest.err conftest.$ac_objext \
7980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007981
7982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7984$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985
7986if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007987ac_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 +02007988if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007989
Matthias Kloseb9621712010-04-24 17:59:49 +00007990$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007991
7992fi
7993
7994
7995
7996 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 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 +02007998if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001
8002fi
8003
8004
8005 fi
8006fi
8007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008009# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8010# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8011SAVE_CFLAGS=$CFLAGS
8012CFLAGS="-std=c99 $CFLAGS"
8013for ac_header in bluetooth/bluetooth.h
8014do :
8015 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8016if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8017 cat >>confdefs.h <<_ACEOF
8018#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8019_ACEOF
8020
8021fi
8022
8023done
8024
8025CFLAGS=$SAVE_CFLAGS
8026
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008027# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8028for ac_header in net/if.h
8029do :
8030 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8031#ifdef STDC_HEADERS
8032# include <stdlib.h>
8033# include <stddef.h>
8034#else
8035# ifdef HAVE_STDLIB_H
8036# include <stdlib.h>
8037# endif
8038#endif
8039#ifdef HAVE_SYS_SOCKET_H
8040# include <sys/socket.h>
8041#endif
8042
8043"
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008045 cat >>confdefs.h <<_ACEOF
8046#define HAVE_NET_IF_H 1
8047_ACEOF
8048
8049fi
8050
8051done
8052
8053
Martin v. Löwis11017b12006-01-14 18:12:57 +00008054# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008055for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008056do :
8057 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 +00008058#ifdef HAVE_ASM_TYPES_H
8059#include <asm/types.h>
8060#endif
8061#ifdef HAVE_SYS_SOCKET_H
8062#include <sys/socket.h>
8063#endif
8064
Matthias Kloseb9621712010-04-24 17:59:49 +00008065"
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008067 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008068#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008069_ACEOF
8070
8071fi
8072
8073done
8074
8075
Charles-François Natali47413c12011-10-06 19:47:44 +02008076# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008077for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008078do :
8079 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8080ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8081#ifdef HAVE_SYS_SOCKET_H
8082#include <sys/socket.h>
8083#endif
8084
8085"
8086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8087 cat >>confdefs.h <<_ACEOF
8088#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8089_ACEOF
8090
8091fi
8092
8093done
8094
8095
Guido van Rossum627b2d71993-12-24 10:39:16 +00008096# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008097was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8099$as_echo_n "checking for clock_t in time.h... " >&6; }
8100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008102#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
8104_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008107 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008108else
Martin v. Löwis11437992002-04-12 09:54:03 +00008109
8110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008112
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008113
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008115rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008116
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8118$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8121$as_echo_n "checking for makedev... " >&6; }
8122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008123/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008124
Jesus Cea740f53a2010-04-28 11:35:30 +00008125#if defined(MAJOR_IN_MKDEV)
8126#include <sys/mkdev.h>
8127#elif defined(MAJOR_IN_SYSMACROS)
8128#include <sys/sysmacros.h>
8129#else
8130#include <sys/types.h>
8131#endif
8132
Neal Norwitz11690112002-07-30 01:08:28 +00008133int
8134main ()
8135{
Jesus Cea740f53a2010-04-28 11:35:30 +00008136
8137 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008138 ;
8139 return 0;
8140}
Matthias Kloseb159a552010-04-25 21:00:44 +00008141
Neal Norwitz11690112002-07-30 01:08:28 +00008142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008143if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008144 ac_cv_has_makedev=yes
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008148rm -f core conftest.err conftest.$ac_objext \
8149 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8151$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008152if test "$ac_cv_has_makedev" = "yes"; then
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008155
8156fi
8157
Christian Heimes985ecdc2013-11-20 11:46:18 +01008158# byte swapping
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8160$as_echo_n "checking for le64toh... " >&6; }
8161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8162/* end confdefs.h. */
8163
8164#ifdef HAVE_ENDIAN_H
8165#include <endian.h>
8166#elif defined(HAVE_SYS_ENDIAN_H)
8167#include <sys/endian.h>
8168#endif
8169
8170int
8171main ()
8172{
8173
8174 le64toh(1)
8175 ;
8176 return 0;
8177}
8178
8179_ACEOF
8180if ac_fn_c_try_link "$LINENO"; then :
8181 ac_cv_has_le64toh=yes
8182else
8183 ac_cv_has_le64toh=no
8184fi
8185rm -f core conftest.err conftest.$ac_objext \
8186 conftest$ac_exeext conftest.$ac_ext
8187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8188$as_echo "$ac_cv_has_le64toh" >&6; }
8189if test "$ac_cv_has_le64toh" = "yes"; then
8190
8191$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8192
8193fi
8194
Martin v. Löwis399a6892002-10-04 10:22:02 +00008195# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8196# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8197# defined, but the compiler does not support pragma redefine_extname,
8198# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8199# structures (such as rlimit64) without declaring them. As a
8200# work-around, disable LFS on such configurations
8201
8202use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8204$as_echo_n "checking Solaris LFS bug... " >&6; }
8205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008206/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008207
8208#define _LARGEFILE_SOURCE 1
8209#define _FILE_OFFSET_BITS 64
8210#include <sys/resource.h>
8211
Martin v. Löwis399a6892002-10-04 10:22:02 +00008212int
8213main ()
8214{
8215struct rlimit foo;
8216 ;
8217 return 0;
8218}
8219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008221 sol_lfs_bug=no
8222else
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8227$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008228if test "$sol_lfs_bug" = "yes"; then
8229 use_lfs=no
8230fi
8231
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008232# Don't use largefile support for GNU/Hurd
8233case $ac_sys_system in GNU*)
8234 use_lfs=no
8235esac
8236
Martin v. Löwis399a6892002-10-04 10:22:02 +00008237if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008238# Two defines needed to enable largefile support on various platforms
8239# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008240case $ac_sys_system/$ac_sys_release in
8241AIX*)
8242
8243$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8244
8245 ;;
8246esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008252
Martin v. Löwis399a6892002-10-04 10:22:02 +00008253fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008254
Guido van Rossum84e7b241996-08-19 21:59:00 +00008255# Add some code to confdefs.h so that the test for off_t works on SCO
8256cat >> confdefs.h <<\EOF
8257#if defined(SCO_DS)
8258#undef _OFF_T
8259#endif
8260EOF
8261
Guido van Rossumef2255b2000-03-10 22:30:29 +00008262# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008263ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008264if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008265
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008266else
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
8268cat >>confdefs.h <<_ACEOF
8269#define mode_t int
8270_ACEOF
8271
8272fi
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008275if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008276
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008277else
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
8282
8283fi
8284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008286if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008287
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008288else
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
8290cat >>confdefs.h <<_ACEOF
8291#define pid_t int
8292_ACEOF
8293
8294fi
8295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008298#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008299_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008302if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008303
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008304else
Martin v. Löwis11437992002-04-12 09:54:03 +00008305
8306cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008308_ACEOF
8309
8310fi
8311
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8313$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008314if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008316else
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008319#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008320
8321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 ac_cv_type_uid_t=yes
8325else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008326 ac_cv_type_uid_t=no
8327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008328rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008329
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8332$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008333if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008336
8337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008339
8340fi
8341
Mark Dickinson983bc162012-12-02 12:11:38 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008344if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008347
8348fi
8349
Stefan Krah1919b7e2012-03-21 18:25:23 +01008350ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8351if test "x$ac_cv_type___uint128_t" = xyes; then :
8352
8353$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8354
8355fi
8356
Jack Jansendd19cf82001-12-06 22:36:17 +00008357
Michael W. Hudson54241132001-12-07 15:38:26 +00008358# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008359# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360# The cast to long int works around a bug in the HP C Compiler
8361# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8362# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8363# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8365$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008366if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 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 +00008370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 if test "$ac_cv_type_int" = yes; then
8373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008375as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008376See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 else
8378 ac_cv_sizeof_int=0
8379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8384$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385
8386
8387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008389#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008391
8392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393# The cast to long int works around a bug in the HP C Compiler
8394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8398$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008399if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 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 +00008403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 if test "$ac_cv_type_long" = yes; then
8406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008408as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008409See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410 else
8411 ac_cv_sizeof_long=0
8412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8417$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418
8419
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008424
8425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426# The cast to long int works around a bug in the HP C Compiler
8427# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8428# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8429# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8431$as_echo_n "checking size of long long... " >&6; }
8432if ${ac_cv_sizeof_long_long+:} false; then :
8433 $as_echo_n "(cached) " >&6
8434else
8435 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8436
8437else
8438 if test "$ac_cv_type_long_long" = yes; then
8439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8441as_fn_error 77 "cannot compute sizeof (long long)
8442See \`config.log' for more details" "$LINENO" 5; }
8443 else
8444 ac_cv_sizeof_long_long=0
8445 fi
8446fi
8447
8448fi
8449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8450$as_echo "$ac_cv_sizeof_long_long" >&6; }
8451
8452
8453
8454cat >>confdefs.h <<_ACEOF
8455#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8456_ACEOF
8457
8458
8459# The cast to long int works around a bug in the HP C Compiler
8460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8462# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8464$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008465if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 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 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 if test "$ac_cv_type_void_p" = yes; then
8472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008474as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008475See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476 else
8477 ac_cv_sizeof_void_p=0
8478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8483$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484
8485
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008488#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008489_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008490
8491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492# The cast to long int works around a bug in the HP C Compiler
8493# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8494# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8495# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8497$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008498if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 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 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 if test "$ac_cv_type_short" = yes; then
8505 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008507as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008508See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 else
8510 ac_cv_sizeof_short=0
8511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8516$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517
8518
8519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008522_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008523
8524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525# The cast to long int works around a bug in the HP C Compiler
8526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8528# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8530$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008531if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 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 +00008535
Martin v. Löwis11437992002-04-12 09:54:03 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 if test "$ac_cv_type_float" = yes; then
8538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008540as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008541See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 else
8543 ac_cv_sizeof_float=0
8544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8549$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550
8551
8552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008555_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556
8557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558# The cast to long int works around a bug in the HP C Compiler
8559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8561# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8563$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008564if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 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 +00008568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 if test "$ac_cv_type_double" = yes; then
8571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008573as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008574See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575 else
8576 ac_cv_sizeof_double=0
8577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8582$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583
8584
8585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008587#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008588_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008589
8590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591# The cast to long int works around a bug in the HP C Compiler
8592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8594# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8596$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008597if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 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 +00008601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602else
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 if test "$ac_cv_type_fpos_t" = yes; then
8604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008606as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008607See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 else
8609 ac_cv_sizeof_fpos_t=0
8610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8615$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616
8617
8618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008620#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008621_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008622
Michael W. Hudson54241132001-12-07 15:38:26 +00008623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624# The cast to long int works around a bug in the HP C Compiler
8625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8627# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8629$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008630if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 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 +00008634
Martin v. Löwis18e16552006-02-15 17:27:45 +00008635else
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 if test "$ac_cv_type_size_t" = yes; then
8637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008639as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008640See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 else
8642 ac_cv_sizeof_size_t=0
8643 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645
Martin v. Löwis18e16552006-02-15 17:27:45 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8648$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649
8650
8651
Martin v. Löwis18e16552006-02-15 17:27:45 +00008652cat >>confdefs.h <<_ACEOF
8653#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8654_ACEOF
8655
8656
Christian Heimes400adb02008-02-01 08:12:03 +00008657# The cast to long int works around a bug in the HP C Compiler
8658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8660# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8662$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 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 +00008667
Christian Heimes400adb02008-02-01 08:12:03 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 if test "$ac_cv_type_pid_t" = yes; then
8670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008672as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008673See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008674 else
8675 ac_cv_sizeof_pid_t=0
8676 fi
8677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678
Christian Heimes400adb02008-02-01 08:12:03 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8681$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008682
8683
8684
8685cat >>confdefs.h <<_ACEOF
8686#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8687_ACEOF
8688
8689
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008690# The cast to long int works around a bug in the HP C Compiler
8691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693# This bug is HP SR number 8606223364.
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8695$as_echo_n "checking size of uintptr_t... " >&6; }
8696if ${ac_cv_sizeof_uintptr_t+:} false; then :
8697 $as_echo_n "(cached) " >&6
8698else
8699 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8700
8701else
8702 if test "$ac_cv_type_uintptr_t" = yes; then
8703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8705as_fn_error 77 "cannot compute sizeof (uintptr_t)
8706See \`config.log' for more details" "$LINENO" 5; }
8707 else
8708 ac_cv_sizeof_uintptr_t=0
8709 fi
8710fi
8711
8712fi
8713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8714$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8715
8716
8717
8718cat >>confdefs.h <<_ACEOF
8719#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8720_ACEOF
8721
8722
Michael W. Hudson54241132001-12-07 15:38:26 +00008723
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8725$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008728/* end confdefs.h. */
8729
8730int
8731main ()
8732{
8733long double x; x = (long double)0;
8734 ;
8735 return 0;
8736}
8737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008738if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008739
8740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742
8743 have_long_double=yes
8744
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8748$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008750# The cast to long int works around a bug in the HP C Compiler
8751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8755$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008756if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 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 +00008760
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if test "$ac_cv_type_long_double" = yes; then
8763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008765as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008766See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767 else
8768 ac_cv_sizeof_long_double=0
8769 fi
8770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8774$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008775
8776
8777
8778cat >>confdefs.h <<_ACEOF
8779#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8780_ACEOF
8781
8782
8783fi
8784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785# The cast to long int works around a bug in the HP C Compiler
8786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8790$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008791if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 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 +00008795
Thomas Woutersb2137042007-02-01 18:02:27 +00008796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 if test "$ac_cv_type__Bool" = yes; then
8798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008800as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008801See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802 else
8803 ac_cv_sizeof__Bool=0
8804 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806
Thomas Woutersb2137042007-02-01 18:02:27 +00008807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8809$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810
8811
8812
Thomas Woutersb2137042007-02-01 18:02:27 +00008813cat >>confdefs.h <<_ACEOF
8814#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8815_ACEOF
8816
8817
Thomas Woutersb2137042007-02-01 18:02:27 +00008818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819# The cast to long int works around a bug in the HP C Compiler
8820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8824$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008825if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829#ifdef HAVE_SYS_TYPES_H
8830#include <sys/types.h>
8831#endif
8832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if test "$ac_cv_type_off_t" = yes; then
8837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008839as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008840See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841 else
8842 ac_cv_sizeof_off_t=0
8843 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8848$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850
8851
Martin v. Löwis11437992002-04-12 09:54:03 +00008852cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008855
Michael W. Hudson54241132001-12-07 15:38:26 +00008856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8859$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008860if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008861 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8866$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867else
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008870fi
8871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008872# The cast to long int works around a bug in the HP C Compiler
8873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8875# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8877$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008878if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880else
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882#ifdef HAVE_SYS_TYPES_H
8883#include <sys/types.h>
8884#endif
8885#ifdef HAVE_TIME_H
8886#include <time.h>
8887#endif
8888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if test "$ac_cv_type_time_t" = yes; then
8893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008895as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008896See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897 else
8898 ac_cv_sizeof_time_t=0
8899 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8904$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008906
8907
Martin v. Löwis11437992002-04-12 09:54:03 +00008908cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008910_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008911
Michael W. Hudson54241132001-12-07 15:38:26 +00008912
8913
Trent Mick635f6fb2000-08-23 21:33:05 +00008914# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008915ac_save_cc="$CC"
8916if test "$ac_cv_kpthread" = "yes"
8917then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008918elif test "$ac_cv_kthread" = "yes"
8919then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008920elif test "$ac_cv_pthread" = "yes"
8921then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008922fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8925$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008926have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
8930 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Guido van Rossum12580492000-09-24 16:47:19 +00008934pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ;
8936 return 0;
8937}
Matthias Kloseb159a552010-04-25 21:00:44 +00008938
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008940if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008941 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8945$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008946if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8952$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008953if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955else
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008957#ifdef HAVE_PTHREAD_H
8958#include <pthread.h>
8959#endif
8960
Matthias Kloseb9621712010-04-24 17:59:49 +00008961"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963else
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 if test "$ac_cv_type_pthread_t" = yes; then
8965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008967as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008968See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969 else
8970 ac_cv_sizeof_pthread_t=0
8971 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973
Trent Mick635f6fb2000-08-23 21:33:05 +00008974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8976$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008977
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978
8979
Martin v. Löwis11437992002-04-12 09:54:03 +00008980cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008981#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984
Trent Mick635f6fb2000-08-23 21:33:05 +00008985fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008986CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008987
Michael W. Hudson54241132001-12-07 15:38:26 +00008988
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008989case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008990 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008991 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8992 ;;
8993 Darwin/*)
8994 OTHER_LIBTOOL_OPT=""
8995 ;;
8996esac
8997
8998
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009000case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009001 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009002 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9003 if test "${enable_universalsdk}"; then
9004 :
9005 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009006 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009007 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009008 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009009 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009010 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009011 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009012 if test ${gcc_version} '<' 4.0
9013 then
9014 LIBTOOL_CRUFT="-lcc_dynamic"
9015 else
9016 LIBTOOL_CRUFT=""
9017 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009019 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020else
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009023
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009024 #include <unistd.h>
9025 int main(int argc, char*argv[])
9026 {
9027 if (sizeof(long) == 4) {
9028 return 0;
9029 } else {
9030 return 1;
9031 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009032 }
9033
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009035if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036 ac_osx_32bit=yes
9037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009042fi
9043
9044
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009046 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009047 i386)
9048 MACOSX_DEFAULT_ARCH="i386"
9049 ;;
9050 ppc)
9051 MACOSX_DEFAULT_ARCH="ppc"
9052 ;;
9053 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009054 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055 ;;
9056 esac
9057 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009058 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059 i386)
9060 MACOSX_DEFAULT_ARCH="x86_64"
9061 ;;
9062 ppc)
9063 MACOSX_DEFAULT_ARCH="ppc64"
9064 ;;
9065 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009066 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009067 ;;
9068 esac
9069
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009070 fi
9071
9072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009073 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009075esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9077$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009078if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009079then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009080 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009082 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9087$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009088 if test $enable_shared = "yes"
9089 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009090 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 +00009091 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009092else
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009095fi
9096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9098$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009099case $ac_sys_system/$ac_sys_release in
9100 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9105$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009106 ;;
9107 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009110 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009111esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009112
Guido van Rossum0a516c91994-09-12 10:58:40 +00009113# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009114
Michael W. Hudson54241132001-12-07 15:38:26 +00009115
9116
9117
9118
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119
Thomas Wouters477c8d52006-05-27 19:21:47 +00009120
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009121# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9122# -- usually .so, .sl on HP-UX, .dll on Cygwin
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9124$as_echo_n "checking the extension of shared libraries... " >&6; }
9125if test -z "$SHLIB_SUFFIX"; then
9126 case $ac_sys_system in
9127 hp*|HP*)
9128 case `uname -m` in
9129 ia64) SHLIB_SUFFIX=.so;;
9130 *) SHLIB_SUFFIX=.sl;;
9131 esac
9132 ;;
9133 CYGWIN*) SHLIB_SUFFIX=.dll;;
9134 *) SHLIB_SUFFIX=.so;;
9135 esac
9136fi
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9138$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009139
Guido van Rossum0a516c91994-09-12 10:58:40 +00009140# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009141# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009142# (Shared libraries in this instance are shared modules to be loaded into
9143# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9145$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009146if test -z "$LDSHARED"
9147then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009148 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009149 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009150 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009151 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009152 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009153 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009154 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009156 if test "$GCC" = "yes" ; then
9157 LDSHARED='$(CC) -shared'
9158 LDCXXSHARED='$(CXX) -shared'
9159 else
9160 LDSHARED='$(CC) -G'
9161 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009162 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009163 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009164 if test "$GCC" = "yes" ; then
9165 LDSHARED='$(CC) -shared'
9166 LDCXXSHARED='$(CXX) -shared'
9167 else
9168 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009169 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009170 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009171 LDSHARED='$(CC) -bundle'
9172 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009173 if test "$enable_framework" ; then
9174 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009175 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9176 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009177 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009178 else
9179 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009180 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009181 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009182 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009183 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009184 LDSHARED='$(CC) -bundle'
9185 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009186 if test "$enable_framework" ; then
9187 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009188 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9189 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009191 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009192 # No framework, use the Python app as bundle-loader
9193 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009194 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009195 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009196 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009197 Darwin/*)
9198 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9199 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009200
Ned Deily36820b62014-06-25 13:44:22 -07009201 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9202 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9203 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9204 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9205 if test ${dep_target_major} -eq 10 && \
9206 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009207 then
Ned Deily36820b62014-06-25 13:44:22 -07009208 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009209 LDSHARED='$(CC) -bundle'
9210 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009211 if test "$enable_framework" ; then
9212 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009213 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9214 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009215 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009216 else
9217 # No framework, use the Python app as bundle-loader
9218 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9219 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009220 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009221 fi
Ned Deily36820b62014-06-25 13:44:22 -07009222 else
9223 # building for OS X 10.3 and later
9224 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9225 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9226 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009227 fi
9228 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009229 Linux*|GNU*|QNX*)
9230 LDSHARED='$(CC) -shared'
9231 LDCXXSHARED='$(CXX) -shared';;
9232 BSD/OS*/4*)
9233 LDSHARED="gcc -shared"
9234 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009235 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009236 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009237 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009238 LDSHARED='$(CC) -shared'
9239 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009240 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009241 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009242 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009243 OpenBSD*)
9244 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9245 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009246 LDSHARED='$(CC) -shared $(CCSHARED)'
9247 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009248 else
9249 case `uname -r` in
9250 [01].* | 2.[0-7] | 2.[0-7].*)
9251 LDSHARED="ld -Bshareable ${LDFLAGS}"
9252 ;;
9253 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009254 LDSHARED='$(CC) -shared $(CCSHARED)'
9255 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009256 ;;
9257 esac
9258 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009259 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009260 LDSHARED='$(CC) -shared'
9261 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009262 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009263 if test "$GCC" = "yes" ; then
9264 LDSHARED='$(CC) -shared'
9265 LDCXXSHARED='$(CXX) -shared'
9266 else
9267 LDSHARED='$(CC) -G'
9268 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009269 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 SCO_SV*)
9271 LDSHARED='$(CC) -Wl,-G,-Bexport'
9272 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9273 CYGWIN*)
9274 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9275 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276 *) LDSHARED="ld";;
9277 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9280$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009281LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009282BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009283# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9286$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009287if test -z "$CCSHARED"
9288then
Guido van Rossum07397971997-04-29 21:49:50 +00009289 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009290 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009291 then CCSHARED="-fPIC";
9292 elif test `uname -p` = sparc;
9293 then CCSHARED="-xcode=pic32";
9294 else CCSHARED="-Kpic";
9295 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009296 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009297 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009298 else CCSHARED="+z";
9299 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009300 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009301 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009302 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009303 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009304 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009305 if test "$GCC" = "yes"
9306 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009307 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009308 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009309 SCO_SV*)
9310 if test "$GCC" = "yes"
9311 then CCSHARED="-fPIC"
9312 else CCSHARED="-Kpic -belf"
9313 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009314 IRIX*/6*) case $CC in
9315 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009316 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009317 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009318 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9321$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009323# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9325$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326if test -z "$LINKFORSHARED"
9327then
Guido van Rossum07397971997-04-29 21:49:50 +00009328 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009329 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009330 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009331 LINKFORSHARED="-Wl,-E -Wl,+s";;
9332# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009333 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009334 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009335 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009338 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009339
9340 # Issue #18075: the default maximum stack size (8MBytes) is too
9341 # small for the default recursion limit. Increase the stack size
9342 # to ensure that tests don't crash
9343 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9344
Jack Jansene578a632001-08-15 01:27:14 +00009345 if test "$enable_framework"
9346 then
Jack Jansenda49e192005-01-07 13:08:22 +00009347 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009348 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009349 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009350 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009351 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009352 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009353 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009354 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9355 then
9356 LINKFORSHARED="-Wl,--export-dynamic"
9357 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009358 SunOS/5*) case $CC in
9359 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009360 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009361 then
9362 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009363 fi;;
9364 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009365 CYGWIN*)
9366 if test $enable_shared = "no"
9367 then
9368 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9369 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009370 QNX*)
9371 # -Wl,-E causes the symbols to be added to the dynamic
9372 # symbol table so that they can be found when a module
9373 # is loaded. -N 2048K causes the stack size to be set
9374 # to 2048 kilobytes so that the stack doesn't overflow
9375 # when running test_compile.py.
9376 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009377 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9380$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009381
Michael W. Hudson54241132001-12-07 15:38:26 +00009382
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9385$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009386if test ! "$LIBRARY" = "$LDLIBRARY"
9387then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009388 case $ac_sys_system in
9389 CYGWIN*)
9390 # Cygwin needs CCSHARED when building extension DLLs
9391 # but not when building the interpreter DLL.
9392 CFLAGSFORSHARED='';;
9393 *)
9394 CFLAGSFORSHARED='$(CCSHARED)'
9395 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9398$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009399
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009400# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9401# library (with --enable-shared).
9402# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009403# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9404# if it is not required, since it creates a dependency of the shared library
9405# to LIBS. This, in turn, means that applications linking the shared libpython
9406# don't need to link LIBS explicitly. The default should be only changed
9407# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009408
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9410$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009411case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009413 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009414esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9416$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009417
9418
Guido van Rossum627b2d71993-12-24 10:39:16 +00009419# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9421$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009423 $as_echo_n "(cached) " >&6
9424else
9425 ac_check_lib_save_LIBS=$LIBS
9426LIBS="-lsendfile $LIBS"
9427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9428/* end confdefs.h. */
9429
9430/* Override any GCC internal prototype to avoid an error.
9431 Use char because int might match the return type of a GCC
9432 builtin and then its argument prototype would still apply. */
9433#ifdef __cplusplus
9434extern "C"
9435#endif
9436char sendfile ();
9437int
9438main ()
9439{
9440return sendfile ();
9441 ;
9442 return 0;
9443}
9444_ACEOF
9445if ac_fn_c_try_link "$LINENO"; then :
9446 ac_cv_lib_sendfile_sendfile=yes
9447else
9448 ac_cv_lib_sendfile_sendfile=no
9449fi
9450rm -f core conftest.err conftest.$ac_objext \
9451 conftest$ac_exeext conftest.$ac_ext
9452LIBS=$ac_check_lib_save_LIBS
9453fi
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9455$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009457 cat >>confdefs.h <<_ACEOF
9458#define HAVE_LIBSENDFILE 1
9459_ACEOF
9460
9461 LIBS="-lsendfile $LIBS"
9462
9463fi
9464
Matthias Kloseb9621712010-04-24 17:59:49 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9466$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009467if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009471LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475/* Override any GCC internal prototype to avoid an error.
9476 Use char because int might match the return type of a GCC
9477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009478#ifdef __cplusplus
9479extern "C"
9480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009481char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009482int
9483main ()
9484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ;
9487 return 0;
9488}
9489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492else
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009495rm -f core conftest.err conftest.$ac_objext \
9496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9500$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009501if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 cat >>confdefs.h <<_ACEOF
9503#define HAVE_LIBDL 1
9504_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009506 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508fi
9509 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9511$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009512if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009514else
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009516LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520/* Override any GCC internal prototype to avoid an error.
9521 Use char because int might match the return type of a GCC
9522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009523#ifdef __cplusplus
9524extern "C"
9525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009526char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009527int
9528main ()
9529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ;
9532 return 0;
9533}
9534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009537else
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540rm -f core conftest.err conftest.$ac_objext \
9541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9545$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009546if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 cat >>confdefs.h <<_ACEOF
9548#define HAVE_LIBDLD 1
9549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009551 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009552
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009553fi
9554 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009555
Georg Brandlb1441c72009-01-03 22:33:39 +00009556# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009557if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9559$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009560if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009561 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009562else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009563 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567/* Override any GCC internal prototype to avoid an error.
9568 Use char because int might match the return type of a GCC
9569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009570#ifdef __cplusplus
9571extern "C"
9572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009573char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009574int
9575main ()
9576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ;
9579 return 0;
9580}
9581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582for ac_lib in '' pthread rt posix4; do
9583 if test -z "$ac_lib"; then
9584 ac_res="none required"
9585 else
9586 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009587 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009592rm -f core conftest.err conftest.$ac_objext \
9593 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009594 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597done
Victor Stinnere0be4232011-10-25 13:06:09 +02009598if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600else
9601 ac_cv_search_sem_init=no
9602fi
9603rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009604LIBS=$ac_func_search_save_LIBS
9605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9607$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009611
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009612fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009613 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009614 # posix4 on Solaris 2.6
9615 # pthread (first!) on Linux
9616fi
9617
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9620$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009621if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009622 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623else
9624 ac_check_lib_save_LIBS=$LIBS
9625LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629/* Override any GCC internal prototype to avoid an error.
9630 Use char because int might match the return type of a GCC
9631 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009632#ifdef __cplusplus
9633extern "C"
9634#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636int
9637main ()
9638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640 ;
9641 return 0;
9642}
9643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645 ac_cv_lib_intl_textdomain=yes
9646else
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009649rm -f core conftest.err conftest.$ac_objext \
9650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651LIBS=$ac_check_lib_save_LIBS
9652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9654$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009655if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658
Brett Cannonc6d936e2009-06-07 20:09:53 +00009659 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009660fi
9661
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009662
9663# checks for system dependent C++ extensions support
9664case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9666$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009669
Georg Brandl59e87bd2011-02-15 19:48:59 +00009670 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009674loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ;
9676 return 0;
9677}
Matthias Kloseb159a552010-04-25 21:00:44 +00009678
Martin v. Löwis11437992002-04-12 09:54:03 +00009679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009680if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009681
Matthias Kloseb159a552010-04-25 21:00:44 +00009682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009684
Matthias Kloseb159a552010-04-25 21:00:44 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009688else
Matthias Kloseb159a552010-04-25 21:00:44 +00009689
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009691$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009692
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009696 *) ;;
9697esac
9698
Christian Heimes985ecdc2013-11-20 11:46:18 +01009699# check for systems that require aligned memory access
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9701$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009702if ${ac_cv_aligned_required+:} false; then :
9703 $as_echo_n "(cached) " >&6
9704else
9705 if test "$cross_compiling" = yes; then :
9706 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009707else
9708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9709/* end confdefs.h. */
9710
9711int main()
9712{
9713 char s[16];
9714 int i, *p1, *p2;
9715 for (i=0; i < 16; i++)
9716 s[i] = i;
9717 p1 = (int*)(s+1);
9718 p2 = (int*)(s+2);
9719 if (*p1 == *p2)
9720 return 1;
9721 return 0;
9722}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009723_ACEOF
9724if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009725 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009726else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009727 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009728fi
9729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9730 conftest.$ac_objext conftest.beam conftest.$ac_ext
9731fi
9732
9733
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009734fi
9735
9736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9737$as_echo "$ac_cv_aligned_required" >&6; }
9738if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009739
9740$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9741
9742fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009743
9744# str, bytes and memoryview hash algorithm
9745
9746
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9748$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9749
9750# Check whether --with-hash_algorithm was given.
9751if test "${with_hash_algorithm+set}" = set; then :
9752 withval=$with_hash_algorithm;
9753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9754$as_echo "$withval" >&6; }
9755case "$withval" in
9756 siphash24)
9757 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9758
9759 ;;
9760 fnv)
9761 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9762
9763 ;;
9764 *)
9765 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9766 ;;
9767esac
9768
9769else
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9771$as_echo "default" >&6; }
9772fi
9773
9774
Charles-François Natalid30b0222014-05-08 23:08:51 +01009775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9776$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9777
9778# Check whether --with-address_sanitizer was given.
9779if test "${with_address_sanitizer+set}" = set; then :
9780 withval=$with_address_sanitizer;
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9782$as_echo "$withval" >&6; }
9783BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9784LDFLAGS="-fsanitize=address $LDFLAGS"
9785
9786else
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788$as_echo "no" >&6; }
9789fi
9790
9791
Guido van Rossum70c7f481998-03-26 18:44:10 +00009792# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9794$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009795if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009799LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803/* Override any GCC internal prototype to avoid an error.
9804 Use char because int might match the return type of a GCC
9805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009809char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009810int
9811main ()
9812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ;
9815 return 0;
9816}
9817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823rm -f core conftest.err conftest.$ac_objext \
9824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9828$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009829if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009830 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009831fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009832 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9834$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009837else
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009839LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843/* Override any GCC internal prototype to avoid an error.
9844 Use char because int might match the return type of a GCC
9845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#ifdef __cplusplus
9847extern "C"
9848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009849char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850int
9851main ()
9852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ;
9855 return 0;
9856}
9857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863rm -f core conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009865LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9868$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009870 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009871fi
9872 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009873
Matthias Kloseb9621712010-04-24 17:59:49 +00009874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9875$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009878if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9881$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009882LIBS="$withval $LIBS"
9883
9884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887fi
9888
Guido van Rossum7f43da71994-08-01 12:15:30 +00009889
Victor Stinner8291b5e2015-03-20 16:03:14 +01009890
9891
9892
9893
9894
9895
9896
9897if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9898 if test -n "$ac_tool_prefix"; then
9899 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9900set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if ${ac_cv_path_PKG_CONFIG+:} false; then :
9904 $as_echo_n "(cached) " >&6
9905else
9906 case $PKG_CONFIG in
9907 [\\/]* | ?:[\\/]*)
9908 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9909 ;;
9910 *)
9911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912for as_dir in $PATH
9913do
9914 IFS=$as_save_IFS
9915 test -z "$as_dir" && as_dir=.
9916 for ac_exec_ext in '' $ac_executable_extensions; do
9917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920 break 2
9921 fi
9922done
9923 done
9924IFS=$as_save_IFS
9925
9926 ;;
9927esac
9928fi
9929PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9930if test -n "$PKG_CONFIG"; then
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9932$as_echo "$PKG_CONFIG" >&6; }
9933else
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935$as_echo "no" >&6; }
9936fi
9937
9938
9939fi
9940if test -z "$ac_cv_path_PKG_CONFIG"; then
9941 ac_pt_PKG_CONFIG=$PKG_CONFIG
9942 # Extract the first word of "pkg-config", so it can be a program name with args.
9943set dummy pkg-config; ac_word=$2
9944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9945$as_echo_n "checking for $ac_word... " >&6; }
9946if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9947 $as_echo_n "(cached) " >&6
9948else
9949 case $ac_pt_PKG_CONFIG in
9950 [\\/]* | ?:[\\/]*)
9951 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9952 ;;
9953 *)
9954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9955for as_dir in $PATH
9956do
9957 IFS=$as_save_IFS
9958 test -z "$as_dir" && as_dir=.
9959 for ac_exec_ext in '' $ac_executable_extensions; do
9960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9961 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9963 break 2
9964 fi
9965done
9966 done
9967IFS=$as_save_IFS
9968
9969 ;;
9970esac
9971fi
9972ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9973if test -n "$ac_pt_PKG_CONFIG"; then
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9975$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9976else
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9978$as_echo "no" >&6; }
9979fi
9980
9981 if test "x$ac_pt_PKG_CONFIG" = x; then
9982 PKG_CONFIG=""
9983 else
9984 case $cross_compiling:$ac_tool_warned in
9985yes:)
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9987$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9988ac_tool_warned=yes ;;
9989esac
9990 PKG_CONFIG=$ac_pt_PKG_CONFIG
9991 fi
9992else
9993 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9994fi
9995
9996fi
9997if test -n "$PKG_CONFIG"; then
9998 _pkg_min_version=0.9.0
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10000$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10001 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10003$as_echo "yes" >&6; }
10004 else
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007 PKG_CONFIG=""
10008 fi
10009fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010010
10011# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10013$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010014
10015# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010017 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010018else
10019 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020fi
10021
10022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10024$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010025
10026# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10028$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010029
10030# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010031if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010032 withval=$with_system_ffi;
10033fi
10034
10035
Zachary Waref40d4dd2016-09-17 01:25:24 -050010036if test "$ac_sys_system" = "Darwin"
10037then
10038 case "$with_system_ffi" in
10039 "")
10040 with_system_ffi="no"
10041 ;;
10042 yes|no)
10043 ;;
10044 *)
10045 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10046 ;;
10047 esac
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10049$as_echo "$with_system_ffi" >&6; }
10050else
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10052$as_echo "yes" >&6; }
10053 if test "$with_system_ffi" != ""
10054 then
10055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10056$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10057 fi
10058 with_system_ffi="yes"
10059fi
Zachary Ware935043d2016-09-09 17:01:21 -070010060
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010061if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010062 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10063else
10064 LIBFFI_INCLUDEDIR=""
10065fi
10066
10067
Stefan Krah60187b52012-03-23 19:06:27 +010010068# Check for use of the system libmpdec library
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10070$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10071
10072# Check whether --with-system_libmpdec was given.
10073if test "${with_system_libmpdec+set}" = set; then :
10074 withval=$with_system_libmpdec;
10075else
10076 with_system_libmpdec="no"
10077fi
10078
10079
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10081$as_echo "$with_system_libmpdec" >&6; }
10082
Benjamin Peterson076ed002010-10-31 17:11:02 +000010083# Check for support for loadable sqlite extensions
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10085$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10086# Check whether --enable-loadable-sqlite-extensions was given.
10087if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10088 enableval=$enable_loadable_sqlite_extensions;
10089else
10090 enable_loadable_sqlite_extensions="no"
10091fi
10092
10093
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10095$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10096
Ned Deilyd819b932013-09-06 01:07:05 -070010097# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10098
10099
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10101$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10102
10103# Check whether --with-tcltk-includes was given.
10104if test "${with_tcltk_includes+set}" = set; then :
10105 withval=$with_tcltk_includes;
10106else
10107 with_tcltk_includes="default"
10108fi
10109
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10111$as_echo "$with_tcltk_includes" >&6; }
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10113$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10114
10115# Check whether --with-tcltk-libs was given.
10116if test "${with_tcltk_libs+set}" = set; then :
10117 withval=$with_tcltk_libs;
10118else
10119 with_tcltk_libs="default"
10120fi
10121
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10123$as_echo "$with_tcltk_libs" >&6; }
10124if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10125then
10126 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10127 then
10128 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10129 fi
10130 TCLTK_INCLUDES=""
10131 TCLTK_LIBS=""
10132else
10133 TCLTK_INCLUDES="$with_tcltk_includes"
10134 TCLTK_LIBS="$with_tcltk_libs"
10135fi
10136
Matthias Klose55708cc2009-04-30 08:06:49 +000010137# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10139$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010140
10141# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010142if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010143 withval=$with_dbmliborder;
10144if test x$with_dbmliborder = xyes
10145then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010146as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010147else
10148 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10149 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10150 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010151 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010152 fi
10153 done
10154fi
10155fi
10156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10158$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010159
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010160# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010161
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010162USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164
Martin v. Löwis11437992002-04-12 09:54:03 +000010165
10166# Templates for things AC_DEFINEd more than once.
10167# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010168
10169
Martin v. Löwis11437992002-04-12 09:54:03 +000010170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10172$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010175if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 withval=$with_threads;
10177fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010178
10179
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010180# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184 withval=$with_thread; with_threads=$with_thread
10185fi
10186
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010187
10188if test -z "$with_threads"
10189then with_threads="yes"
10190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10192$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010193
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010195if test "$with_threads" = "no"
10196then
10197 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198elif test "$ac_cv_pthread_is_default" = yes
10199then
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010201
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010204
10205 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010207elif test "$ac_cv_kpthread" = "yes"
10208then
10209 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010210 if test "$ac_cv_cxx_thread" = "yes"; then
10211 CXX="$CXX -Kpthread"
10212 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010214
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010215 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010216 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010217elif test "$ac_cv_kthread" = "yes"
10218then
10219 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010220 if test "$ac_cv_cxx_thread" = "yes"; then
10221 CXX="$CXX -Kthread"
10222 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010224
10225 posix_threads=yes
10226 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010227elif test "$ac_cv_pthread" = "yes"
10228then
10229 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010230 if test "$ac_cv_cxx_thread" = "yes"; then
10231 CXX="$CXX -pthread"
10232 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010234
10235 posix_threads=yes
10236 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010237else
10238 if test ! -z "$with_threads" -a -d "$with_threads"
10239 then LDFLAGS="$LDFLAGS -L$with_threads"
10240 fi
10241 if test ! -z "$withval" -a -d "$withval"
10242 then LDFLAGS="$LDFLAGS -L$withval"
10243 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244
10245 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010246 # define _POSIX_THREADS in unistd.h. Some apparently don't
10247 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10249$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010252
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010253#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010254#ifdef _POSIX_THREADS
10255yes
10256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
10258_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261 unistd_defines_pthreads=yes
10262else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010263 unistd_defines_pthreads=no
10264fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010265rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010266
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10268$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010271
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010272 # Just looking for pthread_create in libpthread is not enough:
10273 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10274 # So we really have to include pthread.h, and then link.
10275 _libs=$LIBS
10276 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10278$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010281
10282#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010284
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010285void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010286int
10287main ()
10288{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010289
10290pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ;
10292 return 0;
10293}
10294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10298$as_echo "yes" >&6; }
10299 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010300
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010301 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010303else
Martin v. Löwis11437992002-04-12 09:54:03 +000010304
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010305 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010309
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010310 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010311 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010312else
Guido van Rossumad678af1998-10-02 14:42:15 +000010313
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10315$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010316if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010318else
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010320LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324/* Override any GCC internal prototype to avoid an error.
10325 Use char because int might match the return type of a GCC
10326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327#ifdef __cplusplus
10328extern "C"
10329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010330char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010331int
10332main ()
10333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ;
10336 return 0;
10337}
10338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010341else
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010344rm -f core conftest.err conftest.$ac_objext \
10345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010346LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10349$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010350if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010353 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010354 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010355 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010356else
Greg Steinadf63d62000-07-05 10:38:09 +000010357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10359$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010364LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368/* Override any GCC internal prototype to avoid an error.
10369 Use char because int might match the return type of a GCC
10370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010371#ifdef __cplusplus
10372extern "C"
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
10377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010388rm -f core conftest.err conftest.$ac_objext \
10389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010390LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10393$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010394if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010398 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010399 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010400else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10403$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010404if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010408LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010412/* Override any GCC internal prototype to avoid an error.
10413 Use char because int might match the return type of a GCC
10414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010415#ifdef __cplusplus
10416extern "C"
10417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010418char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010419int
10420main ()
10421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ;
10424 return 0;
10425}
10426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010427if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429else
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010432rm -f core conftest.err conftest.$ac_objext \
10433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010434LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10437$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010438if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010441 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010442 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010443 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010444else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10447$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010448if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450else
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010452LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010456/* Override any GCC internal prototype to avoid an error.
10457 Use char because int might match the return type of a GCC
10458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010459#ifdef __cplusplus
10460extern "C"
10461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010462char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010463int
10464main ()
10465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010466return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 ;
10468 return 0;
10469}
10470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010471if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473else
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476rm -f core conftest.err conftest.$ac_objext \
10477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010478LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10481$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010482if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010485 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010486 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010487 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010488else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010489
Martin v. Löwis130fb172001-07-19 11:00:41 +000010490 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010491fi
10492
Guido van Rossum627b2d71993-12-24 10:39:16 +000010493
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010494fi
10495
Guido van Rossum0be3e491997-05-22 20:33:33 +000010496fi
10497
Guido van Rossum49545951997-12-02 19:28:29 +000010498fi
10499
Guido van Rossumb93a8621998-05-07 13:27:32 +000010500fi
10501
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010503rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10507$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010508if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510else
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010512LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516/* Override any GCC internal prototype to avoid an error.
10517 Use char because int might match the return type of a GCC
10518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010519#ifdef __cplusplus
10520extern "C"
10521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010522char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010536rm -f core conftest.err conftest.$ac_objext \
10537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010538LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10541$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010542if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010544
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010546 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010547 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010548fi
10549
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010550
Neal Norwitza978ab02002-11-02 16:58:05 +000010551 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10553$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010554if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010556else
Martin v. Löwis11437992002-04-12 09:54:03 +000010557 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010558LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562/* Override any GCC internal prototype to avoid an error.
10563 Use char because int might match the return type of a GCC
10564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010565#ifdef __cplusplus
10566extern "C"
10567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010568char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010569int
10570main ()
10571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010573 ;
10574 return 0;
10575}
10576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579else
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010584LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10587$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010588if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010590
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010591 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010592 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010593 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010594fi
10595
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010596 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010598
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599if test "$posix_threads" = "yes"; then
10600 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603
10604 fi
10605
10606 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10607 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010608 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611 ;;
10612 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010613$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010614
10615 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010616 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010617$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010618
10619 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620 esac
10621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10623$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626else
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628 ac_cv_pthread_system_supported=no
10629else
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010632
10633 #include <stdio.h>
10634 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635 void *foo(void *parm) {
10636 return NULL;
10637 }
10638 main() {
10639 pthread_attr_t attr;
10640 pthread_t id;
10641 if (pthread_attr_init(&attr)) exit(-1);
10642 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10643 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10644 exit(0);
10645 }
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648 ac_cv_pthread_system_supported=yes
10649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656
Guido van Rossum627b2d71993-12-24 10:39:16 +000010657fi
10658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10660$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661 if test "$ac_cv_pthread_system_supported" = "yes"; then
10662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010664
10665 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 for ac_func in pthread_sigmask
10667do :
10668 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010669if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010673 case $ac_sys_system in
10674 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010677
10678 ;;
10679 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010680fi
10681done
10682
Christian Heimesf77b4b22013-08-21 13:26:05 +020010683 for ac_func in pthread_atfork
10684do :
10685 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10686if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10687 cat >>confdefs.h <<_ACEOF
10688#define HAVE_PTHREAD_ATFORK 1
10689_ACEOF
10690
10691fi
10692done
10693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694fi
10695
10696
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10700$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010702if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707 ipv6=no
10708 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10710$as_echo "yes" >&6; }
10711 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712
10713 ipv6=yes
10714 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716else
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010719/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720 /* AF_INET6 available check */
10721#include <sys/types.h>
10722#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010723int
10724main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010726int domain = AF_INET6;
10727 ;
10728 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729}
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010731if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10734$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737else
Matthias Kloseb159a552010-04-25 21:00:44 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010746if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10748$as_echo_n "checking if RFC2553 API is available... " >&6; }
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010751
10752 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010753#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010754int
10755main ()
10756{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010757struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010758 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ;
10760 return 0;
10761}
Matthias Kloseb159a552010-04-25 21:00:44 +000010762
Martin v. Löwis11437992002-04-12 09:54:03 +000010763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010764if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010765
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010767$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010768 ipv6=yes
10769
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010770else
Matthias Kloseb159a552010-04-25 21:00:44 +000010771
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010774 ipv6=no
10775
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010778fi
10779
10780if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782
10783fi
10784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785fi
10786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787
10788ipv6type=unknown
10789ipv6lib=none
10790ipv6trylibc=no
10791
10792if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10794$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010795 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10796 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 case $i in
10798 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include <netinet/in.h>
10803#ifdef IPV6_INRIA_VERSION
10804yes
10805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010809 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812
10813 ;;
10814 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818#include <netinet/in.h>
10819#ifdef __KAME__
10820yes
10821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 ipv6type=$i;
10826 ipv6lib=inet6
10827 ipv6libdir=/usr/local/v6/lib
10828 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831
10832 ;;
10833 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837#include <features.h>
10838#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10839yes
10840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844 ipv6type=$i;
10845 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848
10849 ;;
10850 linux-inet6)
10851 if test -d /usr/inet6; then
10852 ipv6type=$i
10853 ipv6lib=inet6
10854 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010855 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 fi
10857 ;;
10858 solaris)
10859 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010860 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i
10862 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863 fi
10864 fi
10865 ;;
10866 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010868/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870#include <sys/param.h>
10871#ifdef _TOSHIBA_INET6
10872yes
10873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010874_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877 ipv6type=$i;
10878 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010879 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882
10883 ;;
10884 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include </usr/local/v6/include/sys/v6config.h>
10889#ifdef __V6D__
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i;
10896 ipv6lib=v6;
10897 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010898 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010900rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901
10902 ;;
10903 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907#include <sys/param.h>
10908#ifdef _ZETA_MINAMI_INET6
10909yes
10910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914 ipv6type=$i;
10915 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010916 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919
10920 ;;
10921 esac
10922 if test "$ipv6type" != "unknown"; then
10923 break
10924 fi
10925 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10927$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928fi
10929
10930if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10931 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10932 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10933 echo "using lib$ipv6lib"
10934 else
10935 if test $ipv6trylibc = "yes"; then
10936 echo "using libc"
10937 else
10938 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10939 echo "You need to fetch lib$ipv6lib.a from appropriate"
10940 echo 'ipv6 kit and compile beforehand.'
10941 exit 1
10942 fi
10943 fi
10944fi
10945
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10947$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949/* end confdefs.h. */
10950 /* CAN_RAW_FD_FRAMES available check */
10951#include <linux/can/raw.h>
10952int
10953main ()
10954{
10955int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10956 ;
10957 return 0;
10958}
10959_ACEOF
10960if ac_fn_c_try_compile "$LINENO"; then :
10961
10962
10963$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10964
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10966$as_echo "yes" >&6; }
10967
10968else
10969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972
10973fi
10974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10975
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010976# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10978$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010981if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982 withval=$with_doc_strings;
10983fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010984
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010985
10986if test -z "$with_doc_strings"
10987then with_doc_strings="yes"
10988fi
10989if test "$with_doc_strings" != "no"
10990then
10991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010993
10994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10996$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010998# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11000$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 withval=$with_pymalloc;
11005fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011006
Neil Schemenauera35c6882001-02-27 04:45:05 +000011007
Neil Schemenauer16c22972002-03-22 15:34:49 +000011008if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011009then
11010 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011011fi
11012if test "$with_pymalloc" != "no"
11013then
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011017 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11020$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011021
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11024$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011025
11026# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011027if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011028 withval=$with_valgrind;
11029else
11030 with_valgrind=no
11031fi
11032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11034$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 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 +020011037if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011040
11041else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011042 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011043
11044fi
11045
11046
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011047 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048fi
11049
Łukasz Langaa785c872016-09-09 17:37:37 -070011050# Check for DTrace support
11051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11052$as_echo_n "checking for --with-dtrace... " >&6; }
11053
11054# Check whether --with-dtrace was given.
11055if test "${with_dtrace+set}" = set; then :
11056 withval=$with_dtrace;
11057else
11058 with_dtrace=no
11059fi
11060
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11062$as_echo "$with_dtrace" >&6; }
11063
11064
11065
11066
11067
11068DTRACE=
11069DFLAGS=
11070DTRACE_HEADERS=
11071DTRACE_OBJS=
11072
11073if test "$with_dtrace" = "yes"
11074then
11075 # Extract the first word of "dtrace", so it can be a program name with args.
11076set dummy dtrace; ac_word=$2
11077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11078$as_echo_n "checking for $ac_word... " >&6; }
11079if ${ac_cv_path_DTRACE+:} false; then :
11080 $as_echo_n "(cached) " >&6
11081else
11082 case $DTRACE in
11083 [\\/]* | ?:[\\/]*)
11084 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11085 ;;
11086 *)
11087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11088for as_dir in $PATH
11089do
11090 IFS=$as_save_IFS
11091 test -z "$as_dir" && as_dir=.
11092 for ac_exec_ext in '' $ac_executable_extensions; do
11093 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11094 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11095 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11096 break 2
11097 fi
11098done
11099 done
11100IFS=$as_save_IFS
11101
11102 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11103 ;;
11104esac
11105fi
11106DTRACE=$ac_cv_path_DTRACE
11107if test -n "$DTRACE"; then
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11109$as_echo "$DTRACE" >&6; }
11110else
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11112$as_echo "no" >&6; }
11113fi
11114
11115
11116 if test "$DTRACE" = "not found"; then
11117 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11118 fi
11119
11120$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11121
11122 DTRACE_HEADERS="Include/pydtrace_probes.h"
11123
11124 # On OS X, DTrace providers do not need to be explicitly compiled and
11125 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11126 # generation flag '-G'. We check for presence of this flag, rather than
11127 # hardcoding support by OS, in the interest of robustness.
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11129$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11130if ${ac_cv_dtrace_link+:} false; then :
11131 $as_echo_n "(cached) " >&6
11132else
11133 ac_cv_dtrace_link=no
11134 echo 'BEGIN' > conftest.d
11135 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11136 ac_cv_dtrace_link=yes
11137
11138fi
11139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11140$as_echo "$ac_cv_dtrace_link" >&6; }
11141 if test "$ac_cv_dtrace_link" = "yes"; then
11142 DTRACE_OBJS="Python/pydtrace.o"
11143 fi
11144fi
11145
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011146# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147
Guido van Rossum98935bf2001-09-05 19:13:16 +000011148DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011149
Guido van Rossume97ee181999-12-20 21:27:22 +000011150# the dlopen() function means we might want to use dynload_shlib.o. some
11151# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011152for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011153do :
11154 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011155if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011157#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011158_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011159
Guido van Rossume97ee181999-12-20 21:27:22 +000011160fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011161done
Guido van Rossume97ee181999-12-20 21:27:22 +000011162
Michael W. Hudson54241132001-12-07 15:38:26 +000011163
Guido van Rossume97ee181999-12-20 21:27:22 +000011164# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11165# loading of modules.
11166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11168$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011169if test -z "$DYNLOADFILE"
11170then
11171 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011172 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11173 if test "$ac_cv_func_dlopen" = yes
11174 then DYNLOADFILE="dynload_shlib.o"
11175 else DYNLOADFILE="dynload_aix.o"
11176 fi
11177 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011178 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011179 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11180 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011181 *)
11182 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11183 # out any dynamic loading
11184 if test "$ac_cv_func_dlopen" = yes
11185 then DYNLOADFILE="dynload_shlib.o"
11186 else DYNLOADFILE="dynload_stub.o"
11187 fi
11188 ;;
11189 esac
11190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11192$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011193if test "$DYNLOADFILE" != "dynload_stub.o"
11194then
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011197
11198fi
11199
Neil Schemenauer4e425612001-06-19 15:44:15 +000011200# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11201
Michael W. Hudson54241132001-12-07 15:38:26 +000011202
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11204$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011205if test -z "$MACHDEP_OBJS"
11206then
Jack Jansene578a632001-08-15 01:27:14 +000011207 MACHDEP_OBJS=$extra_machdep_objs
11208else
11209 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011210fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011211if test -z "$MACHDEP_OBJS"; then
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11213$as_echo "none" >&6; }
11214else
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11216$as_echo "$MACHDEP_OBJS" >&6; }
11217fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011218
Guido van Rossum627b2d71993-12-24 10:39:16 +000011219# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011220for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011221 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011222 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011223 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011224 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011225 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011226 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011227 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011228 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011229 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011230 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011231 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011232 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011233 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011234 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11235 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011236 sigaction sigaltstack siginterrupt sigpending sigrelse \
11237 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011238 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011239 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011240 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011241do :
11242 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11243ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011244if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011246#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011247_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011249fi
11250done
11251
Michael W. Hudson54241132001-12-07 15:38:26 +000011252
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011253ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11254 #include <dirent.h>
11255"
11256if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11257
11258$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11259
11260fi
11261
11262
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011263# For some functions, having a definition is not sufficient, since
11264# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11266$as_echo_n "checking for chroot... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270int
11271main ()
11272{
11273void *x=chroot
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11291$as_echo_n "checking for link... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295int
11296main ()
11297{
11298void *x=link
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
11313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11316$as_echo_n "checking for symlink... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011319#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320int
11321main ()
11322{
11323void *x=symlink
11324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337
11338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11341$as_echo_n "checking for fchdir... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011344#include <unistd.h>
11345int
11346main ()
11347{
11348void *x=fchdir
11349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011356
Matthias Kloseb159a552010-04-25 21:00:44 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362
11363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11366$as_echo_n "checking for fsync... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369#include <unistd.h>
11370int
11371main ()
11372{
11373void *x=fsync
11374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381
Matthias Kloseb159a552010-04-25 21:00:44 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387
11388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11391$as_echo_n "checking for fdatasync... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011394#include <unistd.h>
11395int
11396main ()
11397{
11398void *x=fdatasync
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406
Matthias Kloseb159a552010-04-25 21:00:44 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011412
11413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11416$as_echo_n "checking for epoll... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011418/* end confdefs.h. */
11419#include <sys/epoll.h>
11420int
11421main ()
11422{
11423void *x=epoll_create
11424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011431
Matthias Kloseb159a552010-04-25 21:00:44 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011433$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011434else
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011437
11438fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11441$as_echo_n "checking for epoll_create1... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443/* end confdefs.h. */
11444#include <sys/epoll.h>
11445int
11446main ()
11447{
11448void *x=epoll_create1
11449 ;
11450 return 0;
11451}
11452_ACEOF
11453if ac_fn_c_try_compile "$LINENO"; then :
11454
11455$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11456
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11458$as_echo "yes" >&6; }
11459else
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461$as_echo "no" >&6; }
11462
11463fi
11464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11466$as_echo_n "checking for kqueue... " >&6; }
11467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468/* end confdefs.h. */
11469
11470#include <sys/types.h>
11471#include <sys/event.h>
11472
11473int
11474main ()
11475{
11476int x=kqueue()
11477 ;
11478 return 0;
11479}
11480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011481if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011482
Matthias Kloseb9621712010-04-24 17:59:49 +000011483$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011484
Matthias Kloseb159a552010-04-25 21:00:44 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011486$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011487else
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011490
11491fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11494$as_echo_n "checking for prlimit... " >&6; }
11495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11496/* end confdefs.h. */
11497
11498#include <sys/time.h>
11499#include <sys/resource.h>
11500
11501int
11502main ()
11503{
11504void *x=prlimit
11505 ;
11506 return 0;
11507}
11508_ACEOF
11509if ac_fn_c_try_compile "$LINENO"; then :
11510
11511$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11512
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11514$as_echo "yes" >&6; }
11515else
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517$as_echo "no" >&6; }
11518
11519fi
11520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11521
Martin v. Löwisd5843682002-11-21 20:41:28 +000011522# On some systems (eg. FreeBSD 5), we would find a definition of the
11523# functions ctermid_r, setgroups in the library, but no prototype
11524# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11525# address to avoid compiler warnings and potential miscompilations
11526# because of the missing prototypes.
11527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11529$as_echo_n "checking for ctermid_r... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011532
Martin v. Löwisd5843682002-11-21 20:41:28 +000011533#include <stdio.h>
11534
Martin v. Löwisd5843682002-11-21 20:41:28 +000011535int
11536main ()
11537{
11538void* p = ctermid_r
11539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011544
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011546
Matthias Kloseb159a552010-04-25 21:00:44 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011552
11553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11555
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11557$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011558if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011559 $as_echo_n "(cached) " >&6
11560else
11561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011563#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011564int
11565main ()
11566{
11567void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011568
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011569 ;
11570 return 0;
11571}
11572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011573if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011574 ac_cv_flock_decl=yes
11575else
11576 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011577
11578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011580
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011581fi
11582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11583$as_echo "$ac_cv_flock_decl" >&6; }
11584if test "x${ac_cv_flock_decl}" = xyes; then
11585 for ac_func in flock
11586do :
11587 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011588if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011589 cat >>confdefs.h <<_ACEOF
11590#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011591_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011592
Antoine Pitroua3000072010-09-07 14:52:42 +000011593else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011595$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011596if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011597 $as_echo_n "(cached) " >&6
11598else
11599 ac_check_lib_save_LIBS=$LIBS
11600LIBS="-lbsd $LIBS"
11601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11602/* end confdefs.h. */
11603
11604/* Override any GCC internal prototype to avoid an error.
11605 Use char because int might match the return type of a GCC
11606 builtin and then its argument prototype would still apply. */
11607#ifdef __cplusplus
11608extern "C"
11609#endif
11610char flock ();
11611int
11612main ()
11613{
11614return flock ();
11615 ;
11616 return 0;
11617}
11618_ACEOF
11619if ac_fn_c_try_link "$LINENO"; then :
11620 ac_cv_lib_bsd_flock=yes
11621else
11622 ac_cv_lib_bsd_flock=no
11623fi
11624rm -f core conftest.err conftest.$ac_objext \
11625 conftest$ac_exeext conftest.$ac_ext
11626LIBS=$ac_check_lib_save_LIBS
11627fi
11628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11629$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011630if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011631 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011632
11633
11634$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11635
11636
11637fi
11638
11639
11640fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011641done
11642
Antoine Pitroua3000072010-09-07 14:52:42 +000011643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11646$as_echo_n "checking for getpagesize... " >&6; }
11647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011648/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011649
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011650#include <unistd.h>
11651
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011652int
11653main ()
11654{
11655void* p = getpagesize
11656 ;
11657 return 0;
11658}
11659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011663
Matthias Kloseb159a552010-04-25 21:00:44 +000011664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011665$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011669
11670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011672
Victor Stinner984890f2011-11-24 13:53:38 +010011673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11674$as_echo_n "checking for broken unsetenv... " >&6; }
11675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11676/* end confdefs.h. */
11677
11678#include <stdlib.h>
11679
11680int
11681main ()
11682{
11683int res = unsetenv("DUMMY")
11684 ;
11685 return 0;
11686}
11687_ACEOF
11688if ac_fn_c_try_compile "$LINENO"; then :
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
11691else
11692
11693$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11694
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11696$as_echo "yes" >&6; }
11697
11698fi
11699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11700
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011701for ac_prog in true
11702do
11703 # Extract the first word of "$ac_prog", so it can be a program name with args.
11704set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011707if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011709else
11710 if test -n "$TRUE"; then
11711 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11712else
11713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH
11715do
11716 IFS=$as_save_IFS
11717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011720 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 $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 +000011722 break 2
11723 fi
11724done
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011727
11728fi
11729fi
11730TRUE=$ac_cv_prog_TRUE
11731if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11733$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011737fi
11738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011740 test -n "$TRUE" && break
11741done
11742test -n "$TRUE" || TRUE="/bin/true"
11743
11744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11746$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011747if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011749else
11750 ac_check_lib_save_LIBS=$LIBS
11751LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011753/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755/* Override any GCC internal prototype to avoid an error.
11756 Use char because int might match the return type of a GCC
11757 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758#ifdef __cplusplus
11759extern "C"
11760#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011761char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011762int
11763main ()
11764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011766 ;
11767 return 0;
11768}
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011771 ac_cv_lib_c_inet_aton=yes
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011775rm -f core conftest.err conftest.$ac_objext \
11776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777LIBS=$ac_check_lib_save_LIBS
11778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11780$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011782 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11785$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011786if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788else
11789 ac_check_lib_save_LIBS=$LIBS
11790LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011792/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794/* Override any GCC internal prototype to avoid an error.
11795 Use char because int might match the return type of a GCC
11796 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797#ifdef __cplusplus
11798extern "C"
11799#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011800char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801int
11802main ()
11803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810 ac_cv_lib_resolv_inet_aton=yes
11811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011814rm -f core conftest.err conftest.$ac_objext \
11815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011816LIBS=$ac_check_lib_save_LIBS
11817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11819$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011820if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011821 cat >>confdefs.h <<_ACEOF
11822#define HAVE_LIBRESOLV 1
11823_ACEOF
11824
11825 LIBS="-lresolv $LIBS"
11826
11827fi
11828
11829
11830fi
11831
11832
Christian Heimesd0764e22007-12-04 15:00:33 +000011833# On Tru64, chflags seems to be present, but calling it will
11834# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11836$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011837if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011841 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011844/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011845
Christian Heimesd0764e22007-12-04 15:00:33 +000011846#include <sys/stat.h>
11847#include <unistd.h>
11848int main(int argc, char*argv[])
11849{
11850 if(chflags(argv[0], 0) != 0)
11851 return 1;
11852 return 0;
11853}
Ned Deily3eb67d52011-06-28 00:00:28 -070011854
Christian Heimesd0764e22007-12-04 15:00:33 +000011855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011856if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011857 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011863fi
11864
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11868$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011869if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011872 ac_cv_have_chflags="yes"
11873else
11874 ac_cv_have_chflags="no"
11875fi
11876
11877fi
11878if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881
11882fi
11883
Matthias Kloseb9621712010-04-24 17:59:49 +000011884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11885$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011890 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011891else
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011893/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011894
Christian Heimesd0764e22007-12-04 15:00:33 +000011895#include <sys/stat.h>
11896#include <unistd.h>
11897int main(int argc, char*argv[])
11898{
11899 if(lchflags(argv[0], 0) != 0)
11900 return 1;
11901 return 0;
11902}
Ned Deily3eb67d52011-06-28 00:00:28 -070011903
Christian Heimesd0764e22007-12-04 15:00:33 +000011904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011912fi
11913
11914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11917$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011918if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011921 ac_cv_have_lchflags="yes"
11922else
11923 ac_cv_have_lchflags="no"
11924fi
11925
11926fi
11927if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011930
11931fi
11932
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011933case $ac_sys_system/$ac_sys_release in
11934Darwin/*)
11935 _CUR_CFLAGS="${CFLAGS}"
11936 _CUR_LDFLAGS="${LDFLAGS}"
11937 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11938 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11939 ;;
11940esac
11941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11943$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011944if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011946else
11947 ac_check_lib_save_LIBS=$LIBS
11948LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011950/* end confdefs.h. */
11951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952/* Override any GCC internal prototype to avoid an error.
11953 Use char because int might match the return type of a GCC
11954 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011955#ifdef __cplusplus
11956extern "C"
11957#endif
11958char inflateCopy ();
11959int
11960main ()
11961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011963 ;
11964 return 0;
11965}
11966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011968 ac_cv_lib_z_inflateCopy=yes
11969else
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011972rm -f core conftest.err conftest.$ac_objext \
11973 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011974LIBS=$ac_check_lib_save_LIBS
11975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11977$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011978if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981
11982fi
11983
11984
11985case $ac_sys_system/$ac_sys_release in
11986Darwin/*)
11987 CFLAGS="${_CUR_CFLAGS}"
11988 LDFLAGS="${_CUR_LDFLAGS}"
11989 ;;
11990esac
11991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11993$as_echo_n "checking for hstrerror... " >&6; }
11994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011995/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011996
Martin v. Löwise9416172003-05-03 10:12:45 +000011997#include <netdb.h>
11998
Martin v. Löwise9416172003-05-03 10:12:45 +000011999int
12000main ()
12001{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012002void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012003 ;
12004 return 0;
12005}
12006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012008
Matthias Kloseb9621712010-04-24 17:59:49 +000012009$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012010
Matthias Kloseb159a552010-04-25 21:00:44 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012012$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012016
12017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012018rm -f core conftest.err conftest.$ac_objext \
12019 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12022$as_echo_n "checking for inet_aton... " >&6; }
12023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012024/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012025
Martin v. Löwis86d66262006-02-17 08:40:11 +000012026#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012027#include <sys/socket.h>
12028#include <netinet/in.h>
12029#include <arpa/inet.h>
12030
Martin v. Löwise9416172003-05-03 10:12:45 +000012031int
12032main ()
12033{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012034void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012042
Matthias Kloseb159a552010-04-25 21:00:44 +000012043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012044$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012045else
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12047$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
12049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012050rm -f core conftest.err conftest.$ac_objext \
12051 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12054$as_echo_n "checking for inet_pton... " >&6; }
12055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012057
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012058#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012059#include <sys/socket.h>
12060#include <netinet/in.h>
12061#include <arpa/inet.h>
12062
Martin v. Löwise9416172003-05-03 10:12:45 +000012063int
12064main ()
12065{
12066void* p = inet_pton
12067 ;
12068 return 0;
12069}
12070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012074
Matthias Kloseb159a552010-04-25 21:00:44 +000012075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12079$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012080
12081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012083
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012084# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12086$as_echo_n "checking for setgroups... " >&6; }
12087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012088/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012089
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012090#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012091#ifdef HAVE_GRP_H
12092#include <grp.h>
12093#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012094
Martin v. Löwisd5843682002-11-21 20:41:28 +000012095int
12096main ()
12097{
12098void* p = setgroups
12099 ;
12100 return 0;
12101}
12102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012106
Matthias Kloseb159a552010-04-25 21:00:44 +000012107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012108$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12111$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012112
12113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012115
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012116# check for openpty and forkpty
12117
12118for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012119do :
12120 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012121if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12128$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012129if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137/* Override any GCC internal prototype to avoid an error.
12138 Use char because int might match the return type of a GCC
12139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012140#ifdef __cplusplus
12141extern "C"
12142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012143char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012144int
12145main ()
12146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012147return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 ;
12149 return 0;
12150}
12151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012157rm -f core conftest.err conftest.$ac_objext \
12158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012159LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12162$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012163if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012165 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12168$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012171else
12172 ac_check_lib_save_LIBS=$LIBS
12173LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012175/* end confdefs.h. */
12176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177/* Override any GCC internal prototype to avoid an error.
12178 Use char because int might match the return type of a GCC
12179 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180#ifdef __cplusplus
12181extern "C"
12182#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012183char openpty ();
12184int
12185main ()
12186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193 ac_cv_lib_bsd_openpty=yes
12194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core conftest.err conftest.$ac_objext \
12198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199LIBS=$ac_check_lib_save_LIBS
12200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12202$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205 LIBS="$LIBS -lbsd"
12206fi
12207
12208
12209fi
12210
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211
12212fi
12213done
12214
12215for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012216do :
12217 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012218if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012221_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012222
Fred Drake8cef4cf2000-06-28 16:40:38 +000012223else
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12225$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012226if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228else
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234/* Override any GCC internal prototype to avoid an error.
12235 Use char because int might match the return type of a GCC
12236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012237#ifdef __cplusplus
12238extern "C"
12239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012240char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012241int
12242main ()
12243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012254rm -f core conftest.err conftest.$ac_objext \
12255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012256LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12259$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12265$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012268else
12269 ac_check_lib_save_LIBS=$LIBS
12270LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012272/* end confdefs.h. */
12273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274/* Override any GCC internal prototype to avoid an error.
12275 Use char because int might match the return type of a GCC
12276 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012277#ifdef __cplusplus
12278extern "C"
12279#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012280char forkpty ();
12281int
12282main ()
12283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012285 ;
12286 return 0;
12287}
12288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012290 ac_cv_lib_bsd_forkpty=yes
12291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012296LIBS=$ac_check_lib_save_LIBS
12297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12299$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012302 LIBS="$LIBS -lbsd"
12303fi
12304
12305
12306fi
12307
Fred Drake8cef4cf2000-06-28 16:40:38 +000012308
12309fi
12310done
12311
Jack Jansendd19cf82001-12-06 22:36:17 +000012312
Christian Heimesb186d002008-03-18 15:15:01 +000012313# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012314for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012315do :
12316 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012317if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012320_ACEOF
12321
12322fi
12323done
12324
12325
Michael W. Hudson54241132001-12-07 15:38:26 +000012326# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012328do :
12329 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12330ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012331if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012333#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012334_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012335
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337done
12338
Michael W. Hudson54241132001-12-07 15:38:26 +000012339
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012340ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012342 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012343
Martin v. Löwis1142de32002-03-29 16:28:31 +000012344else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012346 *" dup2.$ac_objext "* ) ;;
12347 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012349esac
12350
Martin v. Löwis1142de32002-03-29 16:28:31 +000012351fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012352
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012353ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012354if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012355 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12356
12357else
12358 case " $LIBOBJS " in
12359 *" strdup.$ac_objext "* ) ;;
12360 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12361 ;;
12362esac
12363
12364fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012365
12366
12367for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012368do :
12369 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012370if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012375/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012376#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012377int
12378main ()
12379{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
12383}
12384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012388
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012391
Guido van Rossum627b2d71993-12-24 10:39:16 +000012392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012393done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012394
Jack Jansen150753c2003-03-29 22:07:47 +000012395for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012396do :
12397 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012398if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012403/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012404#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012405int
12406main ()
12407{
12408setpgrp(0,0);
12409 ;
12410 return 0;
12411}
12412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012416
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012419
12420fi
12421done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012422
Thomas Wouters3a584202000-08-05 23:28:51 +000012423for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012424do :
12425 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012426if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ;
12438 return 0;
12439}
12440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441if ac_fn_c_try_compile "$LINENO"; then :
12442
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443else
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012446
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012452done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453
Michael W. Hudson54241132001-12-07 15:38:26 +000012454
Victor Stinnere0be4232011-10-25 13:06:09 +020012455for ac_func in clock_gettime
12456do :
12457 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12458if test "x$ac_cv_func_clock_gettime" = xyes; then :
12459 cat >>confdefs.h <<_ACEOF
12460#define HAVE_CLOCK_GETTIME 1
12461_ACEOF
12462
12463else
12464
12465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12466$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12467if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12468 $as_echo_n "(cached) " >&6
12469else
12470 ac_check_lib_save_LIBS=$LIBS
12471LIBS="-lrt $LIBS"
12472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12473/* end confdefs.h. */
12474
12475/* Override any GCC internal prototype to avoid an error.
12476 Use char because int might match the return type of a GCC
12477 builtin and then its argument prototype would still apply. */
12478#ifdef __cplusplus
12479extern "C"
12480#endif
12481char clock_gettime ();
12482int
12483main ()
12484{
12485return clock_gettime ();
12486 ;
12487 return 0;
12488}
12489_ACEOF
12490if ac_fn_c_try_link "$LINENO"; then :
12491 ac_cv_lib_rt_clock_gettime=yes
12492else
12493 ac_cv_lib_rt_clock_gettime=no
12494fi
12495rm -f core conftest.err conftest.$ac_objext \
12496 conftest$ac_exeext conftest.$ac_ext
12497LIBS=$ac_check_lib_save_LIBS
12498fi
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12500$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12501if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12502
Victor Stinner7efb8332014-08-29 15:41:08 +020012503 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012504 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12505
12506
12507$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12508
12509
12510fi
12511
12512
12513fi
12514done
12515
12516
12517for ac_func in clock_getres
12518do :
12519 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12520if test "x$ac_cv_func_clock_getres" = xyes; then :
12521 cat >>confdefs.h <<_ACEOF
12522#define HAVE_CLOCK_GETRES 1
12523_ACEOF
12524
12525else
12526
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12528$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12529if ${ac_cv_lib_rt_clock_getres+:} false; then :
12530 $as_echo_n "(cached) " >&6
12531else
12532 ac_check_lib_save_LIBS=$LIBS
12533LIBS="-lrt $LIBS"
12534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535/* end confdefs.h. */
12536
12537/* Override any GCC internal prototype to avoid an error.
12538 Use char because int might match the return type of a GCC
12539 builtin and then its argument prototype would still apply. */
12540#ifdef __cplusplus
12541extern "C"
12542#endif
12543char clock_getres ();
12544int
12545main ()
12546{
12547return clock_getres ();
12548 ;
12549 return 0;
12550}
12551_ACEOF
12552if ac_fn_c_try_link "$LINENO"; then :
12553 ac_cv_lib_rt_clock_getres=yes
12554else
12555 ac_cv_lib_rt_clock_getres=no
12556fi
12557rm -f core conftest.err conftest.$ac_objext \
12558 conftest$ac_exeext conftest.$ac_ext
12559LIBS=$ac_check_lib_save_LIBS
12560fi
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12562$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12563if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12564
12565 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12566
12567
12568fi
12569
12570
12571fi
12572done
12573
12574
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012575for ac_func in clock_settime
12576do :
12577 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12578if test "x$ac_cv_func_clock_settime" = xyes; then :
12579 cat >>confdefs.h <<_ACEOF
12580#define HAVE_CLOCK_SETTIME 1
12581_ACEOF
12582
12583else
12584
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12586$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12587if ${ac_cv_lib_rt_clock_settime+:} false; then :
12588 $as_echo_n "(cached) " >&6
12589else
12590 ac_check_lib_save_LIBS=$LIBS
12591LIBS="-lrt $LIBS"
12592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593/* end confdefs.h. */
12594
12595/* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
12598#ifdef __cplusplus
12599extern "C"
12600#endif
12601char clock_settime ();
12602int
12603main ()
12604{
12605return clock_settime ();
12606 ;
12607 return 0;
12608}
12609_ACEOF
12610if ac_fn_c_try_link "$LINENO"; then :
12611 ac_cv_lib_rt_clock_settime=yes
12612else
12613 ac_cv_lib_rt_clock_settime=no
12614fi
12615rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
12617LIBS=$ac_check_lib_save_LIBS
12618fi
12619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12620$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12621if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12622
12623 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12624
12625
12626fi
12627
12628
12629fi
12630done
12631
12632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12634$as_echo_n "checking for major... " >&6; }
12635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012637
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012638#if defined(MAJOR_IN_MKDEV)
12639#include <sys/mkdev.h>
12640#elif defined(MAJOR_IN_SYSMACROS)
12641#include <sys/sysmacros.h>
12642#else
12643#include <sys/types.h>
12644#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012645
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012646int
12647main ()
12648{
12649
12650 makedev(major(0),minor(0));
12651
12652 ;
12653 return 0;
12654}
12655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012657
12658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12662$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012663
12664else
Skip Montanaro6dead952003-09-25 14:50:04 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012668
12669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670rm -f core conftest.err conftest.$ac_objext \
12671 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012672
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012673# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12674# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12676$as_echo_n "checking for if_nameindex... " >&6; }
12677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678/* end confdefs.h. */
12679
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012680#include <stdio.h>
12681#ifdef STDC_HEADERS
12682# include <stdlib.h>
12683# include <stddef.h>
12684#else
12685# ifdef HAVE_STDLIB_H
12686# include <stdlib.h>
12687# endif
12688#endif
12689#ifdef HAVE_SYS_SOCKET_H
12690# include <sys/socket.h>
12691#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012692#ifdef HAVE_NET_IF_H
12693# include <net/if.h>
12694#endif
12695
12696int
12697main ()
12698{
12699struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12700 ;
12701 return 0;
12702}
12703_ACEOF
12704if ac_fn_c_try_link "$LINENO"; then :
12705
12706$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12707
12708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12709$as_echo "yes" >&6; }
12710else
12711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12712$as_echo "no" >&6; }
12713
12714fi
12715rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012718# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12719# macro is not defined in android-ndk-r13.
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12721$as_echo_n "checking for lockf... " >&6; }
12722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723/* end confdefs.h. */
12724#include <unistd.h>
12725int
12726main ()
12727{
12728lockf(0, F_LOCK, 0);
12729 ;
12730 return 0;
12731}
12732_ACEOF
12733if ac_fn_c_try_link "$LINENO"; then :
12734
12735$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12736
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12738$as_echo "yes" >&6; }
12739else
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12741$as_echo "no" >&6; }
12742
12743fi
12744rm -f core conftest.err conftest.$ac_objext \
12745 conftest$ac_exeext conftest.$ac_ext
12746
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012747# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012748# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12750$as_echo_n "checking for getaddrinfo... " >&6; }
12751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012752/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012753
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012754#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012755#include <sys/socket.h>
12756#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012757#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012758
Martin v. Löwis11437992002-04-12 09:54:03 +000012759int
12760main ()
12761{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012762getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ;
12764 return 0;
12765}
12766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012767if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012768 have_getaddrinfo=yes
12769else
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012772rm -f core conftest.err conftest.$ac_objext \
12773 conftest$ac_exeext conftest.$ac_ext
12774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12775$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012776if test $have_getaddrinfo = yes
12777then
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12779$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012780 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012784
12785if test "${enable_ipv6+set}" = set; then
12786 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12787else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012788 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012789fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012792/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793
Stefan Krah19c21392012-11-22 23:47:32 +010012794#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012795#include <sys/types.h>
12796#include <netdb.h>
12797#include <string.h>
12798#include <sys/socket.h>
12799#include <netinet/in.h>
12800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012801int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802{
12803 int passive, gaierr, inet4 = 0, inet6 = 0;
12804 struct addrinfo hints, *ai, *aitop;
12805 char straddr[INET6_ADDRSTRLEN], strport[16];
12806
12807 for (passive = 0; passive <= 1; passive++) {
12808 memset(&hints, 0, sizeof(hints));
12809 hints.ai_family = AF_UNSPEC;
12810 hints.ai_flags = passive ? AI_PASSIVE : 0;
12811 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012812 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12814 (void)gai_strerror(gaierr);
12815 goto bad;
12816 }
12817 for (ai = aitop; ai; ai = ai->ai_next) {
12818 if (ai->ai_addr == NULL ||
12819 ai->ai_addrlen == 0 ||
12820 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12821 straddr, sizeof(straddr), strport, sizeof(strport),
12822 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12823 goto bad;
12824 }
12825 switch (ai->ai_family) {
12826 case AF_INET:
12827 if (strcmp(strport, "54321") != 0) {
12828 goto bad;
12829 }
12830 if (passive) {
12831 if (strcmp(straddr, "0.0.0.0") != 0) {
12832 goto bad;
12833 }
12834 } else {
12835 if (strcmp(straddr, "127.0.0.1") != 0) {
12836 goto bad;
12837 }
12838 }
12839 inet4++;
12840 break;
12841 case AF_INET6:
12842 if (strcmp(strport, "54321") != 0) {
12843 goto bad;
12844 }
12845 if (passive) {
12846 if (strcmp(straddr, "::") != 0) {
12847 goto bad;
12848 }
12849 } else {
12850 if (strcmp(straddr, "::1") != 0) {
12851 goto bad;
12852 }
12853 }
12854 inet6++;
12855 break;
12856 case AF_UNSPEC:
12857 goto bad;
12858 break;
12859 default:
12860 /* another family support? */
12861 break;
12862 }
12863 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012864 freeaddrinfo(aitop);
12865 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012866 }
12867
12868 if (!(inet4 == 0 || inet4 == 2))
12869 goto bad;
12870 if (!(inet6 == 0 || inet6 == 2))
12871 goto bad;
12872
12873 if (aitop)
12874 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012875 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012876
12877 bad:
12878 if (aitop)
12879 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012880 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881}
12882
Martin v. Löwis11437992002-04-12 09:54:03 +000012883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012885 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012886else
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012893fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012894
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12898$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12899
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012900if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012901then
12902 if test $ipv6 = yes
12903 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904 echo 'Fatal: You must get working getaddrinfo() function.'
12905 echo ' or you can specify "--disable-ipv6"'.
12906 exit 1
12907 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012911
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012913
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012914for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012915do :
12916 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012917if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012919#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012920_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012921
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922fi
12923done
12924
Michael W. Hudson54241132001-12-07 15:38:26 +000012925
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12928$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012929if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934#include <sys/types.h>
12935#include <sys/time.h>
12936#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Martin v. Löwis11437992002-04-12 09:54:03 +000012938int
12939main ()
12940{
12941if ((struct tm *) 0)
12942return 0;
12943 ;
12944 return 0;
12945}
12946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12955$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012956if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959
12960fi
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12963$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012964if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012968/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969#include <sys/types.h>
12970#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972int
12973main ()
12974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975struct tm tm;
12976 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ;
12979 return 0;
12980}
12981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983 ac_cv_struct_tm=time.h
12984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12990$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012991if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994
12995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997ac_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 +000012998#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Matthias Kloseb9621712010-04-24 17:59:49 +000013000"
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
13003cat >>confdefs.h <<_ACEOF
13004#define HAVE_STRUCT_TM_TM_ZONE 1
13005_ACEOF
13006
13007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013008fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013009
Martin v. Löwis11437992002-04-12 09:54:03 +000013010if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013
13014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13016"
Victor Stinnere0be4232011-10-25 13:06:09 +020013017if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019else
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021fi
13022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013024#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025_ACEOF
13026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13028$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013033/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013034#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035#if !HAVE_DECL_TZNAME
13036extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
Martin v. Löwis11437992002-04-12 09:54:03 +000013039int
13040main ()
13041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048 ac_cv_var_tzname=yes
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013052rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13056$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013057 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061 fi
13062fi
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064ac_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 +020013065if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
13067cat >>confdefs.h <<_ACEOF
13068#define HAVE_STRUCT_STAT_ST_RDEV 1
13069_ACEOF
13070
13071
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074ac_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 +020013075if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077cat >>confdefs.h <<_ACEOF
13078#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13079_ACEOF
13080
13081
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013082fi
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084ac_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 +020013085if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013086
13087cat >>confdefs.h <<_ACEOF
13088#define HAVE_STRUCT_STAT_ST_FLAGS 1
13089_ACEOF
13090
13091
13092fi
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094ac_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 +020013095if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013096
13097cat >>confdefs.h <<_ACEOF
13098#define HAVE_STRUCT_STAT_ST_GEN 1
13099_ACEOF
13100
13101
13102fi
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104ac_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 +020013105if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013106
13107cat >>confdefs.h <<_ACEOF
13108#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13109_ACEOF
13110
13111
13112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114ac_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 +020013115if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013116
Martin v. Löwis11437992002-04-12 09:54:03 +000013117cat >>confdefs.h <<_ACEOF
13118#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13119_ACEOF
13120
13121
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013122fi
13123
Stefan Krah267b6392016-04-26 01:09:18 +020013124ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13125 #include <sys/types.h>
13126 #include <pwd.h>
13127
13128"
13129if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13130
13131cat >>confdefs.h <<_ACEOF
13132#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13133_ACEOF
13134
13135
13136fi
13137ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13138 #include <sys/types.h>
13139 #include <pwd.h>
13140
13141"
13142if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13143
13144cat >>confdefs.h <<_ACEOF
13145#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13146_ACEOF
13147
13148
13149fi
13150
Zachary Ware6a6967e2016-10-01 00:47:27 -050013151# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13152ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13153"
13154if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13155
13156cat >>confdefs.h <<_ACEOF
13157#define HAVE_SIGINFO_T_SI_BAND 1
13158_ACEOF
13159
13160
13161fi
13162
Michael W. Hudson54241132001-12-07 15:38:26 +000013163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13165$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013166if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013168else
Matthias Kloseb159a552010-04-25 21:00:44 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013171/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013172#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013182 ac_cv_header_time_altzone=yes
13183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188fi
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13191$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195
13196fi
13197
Guido van Rossumda88dad1995-01-26 00:46:29 +000013198was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13200$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013202/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203
13204#include <sys/types.h>
13205#include <sys/select.h>
13206#include <sys/time.h>
13207
Martin v. Löwis11437992002-04-12 09:54:03 +000013208int
13209main ()
13210{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013211;
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ;
13213 return 0;
13214}
13215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
13218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013220
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013221 was_it_defined=yes
13222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13226$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13229$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013230if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013234/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013235#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 ;
13241 return 0;
13242}
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245 ac_cv_struct_addrinfo=yes
13246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13250fi
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13253$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257
13258fi
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13261$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013262if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267
13268# include <sys/types.h>
13269# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013270int
13271main ()
13272{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ;
13275 return 0;
13276}
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279 ac_cv_struct_sockaddr_storage=yes
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13287$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013288if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291
13292fi
13293
Christian Heimesdffa3942016-09-05 23:54:41 +020013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13295$as_echo_n "checking for sockaddr_alg... " >&6; }
13296if ${ac_cv_struct_sockaddr_alg+:} false; then :
13297 $as_echo_n "(cached) " >&6
13298else
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
13301
13302# include <sys/types.h>
13303# include <sys/socket.h>
13304# include <linux/if_alg.h>
13305int
13306main ()
13307{
13308struct sockaddr_alg s
13309 ;
13310 return 0;
13311}
13312_ACEOF
13313if ac_fn_c_try_compile "$LINENO"; then :
13314 ac_cv_struct_sockaddr_alg=yes
13315else
13316 ac_cv_struct_sockaddr_alg=no
13317fi
13318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13319fi
13320
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13322$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13323if test $ac_cv_struct_sockaddr_alg = yes; then
13324
13325$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13326
13327fi
13328
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13332$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013333if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013338$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013339int
13340main ()
13341{
13342static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013343test_array [0] = 0;
13344return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
13346 ;
13347 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013348}
Martin v. Löwis11437992002-04-12 09:54:03 +000013349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013351 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13358$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013361
13362fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13365$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013366if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013377 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013379 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381 char const *const *pcpcc;
13382 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 /* NEC SVR4.0.2 mips cc rejects this. */
13384 struct point {int x, y;};
13385 static struct point const zero = {0,0};
13386 /* AIX XL C 1.02.0.0 rejects this.
13387 It does not let you subtract one const X* pointer from another in
13388 an arm of an if-expression whose if-part is not a constant
13389 expression */
13390 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393 ++pcpcc;
13394 ppc = (char**) pcpcc;
13395 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013396 { /* SCO 3.2v4 cc rejects this sort of thing. */
13397 char tx;
13398 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 }
13404 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13405 int x[] = {25, 17};
13406 const int *foo = &x[0];
13407 ++foo;
13408 }
13409 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13410 typedef const int *iptr;
13411 iptr p = 0;
13412 ++p;
13413 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013414 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013416 struct s { int j; const int *ap[3]; } bx;
13417 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 }
13419 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13420 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013424#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 ;
13427 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428}
Martin v. Löwis11437992002-04-12 09:54:03 +000013429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013430if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431 ac_cv_c_const=yes
13432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13438$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013439if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442
13443fi
13444
Michael W. Hudson54241132001-12-07 15:38:26 +000013445
Guido van Rossumda88dad1995-01-26 00:46:29 +000013446works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13448$as_echo_n "checking for working volatile... " >&6; }
13449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013450/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452int
13453main ()
13454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 ;
13457 return 0;
13458}
13459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013460if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013461 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462else
Skip Montanaro6dead952003-09-25 14:50:04 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013466
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13470$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013471
Guido van Rossumda88dad1995-01-26 00:46:29 +000013472works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13474$as_echo_n "checking for working signed char... " >&6; }
13475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013476/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478int
13479main ()
13480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 ;
13483 return 0;
13484}
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013487 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013488else
Skip Montanaro6dead952003-09-25 14:50:04 +000013489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013492
Guido van Rossum7f43da71994-08-01 12:15:30 +000013493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13496$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013497
Guido van Rossumda88dad1995-01-26 00:46:29 +000013498have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13500$as_echo_n "checking for prototypes... " >&6; }
13501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013502/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013503int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013504int
13505main ()
13506{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013507return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb159a552010-04-25 21:00:44 +000013516 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13520$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521
Guido van Rossumda88dad1995-01-26 00:46:29 +000013522works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13524$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013526/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013527
13528#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013529int foo(int x, ...) {
13530 va_list va;
13531 va_start(va, x);
13532 va_arg(va, int);
13533 va_arg(va, char *);
13534 va_arg(va, double);
13535 return 0;
13536}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Guido van Rossum90eea071996-08-30 20:58:57 +000013541return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 ;
13543 return 0;
13544}
13545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013551 works=yes
13552
Guido van Rossum627b2d71993-12-24 10:39:16 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13556$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557
Martin v. Löwisd6320502004-08-12 13:45:08 +000013558# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13560$as_echo_n "checking for socketpair... " >&6; }
13561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013562/* end confdefs.h. */
13563
13564#include <sys/types.h>
13565#include <sys/socket.h>
13566
13567int
13568main ()
13569{
13570void *x=socketpair
13571 ;
13572 return 0;
13573}
13574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013578
Matthias Kloseb159a552010-04-25 21:00:44 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13583$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013584
13585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013587
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13590$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013592/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593#include <sys/types.h>
13594#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013595int
13596main ()
13597{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013598struct sockaddr x;
13599x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
13605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13606$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609
13610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13612$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013613
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013617# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013621if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13626$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627 OLD_CFLAGS=$CFLAGS
13628 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013631
13632# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013637
13638 char *name;
13639 struct hostent *he, *res;
13640 char buffer[2048];
13641 int buflen = 2048;
13642 int h_errnop;
13643
13644 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
13646 ;
13647 return 0;
13648}
13649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13658$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013660else
Skip Montanaro6dead952003-09-25 14:50:04 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13665$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013668
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013669# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671int
13672main ()
13673{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674
13675 char *name;
13676 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013677 char buffer[2048];
13678 int buflen = 2048;
13679 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013680
Matthias Kloseb159a552010-04-25 21:00:44 +000013681 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
13683 ;
13684 return 0;
13685}
13686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013690
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Matthias Kloseb159a552010-04-25 21:00:44 +000013692$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13695$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013697else
Skip Montanaro6dead952003-09-25 14:50:04 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13700$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13702$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13704/* end confdefs.h. */
13705
13706# include <netdb.h>
13707
13708int
13709main ()
13710{
13711
13712 char *name;
13713 struct hostent *he;
13714 struct hostent_data data;
13715
13716 (void) gethostbyname_r(name, he, &data);
13717
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722if ac_fn_c_try_compile "$LINENO"; then :
13723
13724 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13725
13726
13727$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13728
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13730$as_echo "yes" >&6; }
13731
13732else
13733
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013745 CFLAGS=$OLD_CFLAGS
13746
13747else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 for ac_func in gethostbyname
13750do :
13751 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013752if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013754#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013755_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013757fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013758done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759
Michael W. Hudson54241132001-12-07 15:38:26 +000013760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761fi
13762
Michael W. Hudson54241132001-12-07 15:38:26 +000013763
13764
13765
13766
13767
13768
Guido van Rossum627b2d71993-12-24 10:39:16 +000013769# checks for system services
13770# (none yet)
13771
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013773ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13778$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781else
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013783LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787/* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013790#ifdef __cplusplus
13791extern "C"
13792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013793char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013794int
13795main ()
13796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013807rm -f core conftest.err conftest.$ac_objext \
13808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13812$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013813if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 cat >>confdefs.h <<_ACEOF
13815#define HAVE_LIBIEEE 1
13816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013818 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819
Guido van Rossum627b2d71993-12-24 10:39:16 +000013820fi
13821
Michael W. Hudson54241132001-12-07 15:38:26 +000013822
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013823fi
13824
Michael W. Hudson54241132001-12-07 15:38:26 +000013825
Guido van Rossum7f253911997-05-09 02:42:48 +000013826# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13828$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013831if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013833if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013834then
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13839$as_echo "yes" >&6; }
13840else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13841$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013842fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13845$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846fi
13847
Guido van Rossum7f253911997-05-09 02:42:48 +000013848
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849# check for --with-libm=...
13850
Guido van Rossum563e7081996-09-10 18:20:48 +000013851case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013852Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013853*) LIBM=-lm
13854esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13856$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013859if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013861if test "$withval" = no
13862then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13864$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013865elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013866then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13868$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013869else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013870fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13873$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874fi
13875
Guido van Rossum7f43da71994-08-01 12:15:30 +000013876
13877# check for --with-libc=...
13878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13880$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013883if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013885if test "$withval" = no
13886then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13888$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013889elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013890then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13892$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013893else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013894fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13897$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898fi
13899
Guido van Rossum7f43da71994-08-01 12:15:30 +000013900
Stefan Krah1919b7e2012-03-21 18:25:23 +010013901# **************************************
13902# * Check for gcc x64 inline assembler *
13903# **************************************
13904
13905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13906$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13908/* end confdefs.h. */
13909
13910int
13911main ()
13912{
13913
13914 __asm__ __volatile__ ("movq %rcx, %rax");
13915
13916 ;
13917 return 0;
13918}
13919_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013920if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013921 have_gcc_asm_for_x64=yes
13922else
13923 have_gcc_asm_for_x64=no
13924fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013925rm -f core conftest.err conftest.$ac_objext \
13926 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13928$as_echo "$have_gcc_asm_for_x64" >&6; }
13929if test "$have_gcc_asm_for_x64" = yes
13930then
13931
13932$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13933
13934fi
13935
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013936# **************************************************
13937# * Check for various properties of floating point *
13938# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13941$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013942if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013944else
13945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947 ac_cv_little_endian_double=no
13948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950/* end confdefs.h. */
13951
13952#include <string.h>
13953int main() {
13954 double x = 9006104071832581.0;
13955 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13956 return 0;
13957 else
13958 return 1;
13959}
13960
13961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013963 ac_cv_little_endian_double=yes
13964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969fi
13970
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971fi
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13974$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975if test "$ac_cv_little_endian_double" = yes
13976then
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979
13980fi
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13983$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013986else
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013989 ac_cv_big_endian_double=no
13990else
Matthias Kloseb9621712010-04-24 17:59:49 +000013991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992/* end confdefs.h. */
13993
13994#include <string.h>
13995int main() {
13996 double x = 9006104071832581.0;
13997 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13998 return 0;
13999 else
14000 return 1;
14001}
14002
14003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014004if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014005 ac_cv_big_endian_double=yes
14006else
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011fi
14012
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014013fi
14014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14016$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017if test "$ac_cv_big_endian_double" = yes
14018then
14019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021
14022fi
14023
14024# Some ARM platforms use a mixed-endian representation for doubles.
14025# While Python doesn't currently have full support for these platforms
14026# (see e.g., issue 1762561), we can at least make sure that float <-> string
14027# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14029$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014030if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032else
14033
Matthias Kloseb9621712010-04-24 17:59:49 +000014034if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014035 ac_cv_mixed_endian_double=no
14036else
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014038/* end confdefs.h. */
14039
14040#include <string.h>
14041int main() {
14042 double x = 9006104071832581.0;
14043 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14044 return 0;
14045 else
14046 return 1;
14047}
14048
14049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014050if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051 ac_cv_mixed_endian_double=yes
14052else
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057fi
14058
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059fi
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14062$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014063if test "$ac_cv_mixed_endian_double" = yes
14064then
14065
Matthias Kloseb9621712010-04-24 17:59:49 +000014066$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014067
14068fi
14069
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014070# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014071# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014072# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014073# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014074# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014075# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014076
14077# This inline assembler syntax may also work for suncc and icc,
14078# so we try it on all platforms.
14079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14081$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014083/* end confdefs.h. */
14084
14085int
14086main ()
14087{
14088
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014089 unsigned short cw;
14090 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14091 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014092
14093 ;
14094 return 0;
14095}
14096_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014097if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014098 have_gcc_asm_for_x87=yes
14099else
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014102rm -f core conftest.err conftest.$ac_objext \
14103 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14105$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014106if test "$have_gcc_asm_for_x87" = yes
14107then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014110
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14114$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14116/* end confdefs.h. */
14117
14118int
14119main ()
14120{
14121
14122 unsigned int fpcr;
14123 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14124 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14125
14126 ;
14127 return 0;
14128}
14129_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014130if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014131 have_gcc_asm_for_mc68881=yes
14132else
14133 have_gcc_asm_for_mc68881=no
14134fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014135rm -f core conftest.err conftest.$ac_objext \
14136 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14138$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14139if test "$have_gcc_asm_for_mc68881" = yes
14140then
14141
14142$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14143
14144fi
14145
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014146# Detect whether system arithmetic is subject to x87-style double
14147# rounding issues. The result of this test has little meaning on non
14148# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14149# mode is round-to-nearest and double rounding issues are present, and
14150# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14152$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014153# $BASECFLAGS may affect the result
14154ac_save_cc="$CC"
14155CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157 ac_cv_x87_double_rounding=no
14158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160/* end confdefs.h. */
14161
14162#include <stdlib.h>
14163#include <math.h>
14164int main() {
14165 volatile double x, y, z;
14166 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14167 x = 0.99999999999999989; /* 1-2**-53 */
14168 y = 1./x;
14169 if (y != 1.)
14170 exit(0);
14171 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14172 x = 1e16;
14173 y = 2.99999;
14174 z = x + y;
14175 if (z != 1e16+4.)
14176 exit(0);
14177 /* both tests show evidence of double rounding */
14178 exit(1);
14179}
14180
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014183 ac_cv_x87_double_rounding=no
14184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189fi
14190
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014191CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14193$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014194if test "$ac_cv_x87_double_rounding" = yes
14195then
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014198
14199fi
14200
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014201# ************************************
14202# * Check for mathematical functions *
14203# ************************************
14204
14205LIBS_SAVE=$LIBS
14206LIBS="$LIBS $LIBM"
14207
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014208for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14209do :
14210 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14211ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014212if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014213 cat >>confdefs.h <<_ACEOF
14214#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14215_ACEOF
14216
14217fi
14218done
14219
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014220for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014221do :
14222 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14223ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014224if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014225 cat >>confdefs.h <<_ACEOF
14226#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14227_ACEOF
14228
14229fi
14230done
14231
14232ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14233"
Victor Stinnere0be4232011-10-25 13:06:09 +020014234if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014235 ac_have_decl=1
14236else
14237 ac_have_decl=0
14238fi
14239
14240cat >>confdefs.h <<_ACEOF
14241#define HAVE_DECL_ISINF $ac_have_decl
14242_ACEOF
14243ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14244"
Victor Stinnere0be4232011-10-25 13:06:09 +020014245if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014246 ac_have_decl=1
14247else
14248 ac_have_decl=0
14249fi
14250
14251cat >>confdefs.h <<_ACEOF
14252#define HAVE_DECL_ISNAN $ac_have_decl
14253_ACEOF
14254ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14255"
Victor Stinnere0be4232011-10-25 13:06:09 +020014256if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014257 ac_have_decl=1
14258else
14259 ac_have_decl=0
14260fi
14261
14262cat >>confdefs.h <<_ACEOF
14263#define HAVE_DECL_ISFINITE $ac_have_decl
14264_ACEOF
14265
14266
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014267# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14268# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14270$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014271if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014273else
14274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014276 ac_cv_tanh_preserves_zero_sign=no
14277else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014279/* end confdefs.h. */
14280
14281#include <math.h>
14282#include <stdlib.h>
14283int main() {
14284 /* return 0 if either negative zeros don't exist
14285 on this platform or if negative zeros exist
14286 and tanh(-0.) == -0. */
14287 if (atan2(0., -1.) == atan2(-0., -1.) ||
14288 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14289 else exit(1);
14290}
14291
14292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014293if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014294 ac_cv_tanh_preserves_zero_sign=yes
14295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014300fi
14301
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014302fi
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14305$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014306if test "$ac_cv_tanh_preserves_zero_sign" = yes
14307then
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014310
14311fi
14312
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014313if test "$ac_cv_func_log1p" = yes
14314then
14315 # On some versions of AIX, log1p(-0.) returns 0. instead of
14316 # -0. See issue #9920.
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14318$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014319 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014320 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014321else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014322
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014323 if test "$cross_compiling" = yes; then :
14324 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014325else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14327/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014328
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014329 #include <math.h>
14330 #include <stdlib.h>
14331 int main() {
14332 /* Fail if the signs of log1p(-0.) and -0. can be
14333 distinguished. */
14334 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14335 return 0;
14336 else
14337 return 1;
14338 }
14339
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014340_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014341if ac_fn_c_try_run "$LINENO"; then :
14342 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014343else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014344 ac_cv_log1p_drops_zero_sign=yes
14345fi
14346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014348fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014349
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014350fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014351
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14353$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14354fi
14355if test "$ac_cv_log1p_drops_zero_sign" = yes
14356then
14357
14358$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14359
14360fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014362LIBS=$LIBS_SAVE
14363
Mark Dickinsona614f042009-11-28 12:48:43 +000014364# For multiprocessing module, check that sem_open
14365# actually works. For FreeBSD versions <= 7.2,
14366# the kernel module that provides POSIX semaphores
14367# isn't loaded by default, so an attempt to call
14368# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14370$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014371if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014375 ac_cv_posix_semaphores_enabled=yes
14376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014378/* end confdefs.h. */
14379
14380#include <unistd.h>
14381#include <fcntl.h>
14382#include <stdio.h>
14383#include <semaphore.h>
14384#include <sys/stat.h>
14385
14386int main(void) {
14387 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14388 if (a == SEM_FAILED) {
14389 perror("sem_open");
14390 return 1;
14391 }
14392 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014393 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014394 return 0;
14395}
14396
14397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014399 ac_cv_posix_semaphores_enabled=yes
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014405fi
14406
14407
Mark Dickinsona614f042009-11-28 12:48:43 +000014408fi
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14411$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014412if test $ac_cv_posix_semaphores_enabled = no
14413then
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014416
14417fi
14418
Mark Dickinson10683072009-04-18 21:18:19 +000014419# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14421$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014422if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014427else
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014429/* end confdefs.h. */
14430
14431#include <unistd.h>
14432#include <fcntl.h>
14433#include <stdio.h>
14434#include <semaphore.h>
14435#include <sys/stat.h>
14436
14437int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014438 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014439 int count;
14440 int res;
14441 if(a==SEM_FAILED){
14442 perror("sem_open");
14443 return 1;
14444
14445 }
14446 res = sem_getvalue(a, &count);
14447 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014448 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014449 return res==-1 ? 1 : 0;
14450}
14451
Mark Dickinson10683072009-04-18 21:18:19 +000014452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014454 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014460fi
14461
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014462
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014463fi
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14466$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014467if test $ac_cv_broken_sem_getvalue = yes
14468then
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014471
14472fi
14473
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014474ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14475"
14476if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14477 ac_have_decl=1
14478else
14479 ac_have_decl=0
14480fi
14481
14482cat >>confdefs.h <<_ACEOF
14483#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14484_ACEOF
14485ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14486"
14487if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14488 ac_have_decl=1
14489else
14490 ac_have_decl=0
14491fi
14492
14493cat >>confdefs.h <<_ACEOF
14494#define HAVE_DECL_RTLD_NOW $ac_have_decl
14495_ACEOF
14496ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14497"
14498if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14499 ac_have_decl=1
14500else
14501 ac_have_decl=0
14502fi
14503
14504cat >>confdefs.h <<_ACEOF
14505#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14506_ACEOF
14507ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14508"
14509if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14510 ac_have_decl=1
14511else
14512 ac_have_decl=0
14513fi
14514
14515cat >>confdefs.h <<_ACEOF
14516#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14517_ACEOF
14518ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14519"
14520if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14521 ac_have_decl=1
14522else
14523 ac_have_decl=0
14524fi
14525
14526cat >>confdefs.h <<_ACEOF
14527#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14528_ACEOF
14529ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14530"
14531if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14532 ac_have_decl=1
14533else
14534 ac_have_decl=0
14535fi
14536
14537cat >>confdefs.h <<_ACEOF
14538#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14539_ACEOF
14540ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14541"
14542if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14543 ac_have_decl=1
14544else
14545 ac_have_decl=0
14546fi
14547
14548cat >>confdefs.h <<_ACEOF
14549#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14550_ACEOF
14551
14552
Mark Dickinsonbd792642009-03-18 20:06:12 +000014553# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14555$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014556# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014557if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014558 enableval=$enable_big_digits; case $enable_big_digits in
14559yes)
14560 enable_big_digits=30 ;;
14561no)
14562 enable_big_digits=15 ;;
1456315|30)
14564 ;;
14565*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014566 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 +000014567esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14569$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014570
14571cat >>confdefs.h <<_ACEOF
14572#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14573_ACEOF
14574
14575
14576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14578$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014579fi
14580
14581
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014583ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014584if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014589 wchar_h="yes"
14590
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591else
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593
14594fi
14595
Michael W. Hudson54241132001-12-07 15:38:26 +000014596
Martin v. Löwis11437992002-04-12 09:54:03 +000014597
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014598# determine wchar_t size
14599if test "$wchar_h" = yes
14600then
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14604# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14606$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014607if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14611"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613else
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 if test "$ac_cv_type_wchar_t" = yes; then
14615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014617as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014618See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619 else
14620 ac_cv_sizeof_wchar_t=0
14621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14626$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627
14628
14629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014631#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014632_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014633
Michael W. Hudson54241132001-12-07 15:38:26 +000014634
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014635fi
14636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14638$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014639have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014642
14643#include <tcl.h>
14644#if TCL_UTF_MAX != 6
14645# error "NOT UCS4_TCL"
14646#endif
14647int
14648main ()
14649{
14650
14651 ;
14652 return 0;
14653}
14654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014656
14657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014659
14660 have_ucs4_tcl=yes
14661
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14665$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014666
Skip Montanaro6dead952003-09-25 14:50:04 +000014667# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014668if test "$wchar_h" = yes
14669then
14670 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14672$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014673 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014675else
14676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014678 ac_cv_wchar_t_signed=yes
14679else
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014681/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014682
14683 #include <wchar.h>
14684 int main()
14685 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014686 /* Success: exit code 0 */
14687 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014688 }
14689
14690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014691if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014692 ac_cv_wchar_t_signed=yes
14693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014698fi
14699
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014700fi
14701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14703$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704fi
14705
Georg Brandl52d168a2008-01-07 18:10:24 +000014706# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014707if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014708 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014709then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014710 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014711
Matthias Kloseb9621712010-04-24 17:59:49 +000014712$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
Georg Brandl52d168a2008-01-07 18:10:24 +000014714else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014715 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014716fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14718$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014719
14720# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14722$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014723if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 ac_cv_c_bigendian=unknown
14727 # See if we're dealing with a universal compiler.
14728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14729/* end confdefs.h. */
14730#ifndef __APPLE_CC__
14731 not a universal capable compiler
14732 #endif
14733 typedef int dummy;
14734
Skip Montanaro6dead952003-09-25 14:50:04 +000014735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014736if ac_fn_c_try_compile "$LINENO"; then :
14737
14738 # Check for potential -arch flags. It is not universal unless
14739 # there are at least two -arch flags with different values.
14740 ac_arch=
14741 ac_prev=
14742 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14743 if test -n "$ac_prev"; then
14744 case $ac_word in
14745 i?86 | x86_64 | ppc | ppc64)
14746 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14747 ac_arch=$ac_word
14748 else
14749 ac_cv_c_bigendian=universal
14750 break
14751 fi
14752 ;;
14753 esac
14754 ac_prev=
14755 elif test "x$ac_word" = "x-arch"; then
14756 ac_prev=arch
14757 fi
14758 done
14759fi
14760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14761 if test $ac_cv_c_bigendian = unknown; then
14762 # See if sys/param.h defines the BYTE_ORDER macro.
14763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014764/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014765#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014767
Martin v. Löwis11437992002-04-12 09:54:03 +000014768int
14769main ()
14770{
Matthias Kloseb9621712010-04-24 17:59:49 +000014771#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14772 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14773 && LITTLE_ENDIAN)
14774 bogus endian macros
14775 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
14777 ;
14778 return 0;
14779}
14780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014781if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014782 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014784/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014785#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788int
14789main ()
14790{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014791#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 not big endian
14793 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
14795 ;
14796 return 0;
14797}
14798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014800 ac_cv_c_bigendian=yes
14801else
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014805fi
14806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14807 fi
14808 if test $ac_cv_c_bigendian = unknown; then
14809 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014811/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014812#include <limits.h>
14813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814int
14815main ()
14816{
Matthias Kloseb9621712010-04-24 17:59:49 +000014817#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14818 bogus endian macros
14819 #endif
14820
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ;
14822 return 0;
14823}
14824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if ac_fn_c_try_compile "$LINENO"; then :
14826 # It does; now see whether it defined to _BIG_ENDIAN or not.
14827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14828/* end confdefs.h. */
14829#include <limits.h>
14830
14831int
14832main ()
14833{
14834#ifndef _BIG_ENDIAN
14835 not big endian
14836 #endif
14837
14838 ;
14839 return 0;
14840}
14841_ACEOF
14842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014844else
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14848fi
14849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14850 fi
14851 if test $ac_cv_c_bigendian = unknown; then
14852 # Compile a test program.
14853 if test "$cross_compiling" = yes; then :
14854 # Try to guess by grepping values from an object file.
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856/* end confdefs.h. */
14857short int ascii_mm[] =
14858 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14859 short int ascii_ii[] =
14860 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14861 int use_ascii (int i) {
14862 return ascii_mm[i] + ascii_ii[i];
14863 }
14864 short int ebcdic_ii[] =
14865 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14866 short int ebcdic_mm[] =
14867 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14868 int use_ebcdic (int i) {
14869 return ebcdic_mm[i] + ebcdic_ii[i];
14870 }
14871 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872
Matthias Kloseb9621712010-04-24 17:59:49 +000014873int
14874main ()
14875{
14876return use_ascii (foo) == use_ebcdic (foo);
14877 ;
14878 return 0;
14879}
14880_ACEOF
14881if ac_fn_c_try_compile "$LINENO"; then :
14882 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14883 ac_cv_c_bigendian=yes
14884 fi
14885 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14886 if test "$ac_cv_c_bigendian" = unknown; then
14887 ac_cv_c_bigendian=no
14888 else
14889 # finding both strings is unlikely to happen, but who knows?
14890 ac_cv_c_bigendian=unknown
14891 fi
14892 fi
14893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014899int
14900main ()
14901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 /* Are we little or big endian? From Harbison&Steele. */
14904 union
14905 {
14906 long int l;
14907 char c[sizeof (long int)];
14908 } u;
14909 u.l = 1;
14910 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911
14912 ;
14913 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014914}
Martin v. Löwis11437992002-04-12 09:54:03 +000014915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014916if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917 ac_cv_c_bigendian=no
14918else
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14928$as_echo "$ac_cv_c_bigendian" >&6; }
14929 case $ac_cv_c_bigendian in #(
14930 yes)
14931 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14932;; #(
14933 no)
14934 ;; #(
14935 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 ;; #(
14940 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014941 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014942 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014944
Michael W. Hudson54241132001-12-07 15:38:26 +000014945
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014946# ABI version string for Python extension modules. This appears between the
14947# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14948# from the following attributes which affect the ABI of this Python build (in
14949# this order):
14950#
14951# * The Python implementation (always 'cpython-' for us)
14952# * The major and minor version numbers
14953# * --with-pydebug (adds a 'd')
14954# * --with-pymalloc (adds a 'm')
14955# * --with-wide-unicode (adds a 'u')
14956#
14957# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014958# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14959# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014960
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14962$as_echo_n "checking ABIFLAGS... " >&6; }
14963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14964$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14966$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014967SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14969$as_echo "$SOABI" >&6; }
14970
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014971
14972case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014973 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014974 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14975 *)
14976 EXT_SUFFIX=${SHLIB_SUFFIX};;
14977esac
14978
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14980$as_echo_n "checking LDVERSION... " >&6; }
14981LDVERSION='$(VERSION)$(ABIFLAGS)'
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14983$as_echo "$LDVERSION" >&6; }
14984
doko@python.org87421192013-01-26 11:39:31 +010014985
doko@ubuntu.com55532312016-06-14 08:55:19 +020014986if test x$PLATFORM_TRIPLET = x; then
14987 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14988else
14989 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14990fi
doko@python.org87421192013-01-26 11:39:31 +010014991
14992
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014993# Check whether right shifting a negative integer extends the sign bit
14994# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14996$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014997if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014999else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000
Matthias Kloseb9621712010-04-24 17:59:49 +000015001if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015002 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015003else
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015005/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015006
15007int main()
15008{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015009 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015010}
15011
Martin v. Löwis11437992002-04-12 09:54:03 +000015012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015013if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015014 ac_cv_rshift_extends_sign=yes
15015else
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015020fi
15021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022fi
15023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15025$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015026if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015027then
Martin v. Löwis11437992002-04-12 09:54:03 +000015028
Matthias Kloseb9621712010-04-24 17:59:49 +000015029$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015030
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015031fi
15032
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015033# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15035$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015036if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015038else
Martin v. Löwis11437992002-04-12 09:54:03 +000015039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015041/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015042#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015043int
15044main ()
15045{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015046
15047 FILE *f = fopen("/dev/null", "r");
15048 flockfile(f);
15049 getc_unlocked(f);
15050 funlockfile(f);
15051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ;
15053 return 0;
15054}
15055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015056if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015057 ac_cv_have_getc_unlocked=yes
15058else
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 ac_cv_have_getc_unlocked=no
15060fi
15061rm -f core conftest.err conftest.$ac_objext \
15062 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15066$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015067if test "$ac_cv_have_getc_unlocked" = yes
15068then
Martin v. Löwis11437992002-04-12 09:54:03 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015071
15072fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015073
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015074# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015075# save the value of LIBS so we don't actually link Python with readline
15076LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015077
Gregory P. Smith18820942008-09-07 06:24:49 +000015078# On some systems we need to link readline to a termcap compatible
15079# library. NOTE: Keep the precedence of listed libraries synchronised
15080# with setup.py.
15081py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15083$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015084for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015085 if test -z "$py_libtermcap"; then
15086 READLINE_LIBS="-lreadline"
15087 else
15088 READLINE_LIBS="-lreadline -l$py_libtermcap"
15089 fi
15090 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092/* end confdefs.h. */
15093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094/* Override any GCC internal prototype to avoid an error.
15095 Use char because int might match the return type of a GCC
15096 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015097#ifdef __cplusplus
15098extern "C"
15099#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015100char readline ();
15101int
15102main ()
15103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015105 ;
15106 return 0;
15107}
15108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015109if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015110 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015112rm -f core conftest.err conftest.$ac_objext \
15113 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015114 if test $py_cv_lib_readline = yes; then
15115 break
15116 fi
15117done
15118# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15119#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015120if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15122$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15125$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015128
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015129fi
15130
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015131# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15133$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015134if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015136else
15137 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015138LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015140/* end confdefs.h. */
15141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142/* Override any GCC internal prototype to avoid an error.
15143 Use char because int might match the return type of a GCC
15144 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015145#ifdef __cplusplus
15146extern "C"
15147#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015148char rl_callback_handler_install ();
15149int
15150main ()
15151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015153 ;
15154 return 0;
15155}
15156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015157if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158 ac_cv_lib_readline_rl_callback_handler_install=yes
15159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015162rm -f core conftest.err conftest.$ac_objext \
15163 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164LIBS=$ac_check_lib_save_LIBS
15165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15167$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015168if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171
15172fi
15173
15174
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015175# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015177/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015178#include <readline/readline.h>
15179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015180if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015181 have_readline=yes
15182else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015183 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015184
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015185fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015186rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015187if test $have_readline = yes
15188then
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015190/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015191#include <readline/readline.h>
15192
15193_ACEOF
15194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015198
15199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015200rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015203/* end confdefs.h. */
15204#include <readline/readline.h>
15205
15206_ACEOF
15207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015211
15212fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015213rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015214
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015215fi
15216
Martin v. Löwis0daad592001-09-30 21:09:59 +000015217# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15219$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015220if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015222else
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015224LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228/* Override any GCC internal prototype to avoid an error.
15229 Use char because int might match the return type of a GCC
15230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015231#ifdef __cplusplus
15232extern "C"
15233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015234char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015235int
15236main ()
15237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 ;
15240 return 0;
15241}
15242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015245else
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248rm -f core conftest.err conftest.$ac_objext \
15249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015250LIBS=$ac_check_lib_save_LIBS
15251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15253$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015254if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015257
Martin v. Löwis0daad592001-09-30 21:09:59 +000015258fi
15259
Michael W. Hudson54241132001-12-07 15:38:26 +000015260
Thomas Wouters89d996e2007-09-08 17:39:28 +000015261# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15263$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015264if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015266else
15267 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015268LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015270/* end confdefs.h. */
15271
15272/* Override any GCC internal prototype to avoid an error.
15273 Use char because int might match the return type of a GCC
15274 builtin and then its argument prototype would still apply. */
15275#ifdef __cplusplus
15276extern "C"
15277#endif
15278char rl_completion_display_matches_hook ();
15279int
15280main ()
15281{
15282return rl_completion_display_matches_hook ();
15283 ;
15284 return 0;
15285}
15286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015287if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015288 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292rm -f core conftest.err conftest.$ac_objext \
15293 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015294LIBS=$ac_check_lib_save_LIBS
15295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15297$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015298if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015301
15302fi
15303
15304
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015305# also in 4.0, but not in editline
15306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15307$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15308if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15309 $as_echo_n "(cached) " >&6
15310else
15311 ac_check_lib_save_LIBS=$LIBS
15312LIBS="-lreadline $READLINE_LIBS $LIBS"
15313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15314/* end confdefs.h. */
15315
15316/* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
15319#ifdef __cplusplus
15320extern "C"
15321#endif
15322char rl_resize_terminal ();
15323int
15324main ()
15325{
15326return rl_resize_terminal ();
15327 ;
15328 return 0;
15329}
15330_ACEOF
15331if ac_fn_c_try_link "$LINENO"; then :
15332 ac_cv_lib_readline_rl_resize_terminal=yes
15333else
15334 ac_cv_lib_readline_rl_resize_terminal=no
15335fi
15336rm -f core conftest.err conftest.$ac_objext \
15337 conftest$ac_exeext conftest.$ac_ext
15338LIBS=$ac_check_lib_save_LIBS
15339fi
15340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15341$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15342if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15343
15344$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15345
15346fi
15347
15348
Martin v. Löwis0daad592001-09-30 21:09:59 +000015349# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15351$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015352if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015354else
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015356LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360/* Override any GCC internal prototype to avoid an error.
15361 Use char because int might match the return type of a GCC
15362 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015363#ifdef __cplusplus
15364extern "C"
15365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015366char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015367int
15368main ()
15369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ;
15372 return 0;
15373}
15374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015375if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015377else
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015380rm -f core conftest.err conftest.$ac_objext \
15381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015382LIBS=$ac_check_lib_save_LIBS
15383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15385$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015386if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015389
Guido van Rossum353ae582001-07-10 16:45:32 +000015390fi
15391
Jack Jansendd19cf82001-12-06 22:36:17 +000015392
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015393# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015395/* end confdefs.h. */
15396#include <readline/readline.h>
15397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015398if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015399 have_readline=yes
15400else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015401 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015402
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015403fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015404rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015405if test $have_readline = yes
15406then
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015408/* end confdefs.h. */
15409#include <readline/readline.h>
15410
15411_ACEOF
15412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015416
15417fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015418rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015419
15420fi
15421
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15423$as_echo_n "checking for append_history in -lreadline... " >&6; }
15424if ${ac_cv_lib_readline_append_history+:} false; then :
15425 $as_echo_n "(cached) " >&6
15426else
15427 ac_check_lib_save_LIBS=$LIBS
15428LIBS="-lreadline $READLINE_LIBS $LIBS"
15429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430/* end confdefs.h. */
15431
15432/* Override any GCC internal prototype to avoid an error.
15433 Use char because int might match the return type of a GCC
15434 builtin and then its argument prototype would still apply. */
15435#ifdef __cplusplus
15436extern "C"
15437#endif
15438char append_history ();
15439int
15440main ()
15441{
15442return append_history ();
15443 ;
15444 return 0;
15445}
15446_ACEOF
15447if ac_fn_c_try_link "$LINENO"; then :
15448 ac_cv_lib_readline_append_history=yes
15449else
15450 ac_cv_lib_readline_append_history=no
15451fi
15452rm -f core conftest.err conftest.$ac_objext \
15453 conftest$ac_exeext conftest.$ac_ext
15454LIBS=$ac_check_lib_save_LIBS
15455fi
15456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15457$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15458if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15459
15460$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15461
15462fi
15463
15464
Martin v. Löwis82bca632006-02-10 20:49:30 +000015465# End of readline checks: restore LIBS
15466LIBS=$LIBS_no_readline
15467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15469$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015470if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015472else
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015475 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015478/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015479
15480int main()
15481{
15482 int val1 = nice(1);
15483 if (val1 != -1 && val1 == nice(2))
15484 exit(0);
15485 exit(1);
15486}
15487
Martin v. Löwis11437992002-04-12 09:54:03 +000015488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015490 ac_cv_broken_nice=yes
15491else
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015496fi
15497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498fi
15499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15501$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015502if test "$ac_cv_broken_nice" = yes
15503then
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015506
15507fi
15508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15510$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015511if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015513else
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015515 ac_cv_broken_poll=no
15516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015518/* end confdefs.h. */
15519
15520#include <poll.h>
15521
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015522int main()
15523{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015524 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015525 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015526
15527 close (42);
15528
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015529 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015530 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015531 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015532 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015533 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015534 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015535 return 1;
15536}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015537
15538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015540 ac_cv_broken_poll=yes
15541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015548fi
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15551$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015552if test "$ac_cv_broken_poll" = yes
15553then
15554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015556
15557fi
15558
Brett Cannon43802422005-02-10 20:48:03 +000015559# 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 +000015560# (which is not required by ISO C or UNIX spec) and/or if we support
15561# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015562ac_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 +000015563#include <$ac_cv_struct_tm>
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565"
Victor Stinnere0be4232011-10-25 13:06:09 +020015566if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015567
15568cat >>confdefs.h <<_ACEOF
15569#define HAVE_STRUCT_TM_TM_ZONE 1
15570_ACEOF
15571
15572
15573fi
15574
15575if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015578
15579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15581"
Victor Stinnere0be4232011-10-25 13:06:09 +020015582if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015583 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584else
Matthias Kloseb9621712010-04-24 17:59:49 +000015585 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586fi
15587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015589#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590_ACEOF
15591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15593$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015594if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015598/* end confdefs.h. */
15599#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600#if !HAVE_DECL_TZNAME
15601extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015602#endif
15603
15604int
15605main ()
15606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015608 ;
15609 return 0;
15610}
15611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015612if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015613 ac_cv_var_tzname=yes
15614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015617rm -f core conftest.err conftest.$ac_objext \
15618 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15621$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015622 if test $ac_cv_var_tzname = yes; then
15623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015625
15626 fi
15627fi
15628
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015629
Martin v. Löwis1d459062005-03-14 21:23:33 +000015630# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15632$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015633if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015635else
15636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015638 ac_cv_working_tzset=no
15639else
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015641/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015642
15643#include <stdlib.h>
15644#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015645#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015646
15647#if HAVE_TZNAME
15648extern char *tzname[];
15649#endif
15650
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015651int main()
15652{
Brett Cannon18367812003-09-19 00:59:16 +000015653 /* Note that we need to ensure that not only does tzset(3)
15654 do 'something' with localtime, but it works as documented
15655 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015656 This includes making sure that tzname is set properly if
15657 tm->tm_zone does not exist since it is the alternative way
15658 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015659
15660 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015661 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015662 */
15663
Martin v. Löwis1d459062005-03-14 21:23:33 +000015664 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015665 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15666
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015667 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015668 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015669 if (localtime(&groundhogday)->tm_hour != 0)
15670 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015671#if HAVE_TZNAME
15672 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15673 if (strcmp(tzname[0], "UTC") ||
15674 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15675 exit(1);
15676#endif
Brett Cannon18367812003-09-19 00:59:16 +000015677
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015678 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015679 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015680 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015682#if HAVE_TZNAME
15683 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15684 exit(1);
15685#endif
Brett Cannon18367812003-09-19 00:59:16 +000015686
15687 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15688 tzset();
15689 if (localtime(&groundhogday)->tm_hour != 11)
15690 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015691#if HAVE_TZNAME
15692 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15693 exit(1);
15694#endif
15695
15696#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015697 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15698 exit(1);
15699 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15700 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015701#endif
Brett Cannon18367812003-09-19 00:59:16 +000015702
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015703 exit(0);
15704}
15705
15706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015707if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015708 ac_cv_working_tzset=yes
15709else
Matthias Kloseb9621712010-04-24 17:59:49 +000015710 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015714fi
15715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716fi
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15719$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015720if test "$ac_cv_working_tzset" = yes
15721then
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724
15725fi
15726
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015727# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15729$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015730if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015732else
Matthias Kloseb9621712010-04-24 17:59:49 +000015733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015734/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015735#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015736int
15737main ()
15738{
15739
15740struct stat st;
15741st.st_mtim.tv_nsec = 1;
15742
15743 ;
15744 return 0;
15745}
15746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015748 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15753fi
15754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15756$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015757if test "$ac_cv_stat_tv_nsec" = yes
15758then
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015761
15762fi
15763
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015764# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15766$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015767if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015769else
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015771/* end confdefs.h. */
15772#include <sys/stat.h>
15773int
15774main ()
15775{
15776
15777struct stat st;
15778st.st_mtimespec.tv_nsec = 1;
15779
15780 ;
15781 return 0;
15782}
15783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015785 ac_cv_stat_tv_nsec2=yes
15786else
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15790fi
15791
Matthias Kloseb9621712010-04-24 17:59:49 +000015792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15793$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015794if test "$ac_cv_stat_tv_nsec2" = yes
15795then
15796
Matthias Kloseb9621712010-04-24 17:59:49 +000015797$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015798
15799fi
15800
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015801# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015802ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015803if test "$cross_compiling" = no; then
15804 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15805fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015806
15807for ac_header in curses.h ncurses.h
15808do :
15809 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15810ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15811if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15812 cat >>confdefs.h <<_ACEOF
15813#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15814_ACEOF
15815
15816fi
15817
15818done
15819
15820
15821# On Solaris, term.h requires curses.h
15822for ac_header in term.h
15823do :
15824 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15825#ifdef HAVE_CURSES_H
15826#include <curses.h>
15827#endif
15828
15829"
15830if test "x$ac_cv_header_term_h" = xyes; then :
15831 cat >>confdefs.h <<_ACEOF
15832#define HAVE_TERM_H 1
15833_ACEOF
15834
15835fi
15836
15837done
15838
15839
Jack Jansen666b1e72001-10-31 12:11:48 +000015840# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15842$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015843if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015844 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015847/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015848#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015849int
15850main ()
15851{
Jack Jansen666b1e72001-10-31 12:11:48 +000015852
15853 int rtn;
15854 rtn = mvwdelch(0,0,0);
15855
Martin v. Löwis11437992002-04-12 09:54:03 +000015856 ;
15857 return 0;
15858}
15859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015860if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015861 ac_cv_mvwdelch_is_expression=yes
15862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15866fi
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15869$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015870
15871if test "$ac_cv_mvwdelch_is_expression" = yes
15872then
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015875
15876fi
15877
Matthias Kloseb9621712010-04-24 17:59:49 +000015878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15879$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015880if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015882else
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015884/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015885#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015886int
15887main ()
15888{
Jack Jansen666b1e72001-10-31 12:11:48 +000015889
15890 WINDOW *w;
15891 w->_flags = 0;
15892
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 ;
15894 return 0;
15895}
15896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015897if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015898 ac_cv_window_has_flags=yes
15899else
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15903fi
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15906$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015907
Jack Jansen666b1e72001-10-31 12:11:48 +000015908
15909if test "$ac_cv_window_has_flags" = yes
15910then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015913
15914fi
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15917$as_echo_n "checking for is_term_resized... " >&6; }
15918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919/* end confdefs.h. */
15920#include <curses.h>
15921int
15922main ()
15923{
15924void *x=is_term_resized
15925 ;
15926 return 0;
15927}
15928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015929if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015932
Matthias Kloseb159a552010-04-25 21:00:44 +000015933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015934$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015935else
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15937$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015938
15939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15943$as_echo_n "checking for resize_term... " >&6; }
15944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945/* end confdefs.h. */
15946#include <curses.h>
15947int
15948main ()
15949{
15950void *x=resize_term
15951 ;
15952 return 0;
15953}
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015958
Matthias Kloseb159a552010-04-25 21:00:44 +000015959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015960$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015961else
Matthias Kloseb9621712010-04-24 17:59:49 +000015962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015964
15965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15969$as_echo_n "checking for resizeterm... " >&6; }
15970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015971/* end confdefs.h. */
15972#include <curses.h>
15973int
15974main ()
15975{
15976void *x=resizeterm
15977 ;
15978 return 0;
15979}
15980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015981if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015982
Matthias Kloseb9621712010-04-24 17:59:49 +000015983$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015984
Matthias Kloseb159a552010-04-25 21:00:44 +000015985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015986$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015987else
Matthias Kloseb9621712010-04-24 17:59:49 +000015988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15989$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015990
15991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015993# last curses configure check
15994CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15997$as_echo "$as_me: checking for device files" >&6;}
15998
15999if test "x$cross_compiling" = xyes; then
16000 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16002$as_echo_n "checking for /dev/ptmx... " >&6; }
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16004$as_echo "not set" >&6; }
16005 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16006 fi
16007 if test "${ac_cv_file__dev_ptc+set}" != set; then
16008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16009$as_echo_n "checking for /dev/ptc... " >&6; }
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16011$as_echo "not set" >&6; }
16012 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16013 fi
16014fi
16015
Matthias Kloseb9621712010-04-24 17:59:49 +000016016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16017$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016018if ${ac_cv_file__dev_ptmx+:} false; then :
16019 $as_echo_n "(cached) " >&6
16020else
16021 test "$cross_compiling" = yes &&
16022 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16023if test -r "/dev/ptmx"; then
16024 ac_cv_file__dev_ptmx=yes
16025else
16026 ac_cv_file__dev_ptmx=no
16027fi
16028fi
16029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16030$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16031if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016032
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016033fi
16034
16035if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016038
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16041$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016042if ${ac_cv_file__dev_ptc+:} false; then :
16043 $as_echo_n "(cached) " >&6
16044else
16045 test "$cross_compiling" = yes &&
16046 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16047if test -r "/dev/ptc"; then
16048 ac_cv_file__dev_ptc=yes
16049else
16050 ac_cv_file__dev_ptc=no
16051fi
16052fi
16053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16054$as_echo "$ac_cv_file__dev_ptc" >&6; }
16055if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016056
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016057fi
16058
16059if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016060
Matthias Kloseb9621712010-04-24 17:59:49 +000016061$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016062
Neal Norwitz865400f2003-03-21 01:42:58 +000016063fi
16064
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016065if test $ac_sys_system = Darwin
16066then
16067 LIBS="$LIBS -framework CoreFoundation"
16068fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016069
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16071$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016072if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016073 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016074else
Matthias Kloseb9621712010-04-24 17:59:49 +000016075 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016076 ac_cv_have_size_t_format="cross -- assuming yes"
16077
Thomas Wouters477c8d52006-05-27 19:21:47 +000016078else
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016080/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016081
Thomas Wouters477c8d52006-05-27 19:21:47 +000016082#include <stdio.h>
16083#include <stddef.h>
16084#include <string.h>
16085
Christian Heimes2c181612007-12-17 20:04:13 +000016086#ifdef HAVE_SYS_TYPES_H
16087#include <sys/types.h>
16088#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016089
16090#ifdef HAVE_SSIZE_T
16091typedef ssize_t Py_ssize_t;
16092#elif SIZEOF_VOID_P == SIZEOF_LONG
16093typedef long Py_ssize_t;
16094#else
16095typedef int Py_ssize_t;
16096#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016097
Christian Heimes2c181612007-12-17 20:04:13 +000016098int main()
16099{
16100 char buffer[256];
16101
Thomas Wouters477c8d52006-05-27 19:21:47 +000016102 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16103 return 1;
16104
Thomas Wouters89f507f2006-12-13 04:49:30 +000016105 if (strcmp(buffer, "123"))
16106 return 1;
16107
16108 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16109 return 1;
16110
16111 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016112 return 1;
16113
16114 return 0;
16115}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016116
Thomas Wouters477c8d52006-05-27 19:21:47 +000016117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016118if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016119 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016120else
Matthias Kloseb9621712010-04-24 17:59:49 +000016121 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16124 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016125fi
16126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16129$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016130if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016131
Matthias Kloseb9621712010-04-24 17:59:49 +000016132$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016133
16134fi
16135
Matthias Kloseb9621712010-04-24 17:59:49 +000016136ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016137#ifdef HAVE_SYS_TYPES_H
16138#include <sys/types.h>
16139#endif
16140#ifdef HAVE_SYS_SOCKET_H
16141#include <sys/socket.h>
16142#endif
16143
Matthias Kloseb9621712010-04-24 17:59:49 +000016144"
Victor Stinnere0be4232011-10-25 13:06:09 +020016145if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016146
Martin v. Löwis11437992002-04-12 09:54:03 +000016147else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016150
16151fi
16152
Michael W. Hudson54241132001-12-07 15:38:26 +000016153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16155$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016156if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016158else
Matthias Kloseb9621712010-04-24 17:59:49 +000016159 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016160 ac_cv_broken_mbstowcs=no
16161else
Matthias Kloseb9621712010-04-24 17:59:49 +000016162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016163/* end confdefs.h. */
16164
Stefan Krah19c21392012-11-22 23:47:32 +010016165#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016166#include<stdlib.h>
16167int main() {
16168 size_t len = -1;
16169 const char *str = "text";
16170 len = mbstowcs(NULL, str, 0);
16171 return (len != 4);
16172}
16173
16174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016175if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016176 ac_cv_broken_mbstowcs=no
16177else
Matthias Kloseb9621712010-04-24 17:59:49 +000016178 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016182fi
16183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016184fi
16185
Matthias Kloseb9621712010-04-24 17:59:49 +000016186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16187$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016188if test "$ac_cv_broken_mbstowcs" = yes
16189then
16190
Matthias Kloseb9621712010-04-24 17:59:49 +000016191$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016192
16193fi
16194
Antoine Pitroub52ec782009-01-25 16:34:23 +000016195# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16197$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016198
16199# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016200if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016201 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016202if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016203then
16204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016206
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16208$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016209fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016210if test "$withval" = no
16211then
16212
16213$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16214
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16216$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016217fi
16218
Antoine Pitrou042b1282010-08-13 21:15:58 +000016219else
16220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16221$as_echo "no value specified" >&6; }
16222fi
16223
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224
Matthias Kloseb17289e2012-03-15 19:51:34 +010016225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16226$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16227if ${ac_cv_computed_gotos+:} false; then :
16228 $as_echo_n "(cached) " >&6
16229else
16230 if test "$cross_compiling" = yes; then :
16231 if test "${with_computed_gotos+set}" = set; then
16232 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16233 else
16234 ac_cv_computed_gotos=no
16235 fi
16236else
16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h. */
16239
16240int main(int argc, char **argv)
16241{
16242 static void *targets[1] = { &&LABEL1 };
16243 goto LABEL2;
16244LABEL1:
16245 return 0;
16246LABEL2:
16247 goto *targets[0];
16248 return 1;
16249}
16250
16251_ACEOF
16252if ac_fn_c_try_run "$LINENO"; then :
16253 ac_cv_computed_gotos=yes
16254else
16255 ac_cv_computed_gotos=no
16256fi
16257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16258 conftest.$ac_objext conftest.beam conftest.$ac_ext
16259fi
16260
16261fi
16262
16263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16264$as_echo "$ac_cv_computed_gotos" >&6; }
16265case "$ac_cv_computed_gotos" in yes*)
16266
16267$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16268
16269esac
16270
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016271case $ac_sys_system in
16272AIX*)
16273
16274$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16275 ;;
16276esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016277
Michael W. Hudson54241132001-12-07 15:38:26 +000016278
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016279
16280
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016281for h in `(cd $srcdir;echo Python/thread_*.h)`
16282do
16283 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16284done
16285
Michael W. Hudson54241132001-12-07 15:38:26 +000016286
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016287SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16289$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016290for dir in $SRCDIRS; do
16291 if test ! -d $dir; then
16292 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016293 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016294done
Matthias Kloseb9621712010-04-24 17:59:49 +000016295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16296$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016297
Stefan Krah1919b7e2012-03-21 18:25:23 +010016298# Availability of -O2:
16299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16300$as_echo_n "checking for -O2... " >&6; }
16301saved_cflags="$CFLAGS"
16302CFLAGS="-O2"
16303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304/* end confdefs.h. */
16305
16306int
16307main ()
16308{
16309
16310
16311 ;
16312 return 0;
16313}
16314_ACEOF
16315if ac_fn_c_try_compile "$LINENO"; then :
16316 have_O2=yes
16317else
16318 have_O2=no
16319fi
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16322$as_echo "$have_O2" >&6; }
16323CFLAGS="$saved_cflags"
16324
16325# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16326# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16328$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16329saved_cflags="$CFLAGS"
16330CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16331if test "$have_O2" = no; then
16332 CFLAGS=""
16333fi
16334if test "$cross_compiling" = yes; then :
16335 have_glibc_memmove_bug=undefined
16336else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h. */
16339
16340#include <stdio.h>
16341#include <stdlib.h>
16342#include <string.h>
16343void foo(void *p, void *q) { memmove(p, q, 19); }
16344int main() {
16345 char a[32] = "123456789000000000";
16346 foo(&a[9], a);
16347 if (strcmp(a, "123456789123456789000000000") != 0)
16348 return 1;
16349 foo(a, &a[9]);
16350 if (strcmp(a, "123456789000000000") != 0)
16351 return 1;
16352 return 0;
16353}
16354
16355_ACEOF
16356if ac_fn_c_try_run "$LINENO"; then :
16357 have_glibc_memmove_bug=no
16358else
16359 have_glibc_memmove_bug=yes
16360fi
16361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16362 conftest.$ac_objext conftest.beam conftest.$ac_ext
16363fi
16364
16365CFLAGS="$saved_cflags"
16366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16367$as_echo "$have_glibc_memmove_bug" >&6; }
16368if test "$have_glibc_memmove_bug" = yes; then
16369
16370$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16371
16372fi
16373
16374if test "$have_gcc_asm_for_x87" = yes; then
16375 # Some versions of gcc miscompile inline asm:
16376 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16377 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16378 case $CC in
16379 *gcc*)
16380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16381$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16382 saved_cflags="$CFLAGS"
16383 CFLAGS="-O2"
16384 if test "$cross_compiling" = yes; then :
16385 have_ipa_pure_const_bug=undefined
16386else
16387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388/* end confdefs.h. */
16389
16390 __attribute__((noinline)) int
16391 foo(int *p) {
16392 int r;
16393 asm ( "movl \$6, (%1)\n\t"
16394 "xorl %0, %0\n\t"
16395 : "=r" (r) : "r" (p) : "memory"
16396 );
16397 return r;
16398 }
16399 int main() {
16400 int p = 8;
16401 if ((foo(&p) ? : p) != 6)
16402 return 1;
16403 return 0;
16404 }
16405
16406_ACEOF
16407if ac_fn_c_try_run "$LINENO"; then :
16408 have_ipa_pure_const_bug=no
16409else
16410 have_ipa_pure_const_bug=yes
16411fi
16412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16413 conftest.$ac_objext conftest.beam conftest.$ac_ext
16414fi
16415
16416 CFLAGS="$saved_cflags"
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16418$as_echo "$have_ipa_pure_const_bug" >&6; }
16419 if test "$have_ipa_pure_const_bug" = yes; then
16420
16421$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16422
16423 fi
16424 ;;
16425 esac
16426fi
16427
Victor Stinner4f5366e2015-01-09 02:13:19 +010016428# Check for stdatomic.h
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16430$as_echo_n "checking for stdatomic.h... " >&6; }
16431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433
16434
16435 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016436 atomic_int value = ATOMIC_VAR_INIT(1);
16437 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016438 int main() {
16439 int loaded_value = atomic_load(&value);
16440 return 0;
16441 }
16442
16443
16444_ACEOF
16445if ac_fn_c_try_link "$LINENO"; then :
16446 have_stdatomic_h=yes
16447else
16448 have_stdatomic_h=no
16449fi
16450rm -f core conftest.err conftest.$ac_objext \
16451 conftest$ac_exeext conftest.$ac_ext
16452
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16454$as_echo "$have_stdatomic_h" >&6; }
16455
16456if test "$have_stdatomic_h" = yes; then
16457
16458$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16459
16460fi
16461
16462# Check for GCC >= 4.7 __atomic builtins
16463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16464$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16466/* end confdefs.h. */
16467
16468
16469 volatile int val = 1;
16470 int main() {
16471 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16472 return 0;
16473 }
16474
16475
16476_ACEOF
16477if ac_fn_c_try_link "$LINENO"; then :
16478 have_builtin_atomic=yes
16479else
16480 have_builtin_atomic=no
16481fi
16482rm -f core conftest.err conftest.$ac_objext \
16483 conftest$ac_exeext conftest.$ac_ext
16484
16485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16486$as_echo "$have_builtin_atomic" >&6; }
16487
16488if test "$have_builtin_atomic" = yes; then
16489
16490$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16491
16492fi
16493
Ned Deily322f5ba2013-11-21 23:01:59 -080016494# ensurepip option
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16496$as_echo_n "checking for ensurepip... " >&6; }
16497
16498# Check whether --with-ensurepip was given.
16499if test "${with_ensurepip+set}" = set; then :
16500 withval=$with_ensurepip;
16501else
16502 with_ensurepip=upgrade
16503fi
16504
16505case $with_ensurepip in #(
16506 yes|upgrade) :
16507 ENSUREPIP=upgrade ;; #(
16508 install) :
16509 ENSUREPIP=install ;; #(
16510 no) :
16511 ENSUREPIP=no ;; #(
16512 *) :
16513 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16514esac
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16516$as_echo "$ENSUREPIP" >&6; }
16517
16518
Victor Stinner35a97c02015-03-08 02:59:09 +010016519# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16521$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16523/* end confdefs.h. */
16524
16525
16526 #include <dirent.h>
16527
16528 int main() {
16529 struct dirent entry;
16530 return entry.d_type == DT_UNKNOWN;
16531 }
16532
16533
16534_ACEOF
16535if ac_fn_c_try_link "$LINENO"; then :
16536 have_dirent_d_type=yes
16537else
16538 have_dirent_d_type=no
16539fi
16540rm -f core conftest.err conftest.$ac_objext \
16541 conftest$ac_exeext conftest.$ac_ext
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16543$as_echo "$have_dirent_d_type" >&6; }
16544
16545if test "$have_dirent_d_type" = yes; then
16546
16547$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16548
16549fi
16550
Victor Stinner9eb57c52015-03-19 22:21:49 +010016551# check if the Linux getrandom() syscall is available
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16553$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555/* end confdefs.h. */
16556
16557
Victor Stinner1b80b242016-04-12 22:34:58 +020016558 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016559 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016560 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016561
16562 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016563 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016564 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016565 const int flags = GRND_NONBLOCK;
16566 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016567 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016568 return 0;
16569 }
16570
16571
16572_ACEOF
16573if ac_fn_c_try_link "$LINENO"; then :
16574 have_getrandom_syscall=yes
16575else
16576 have_getrandom_syscall=no
16577fi
16578rm -f core conftest.err conftest.$ac_objext \
16579 conftest$ac_exeext conftest.$ac_ext
16580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16581$as_echo "$have_getrandom_syscall" >&6; }
16582
16583if test "$have_getrandom_syscall" = yes; then
16584
16585$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16586
16587fi
16588
Victor Stinner3abf44e2015-09-18 15:38:37 +020016589# check if the getrandom() function is available
16590# the test was written for the Solaris function of <sys/random.h>
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16592$as_echo_n "checking for the getrandom() function... " >&6; }
16593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16594/* end confdefs.h. */
16595
16596
16597 #include <sys/random.h>
16598
16599 int main() {
16600 char buffer[1];
16601 const size_t buflen = sizeof(buffer);
16602 const int flags = 0;
16603 /* ignore the result, Python checks for ENOSYS at runtime */
16604 (void)getrandom(buffer, buflen, flags);
16605 return 0;
16606 }
16607
16608
16609_ACEOF
16610if ac_fn_c_try_link "$LINENO"; then :
16611 have_getrandom=yes
16612else
16613 have_getrandom=no
16614fi
16615rm -f core conftest.err conftest.$ac_objext \
16616 conftest$ac_exeext conftest.$ac_ext
16617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16618$as_echo "$have_getrandom" >&6; }
16619
16620if test "$have_getrandom" = yes; then
16621
16622$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16623
16624fi
16625
Guido van Rossum627b2d71993-12-24 10:39:16 +000016626# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016627ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016628
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016629ac_config_files="$ac_config_files Modules/ld_so_aix"
16630
Martin v. Löwis11437992002-04-12 09:54:03 +000016631cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632# This file is a shell script that caches the results of configure
16633# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016634# scripts and configure runs, see configure's option --config-cache.
16635# It is not useful on other systems. If it contains results you don't
16636# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016637#
Martin v. Löwis11437992002-04-12 09:54:03 +000016638# config.status only pays attention to the cache file if you give it
16639# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016640#
Skip Montanaro6dead952003-09-25 14:50:04 +000016641# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016642# loading this file, other *unset* `ac_cv_foo' will be assigned the
16643# following values.
16644
16645_ACEOF
16646
Guido van Rossumf78abae1997-01-21 22:02:36 +000016647# The following way of writing the cache mishandles newlines in values,
16648# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016650# Ultrix sh set writes to stderr and can't be redirected directly,
16651# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652(
16653 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16654 eval ac_val=\$$ac_var
16655 case $ac_val in #(
16656 *${as_nl}*)
16657 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16659$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660 esac
16661 case $ac_var in #(
16662 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016663 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16664 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 esac ;;
16666 esac
16667 done
16668
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16671 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 # `set' does not quote correctly, so add quotes: double-quote
16673 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016675 "s/'/'\\\\''/g;
16676 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 *)
16679 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016681 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682 esac |
16683 sort
16684) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016687 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16690 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16692 :end' >>confcache
16693if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16694 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016695 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16697$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016698 if test ! -f "$cache_file" || test -h "$cache_file"; then
16699 cat confcache >"$cache_file"
16700 else
16701 case $cache_file in #(
16702 */* | ?:*)
16703 mv -f confcache "$cache_file"$$ &&
16704 mv -f "$cache_file"$$ "$cache_file" ;; #(
16705 *)
16706 mv -f confcache "$cache_file" ;;
16707 esac
16708 fi
16709 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016710 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16712$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016713 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016715rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016717test "x$prefix" = xNONE && prefix=$ac_default_prefix
16718# Let make expand exec_prefix.
16719test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016721DEFS=-DHAVE_CONFIG_H
16722
Skip Montanaro6dead952003-09-25 14:50:04 +000016723ac_libobjs=
16724ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016725U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016726for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16727 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16731 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016732 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16733 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016734done
16735LIBOBJS=$ac_libobjs
16736
16737LTLIBOBJS=$ac_ltlibobjs
16738
16739
Martin v. Löwis11437992002-04-12 09:54:03 +000016740
Matthias Kloseb9621712010-04-24 17:59:49 +000016741
Victor Stinnere0be4232011-10-25 13:06:09 +020016742: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016743ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016744ac_clean_files_save=$ac_clean_files
16745ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016746{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16747$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16748as_write_fail=0
16749cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016750#! $SHELL
16751# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016752# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016753# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016754# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016757ac_cs_recheck=false
16758ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016759
Matthias Kloseb9621712010-04-24 17:59:49 +000016760SHELL=\${CONFIG_SHELL-$SHELL}
16761export SHELL
16762_ASEOF
16763cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16764## -------------------- ##
16765## M4sh Initialization. ##
16766## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768# Be more Bourne compatible
16769DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016770if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 emulate sh
16772 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016774 # is contrary to our usage. Disable this feature.
16775 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016777else
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 case `(set -o) 2>/dev/null` in #(
16779 *posix*) :
16780 set -o posix ;; #(
16781 *) :
16782 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016784fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016785
16786
Matthias Kloseb9621712010-04-24 17:59:49 +000016787as_nl='
16788'
16789export as_nl
16790# Printing a long string crashes Solaris 7 /usr/bin/printf.
16791as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16792as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16793as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16794# Prefer a ksh shell builtin over an external printf program on Solaris,
16795# but without wasting forks for bash or zsh.
16796if test -z "$BASH_VERSION$ZSH_VERSION" \
16797 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16798 as_echo='print -r --'
16799 as_echo_n='print -rn --'
16800elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16801 as_echo='printf %s\n'
16802 as_echo_n='printf %s'
16803else
16804 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16805 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16806 as_echo_n='/usr/ucb/echo -n'
16807 else
16808 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16809 as_echo_n_body='eval
16810 arg=$1;
16811 case $arg in #(
16812 *"$as_nl"*)
16813 expr "X$arg" : "X\\(.*\\)$as_nl";
16814 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16815 esac;
16816 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16817 '
16818 export as_echo_n_body
16819 as_echo_n='sh -c $as_echo_n_body as_echo'
16820 fi
16821 export as_echo_body
16822 as_echo='sh -c $as_echo_body as_echo'
16823fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016824
16825# The user is always right.
16826if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016827 PATH_SEPARATOR=:
16828 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16829 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16830 PATH_SEPARATOR=';'
16831 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834
16835# IFS
16836# We need space, tab and new line, in precisely that order. Quoting is
16837# there to prevent editors from complaining about space-tab.
16838# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16839# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840IFS=" "" $as_nl"
16841
16842# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016843as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016844case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845 *[\\/]* ) as_myself=$0 ;;
16846 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016847for as_dir in $PATH
16848do
16849 IFS=$as_save_IFS
16850 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016851 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 ;;
16856esac
16857# We did not find ourselves, most probably we were run as `sh COMMAND'
16858# in which case we are not to be found in the path.
16859if test "x$as_myself" = x; then
16860 as_myself=$0
16861fi
16862if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16864 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865fi
16866
Matthias Kloseb9621712010-04-24 17:59:49 +000016867# Unset variables that we do not need and which cause bugs (e.g. in
16868# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16869# suppresses any "Segmentation fault" message there. '((' could
16870# trigger a bug in pdksh 5.2.14.
16871for as_var in BASH_ENV ENV MAIL MAILPATH
16872do eval test x\${$as_var+set} = xset \
16873 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874done
16875PS1='$ '
16876PS2='> '
16877PS4='+ '
16878
16879# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016880LC_ALL=C
16881export LC_ALL
16882LANGUAGE=C
16883export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884
Matthias Kloseb9621712010-04-24 17:59:49 +000016885# CDPATH.
16886(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16887
16888
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016889# as_fn_error STATUS ERROR [LINENO LOG_FD]
16890# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016891# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16892# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016893# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016894as_fn_error ()
16895{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016896 as_status=$1; test $as_status -eq 0 && as_status=1
16897 if test "$4"; then
16898 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16899 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016900 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016901 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016902 as_fn_exit $as_status
16903} # as_fn_error
16904
16905
16906# as_fn_set_status STATUS
16907# -----------------------
16908# Set $? to STATUS, without forking.
16909as_fn_set_status ()
16910{
16911 return $1
16912} # as_fn_set_status
16913
16914# as_fn_exit STATUS
16915# -----------------
16916# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16917as_fn_exit ()
16918{
16919 set +e
16920 as_fn_set_status $1
16921 exit $1
16922} # as_fn_exit
16923
16924# as_fn_unset VAR
16925# ---------------
16926# Portably unset VAR.
16927as_fn_unset ()
16928{
16929 { eval $1=; unset $1;}
16930}
16931as_unset=as_fn_unset
16932# as_fn_append VAR VALUE
16933# ----------------------
16934# Append the text in VALUE to the end of the definition contained in VAR. Take
16935# advantage of any shell optimizations that allow amortized linear growth over
16936# repeated appends, instead of the typical quadratic growth present in naive
16937# implementations.
16938if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16939 eval 'as_fn_append ()
16940 {
16941 eval $1+=\$2
16942 }'
16943else
16944 as_fn_append ()
16945 {
16946 eval $1=\$$1\$2
16947 }
16948fi # as_fn_append
16949
16950# as_fn_arith ARG...
16951# ------------------
16952# Perform arithmetic evaluation on the ARGs, and store the result in the
16953# global $as_val. Take advantage of shells that can avoid forks. The arguments
16954# must be portable across $(()) and expr.
16955if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16956 eval 'as_fn_arith ()
16957 {
16958 as_val=$(( $* ))
16959 }'
16960else
16961 as_fn_arith ()
16962 {
16963 as_val=`expr "$@" || test $? -eq 1`
16964 }
16965fi # as_fn_arith
16966
16967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968if expr a : '\(a\)' >/dev/null 2>&1 &&
16969 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16970 as_expr=expr
16971else
16972 as_expr=false
16973fi
16974
16975if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16976 as_basename=basename
16977else
16978 as_basename=false
16979fi
16980
Matthias Kloseb9621712010-04-24 17:59:49 +000016981if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16982 as_dirname=dirname
16983else
16984 as_dirname=false
16985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987as_me=`$as_basename -- "$0" ||
16988$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16989 X"$0" : 'X\(//\)$' \| \
16990 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016991$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992 sed '/^.*\/\([^/][^/]*\)\/*$/{
16993 s//\1/
16994 q
16995 }
16996 /^X\/\(\/\/\)$/{
16997 s//\1/
16998 q
16999 }
17000 /^X\/\(\/\).*/{
17001 s//\1/
17002 q
17003 }
17004 s/.*/./; q'`
17005
Matthias Kloseb9621712010-04-24 17:59:49 +000017006# Avoid depending upon Character Ranges.
17007as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17008as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17009as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17010as_cr_digits='0123456789'
17011as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012
17013ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017014case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017016 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017018 xy) ECHO_C='\c';;
17019 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17020 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021 esac;;
17022*)
17023 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017025
Martin v. Löwis11437992002-04-12 09:54:03 +000017026rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027if test -d conf$$.dir; then
17028 rm -f conf$$.dir/conf$$.file
17029else
17030 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017031 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017033if (echo >conf$$.file) 2>/dev/null; then
17034 if ln -s conf$$.file conf$$ 2>/dev/null; then
17035 as_ln_s='ln -s'
17036 # ... but there are two gotchas:
17037 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17038 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017039 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017041 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017042 elif ln conf$$.file conf$$ 2>/dev/null; then
17043 as_ln_s=ln
17044 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017045 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017047else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017048 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17051rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Matthias Kloseb9621712010-04-24 17:59:49 +000017053
17054# as_fn_mkdir_p
17055# -------------
17056# Create "$as_dir" as a directory, including parents if necessary.
17057as_fn_mkdir_p ()
17058{
17059
17060 case $as_dir in #(
17061 -*) as_dir=./$as_dir;;
17062 esac
17063 test -d "$as_dir" || eval $as_mkdir_p || {
17064 as_dirs=
17065 while :; do
17066 case $as_dir in #(
17067 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17068 *) as_qdir=$as_dir;;
17069 esac
17070 as_dirs="'$as_qdir' $as_dirs"
17071 as_dir=`$as_dirname -- "$as_dir" ||
17072$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17073 X"$as_dir" : 'X\(//\)[^/]' \| \
17074 X"$as_dir" : 'X\(//\)$' \| \
17075 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17076$as_echo X"$as_dir" |
17077 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17078 s//\1/
17079 q
17080 }
17081 /^X\(\/\/\)[^/].*/{
17082 s//\1/
17083 q
17084 }
17085 /^X\(\/\/\)$/{
17086 s//\1/
17087 q
17088 }
17089 /^X\(\/\).*/{
17090 s//\1/
17091 q
17092 }
17093 s/.*/./; q'`
17094 test -d "$as_dir" && break
17095 done
17096 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017097 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017098
17099
17100} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017101if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017102 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017103else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017104 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017105 as_mkdir_p=false
17106fi
17107
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017108
17109# as_fn_executable_p FILE
17110# -----------------------
17111# Test if FILE is an executable regular file.
17112as_fn_executable_p ()
17113{
17114 test -f "$1" && test -x "$1"
17115} # as_fn_executable_p
17116as_test_x='test -x'
17117as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017118
17119# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017120as_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 +000017121
17122# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017123as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017124
17125
Martin v. Löwis11437992002-04-12 09:54:03 +000017126exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017127## ----------------------------------- ##
17128## Main body of $CONFIG_STATUS script. ##
17129## ----------------------------------- ##
17130_ASEOF
17131test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
Matthias Kloseb9621712010-04-24 17:59:49 +000017133cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17134# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017135# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136# values after options handling.
17137ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017138This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017139generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017140
17141 CONFIG_FILES = $CONFIG_FILES
17142 CONFIG_HEADERS = $CONFIG_HEADERS
17143 CONFIG_LINKS = $CONFIG_LINKS
17144 CONFIG_COMMANDS = $CONFIG_COMMANDS
17145 $ $0 $@
17146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147on `(hostname || uname -n) 2>/dev/null | sed 1q`
17148"
17149
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
17151
Matthias Kloseb9621712010-04-24 17:59:49 +000017152case $ac_config_files in *"
17153"*) set x $ac_config_files; shift; ac_config_files=$*;;
17154esac
17155
17156case $ac_config_headers in *"
17157"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17158esac
17159
17160
17161cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017162# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017163config_files="$ac_config_files"
17164config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017167
Matthias Kloseb9621712010-04-24 17:59:49 +000017168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017169ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017170\`$as_me' instantiates files and other configuration actions
17171from templates according to the current configuration. Unless the files
17172and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017173
Matthias Kloseb9621712010-04-24 17:59:49 +000017174Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
17176 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 --config print configuration, then exit
17179 -q, --quiet, --silent
17180 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017181 -d, --debug don't remove temporary files
17182 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 --file=FILE[:TEMPLATE]
17184 instantiate the configuration file FILE
17185 --header=FILE[:TEMPLATE]
17186 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
17188Configuration files:
17189$config_files
17190
17191Configuration headers:
17192$config_headers
17193
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017194Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17198ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017199ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017200python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017201configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017202 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017204Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017205This config.status script is free software; the Free Software Foundation
17206gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207
17208ac_pwd='$ac_pwd'
17209srcdir='$srcdir'
17210INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017211MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017212test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017213_ACEOF
17214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17216# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017217ac_need_defaults=:
17218while test $# != 0
17219do
17220 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017221 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17223 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017224 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017226 --*=)
17227 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17228 ac_optarg=
17229 ac_shift=:
17230 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017231 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017232 ac_option=$1
17233 ac_optarg=$2
17234 ac_shift=shift
17235 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 esac
17237
Skip Montanaro6dead952003-09-25 14:50:04 +000017238 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017240 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17241 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017243 $as_echo "$ac_cs_version"; exit ;;
17244 --config | --confi | --conf | --con | --co | --c )
17245 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 debug=: ;;
17248 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017249 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017250 case $ac_optarg in
17251 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017252 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 esac
17254 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 ac_need_defaults=false;;
17256 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017257 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017258 case $ac_optarg in
17259 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17260 esac
17261 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263 --he | --h)
17264 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017265 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017266Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017269 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17270 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17271 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017272
17273 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017274 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017275Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017276
Matthias Kloseb9621712010-04-24 17:59:49 +000017277 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017279
17280 esac
17281 shift
17282done
17283
Skip Montanaro6dead952003-09-25 14:50:04 +000017284ac_configure_extra_args=
17285
17286if $ac_cs_silent; then
17287 exec 6>/dev/null
17288 ac_configure_extra_args="$ac_configure_extra_args --silent"
17289fi
17290
17291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017293if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017294 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017295 shift
17296 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17297 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017299 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017300fi
17301
Martin v. Löwis11437992002-04-12 09:54:03 +000017302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304exec 5>>config.log
17305{
17306 echo
17307 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17308## Running $as_me. ##
17309_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017314cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017316
Matthias Kloseb9621712010-04-24 17:59:49 +000017317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318
17319# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017320for ac_config_target in $ac_config_targets
17321do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322 case $ac_config_target in
17323 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17324 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17325 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017326 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17327 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17329 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017330 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017331 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017332 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333
Victor Stinnere0be4232011-10-25 13:06:09 +020017334 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017335 esac
17336done
17337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338
Martin v. Löwis11437992002-04-12 09:54:03 +000017339# If the user did not use the arguments to specify the items to instantiate,
17340# then the envvar interface is used. Set only those that are not.
17341# We use the long form for the default assignment because of an extremely
17342# bizarre bug on SunOS 4.1.3.
17343if $ac_need_defaults; then
17344 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17345 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17346fi
17347
Skip Montanaro6dead952003-09-25 14:50:04 +000017348# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017350# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351# Hook for its removal unless debugging.
17352# Note that there is a small window in which the directory will not be cleaned:
17353# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017354$debug ||
17355{
Victor Stinnere0be4232011-10-25 13:06:09 +020017356 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017358 : "${ac_tmp:=$tmp}"
17359 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017362}
Martin v. Löwis11437992002-04-12 09:54:03 +000017363# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017367 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017368} ||
17369{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 tmp=./conf$$-$RANDOM
17371 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017372} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017373ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017374
Matthias Kloseb9621712010-04-24 17:59:49 +000017375# Set up the scripts for CONFIG_FILES section.
17376# No need to generate them if there are no CONFIG_FILES.
17377# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
Matthias Kloseb9621712010-04-24 17:59:49 +000017380
17381ac_cr=`echo X | tr X '\015'`
17382# On cygwin, bash can eat \r inside `` if the user requested igncr.
17383# But we know of no other shell where ac_cr would be empty at this
17384# point, so we can use a bashism as a fallback.
17385if test "x$ac_cr" = x; then
17386 eval ac_cr=\$\'\\r\'
17387fi
17388ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17389if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017390 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017391else
17392 ac_cs_awk_cr=$ac_cr
17393fi
17394
Victor Stinnere0be4232011-10-25 13:06:09 +020017395echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017396_ACEOF
17397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398
Matthias Kloseb9621712010-04-24 17:59:49 +000017399{
17400 echo "cat >conf$$subs.awk <<_ACEOF" &&
17401 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17402 echo "_ACEOF"
17403} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17405ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406ac_delim='%!_!# '
17407for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017409 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410
Matthias Kloseb9621712010-04-24 17:59:49 +000017411 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17412 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 break
17414 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017415 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416 else
17417 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419done
Matthias Kloseb9621712010-04-24 17:59:49 +000017420rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017423cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017425sed -n '
17426h
17427s/^/S["/; s/!.*/"]=/
17428p
17429g
17430s/^[^!]*!//
17431:repl
17432t repl
17433s/'"$ac_delim"'$//
17434t delim
17435:nl
17436h
17437s/\(.\{148\}\)..*/\1/
17438t more1
17439s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17440p
17441n
17442b repl
17443:more1
17444s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17445p
17446g
17447s/.\{148\}//
17448t nl
17449:delim
17450h
17451s/\(.\{148\}\)..*/\1/
17452t more2
17453s/["\\]/\\&/g; s/^/"/; s/$/"/
17454p
17455b
17456:more2
17457s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17458p
17459g
17460s/.\{148\}//
17461t delim
17462' <conf$$subs.awk | sed '
17463/^[^""]/{
17464 N
17465 s/\n//
17466}
17467' >>$CONFIG_STATUS || ac_write_fail=1
17468rm -f conf$$subs.awk
17469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17470_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017471cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017472 for (key in S) S_is_set[key] = 1
17473 FS = ""
17474
17475}
17476{
17477 line = $ 0
17478 nfields = split(line, field, "@")
17479 substed = 0
17480 len = length(field[1])
17481 for (i = 2; i < nfields; i++) {
17482 key = field[i]
17483 keylen = length(key)
17484 if (S_is_set[key]) {
17485 value = S[key]
17486 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17487 len += length(value) + length(field[++i])
17488 substed = 1
17489 } else
17490 len += 1 + keylen
17491 }
17492
17493 print line
17494}
17495
17496_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17499if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17500 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17501else
17502 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017503fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017504 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017505_ACEOF
17506
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017507# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17508# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509# trailing colons and then remove the whole line if VPATH becomes empty
17510# (actually we leave an empty line to preserve line numbers).
17511if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017512 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17513h
17514s///
17515s/^/:/
17516s/[ ]*$/:/
17517s/:\$(srcdir):/:/g
17518s/:\${srcdir}:/:/g
17519s/:@srcdir@:/:/g
17520s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017522x
17523s/\(=[ ]*\).*/\1/
17524G
17525s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526s/^[^=]*=[ ]*$//
17527}'
17528fi
17529
Matthias Kloseb9621712010-04-24 17:59:49 +000017530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017531fi # test -n "$CONFIG_FILES"
17532
Matthias Kloseb9621712010-04-24 17:59:49 +000017533# Set up the scripts for CONFIG_HEADERS section.
17534# No need to generate them if there are no CONFIG_HEADERS.
17535# This happens for instance with `./config.status Makefile'.
17536if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017537cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017538BEGIN {
17539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540
Matthias Kloseb9621712010-04-24 17:59:49 +000017541# Transform confdefs.h into an awk script `defines.awk', embedded as
17542# here-document in config.status, that substitutes the proper values into
17543# config.h.in to produce config.h.
17544
17545# Create a delimiter string that does not exist in confdefs.h, to ease
17546# handling of long lines.
17547ac_delim='%!_!# '
17548for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017549 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17550 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017551 break
17552 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017553 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 else
17555 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17556 fi
17557done
17558
17559# For the awk script, D is an array of macro values keyed by name,
17560# likewise P contains macro parameters if any. Preserve backslash
17561# newline sequences.
17562
17563ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17564sed -n '
17565s/.\{148\}/&'"$ac_delim"'/g
17566t rset
17567:rset
17568s/^[ ]*#[ ]*define[ ][ ]*/ /
17569t def
17570d
17571:def
17572s/\\$//
17573t bsnl
17574s/["\\]/\\&/g
17575s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17576D["\1"]=" \3"/p
17577s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17578d
17579:bsnl
17580s/["\\]/\\&/g
17581s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17582D["\1"]=" \3\\\\\\n"\\/p
17583t cont
17584s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17585t cont
17586d
17587:cont
17588n
17589s/.\{148\}/&'"$ac_delim"'/g
17590t clear
17591:clear
17592s/\\$//
17593t bsnlc
17594s/["\\]/\\&/g; s/^/"/; s/$/"/p
17595d
17596:bsnlc
17597s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17598b cont
17599' <confdefs.h | sed '
17600s/'"$ac_delim"'/"\\\
17601"/g' >>$CONFIG_STATUS || ac_write_fail=1
17602
17603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17604 for (key in D) D_is_set[key] = 1
17605 FS = ""
17606}
17607/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17608 line = \$ 0
17609 split(line, arg, " ")
17610 if (arg[1] == "#") {
17611 defundef = arg[2]
17612 mac1 = arg[3]
17613 } else {
17614 defundef = substr(arg[1], 2)
17615 mac1 = arg[2]
17616 }
17617 split(mac1, mac2, "(") #)
17618 macro = mac2[1]
17619 prefix = substr(line, 1, index(line, defundef) - 1)
17620 if (D_is_set[macro]) {
17621 # Preserve the white space surrounding the "#".
17622 print prefix "define", macro P[macro] D[macro]
17623 next
17624 } else {
17625 # Replace #undef with comments. This is necessary, for example,
17626 # in the case of _POSIX_SOURCE, which is predefined and required
17627 # on some systems where configure will not decide to define it.
17628 if (defundef == "undef") {
17629 print "/*", prefix defundef, macro, "*/"
17630 next
17631 }
17632 }
17633}
17634{ print }
17635_ACAWK
17636_ACEOF
17637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017638 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017639fi # test -n "$CONFIG_HEADERS"
17640
17641
17642eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17643shift
17644for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645do
17646 case $ac_tag in
17647 :[FHLC]) ac_mode=$ac_tag; continue;;
17648 esac
17649 case $ac_mode$ac_tag in
17650 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017651 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 :[FH]-) ac_tag=-:-;;
17653 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17654 esac
17655 ac_save_IFS=$IFS
17656 IFS=:
17657 set x $ac_tag
17658 IFS=$ac_save_IFS
17659 shift
17660 ac_file=$1
17661 shift
17662
17663 case $ac_mode in
17664 :L) ac_source=$1;;
17665 :[FH])
17666 ac_file_inputs=
17667 for ac_f
17668 do
17669 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017670 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 *) # Look for the file first in the build tree, then in the source tree
17672 # (if the path is not absolute). The absolute path cannot be DOS-style,
17673 # because $ac_f cannot contain `:'.
17674 test -f "$ac_f" ||
17675 case $ac_f in
17676 [\\/$]*) false;;
17677 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17678 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017679 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017681 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17682 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 done
17684
17685 # Let's still pretend it is `configure' which instantiates (i.e., don't
17686 # use $as_me), people would be surprised to read:
17687 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 configure_input='Generated from '`
17689 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17690 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 if test x"$ac_file" != x-; then
17692 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17694$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 # Neutralize special characters interpreted by sed in replacement strings.
17697 case $configure_input in #(
17698 *\&* | *\|* | *\\* )
17699 ac_sed_conf_input=`$as_echo "$configure_input" |
17700 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17701 *) ac_sed_conf_input=$configure_input;;
17702 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703
17704 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017705 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17706 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 esac
17708 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 esac
17710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017712$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017713 X"$ac_file" : 'X\(//\)[^/]' \| \
17714 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017716$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17718 s//\1/
17719 q
17720 }
17721 /^X\(\/\/\)[^/].*/{
17722 s//\1/
17723 q
17724 }
17725 /^X\(\/\/\)$/{
17726 s//\1/
17727 q
17728 }
17729 /^X\(\/\).*/{
17730 s//\1/
17731 q
17732 }
17733 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017734 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 ac_builddir=.
17736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737case "$ac_dir" in
17738.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17739*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017740 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743 case $ac_top_builddir_sub in
17744 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17745 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17746 esac ;;
17747esac
17748ac_abs_top_builddir=$ac_pwd
17749ac_abs_builddir=$ac_pwd$ac_dir_suffix
17750# for backward compatibility:
17751ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017752
17753case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 ac_top_srcdir=$ac_top_builddir_sub
17757 ac_abs_top_srcdir=$ac_pwd ;;
17758 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 ac_top_srcdir=$srcdir
17761 ac_abs_top_srcdir=$srcdir ;;
17762 *) # Relative name.
17763 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17764 ac_top_srcdir=$ac_top_build_prefix$srcdir
17765 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017766esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017768
Martin v. Löwis11437992002-04-12 09:54:03 +000017769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 case $ac_mode in
17771 :F)
17772 #
17773 # CONFIG_FILE
17774 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017775
17776 case $INSTALL in
17777 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017779 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017780 ac_MKDIR_P=$MKDIR_P
17781 case $MKDIR_P in
17782 [\\/$]* | ?:[\\/]* ) ;;
17783 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17784 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017785_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786
Matthias Kloseb9621712010-04-24 17:59:49 +000017787cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788# If the template does not know about datarootdir, expand it.
17789# FIXME: This hack should be removed a few years after 2.60.
17790ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017791ac_sed_dataroot='
17792/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 p
17794 q
17795}
17796/@datadir@/p
17797/@docdir@/p
17798/@infodir@/p
17799/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017800/@mandir@/p'
17801case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802*datarootdir*) ac_datarootdir_seen=yes;;
17803*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17805$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017807cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808 ac_datarootdir_hack='
17809 s&@datadir@&$datadir&g
17810 s&@docdir@&$docdir&g
17811 s&@infodir@&$infodir&g
17812 s&@localedir@&$localedir&g
17813 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017814 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815esac
17816_ACEOF
17817
17818# Neutralize VPATH when `$srcdir' = `.'.
17819# Shell code in configure.ac might set extrasub.
17820# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017821cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17822ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017823$extrasub
17824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017826:t
17827/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017828s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017830s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831s&@srcdir@&$ac_srcdir&;t t
17832s&@abs_srcdir@&$ac_abs_srcdir&;t t
17833s&@top_srcdir@&$ac_top_srcdir&;t t
17834s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17835s&@builddir@&$ac_builddir&;t t
17836s&@abs_builddir@&$ac_abs_builddir&;t t
17837s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17838s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017839s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017841"
Victor Stinnere0be4232011-10-25 13:06:09 +020017842eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17843 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017846 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17847 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17848 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017850which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017851$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017852which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017853
Victor Stinnere0be4232011-10-25 13:06:09 +020017854 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017856 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17857 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017858 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017859 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 ;;
17861 :H)
17862 #
17863 # CONFIG_HEADER
17864 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017865 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017866 {
17867 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017868 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17869 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017870 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017871 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017872 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17873$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017875 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017876 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017877 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 fi
17879 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017880 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017881 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017882 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886
17887 esac
17888
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017889
17890 case $ac_file$ac_mode in
17891 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17892
17893 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894done # for ac_tag
17895
Guido van Rossum627b2d71993-12-24 10:39:16 +000017896
Matthias Kloseb9621712010-04-24 17:59:49 +000017897as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017898_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017899ac_clean_files=$ac_clean_files_save
17900
Matthias Kloseb9621712010-04-24 17:59:49 +000017901test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017902 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017903
Martin v. Löwis11437992002-04-12 09:54:03 +000017904
17905# configure is writing to config.log, and then calls config.status.
17906# config.status does its own redirection, appending to config.log.
17907# Unfortunately, on DOS this fails, as config.log is still kept open
17908# by configure, so config.status won't be able to write to it; its
17909# output is simply discarded. So we exec the FD to /dev/null,
17910# effectively closing config.log, so it can be properly (re)opened and
17911# appended to by config.status. When coming back to configure, we
17912# need to make the FD available again.
17913if test "$no_create" != yes; then
17914 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017915 ac_config_status_args=
17916 test "$silent" = yes &&
17917 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017918 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017919 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 exec 5>>config.log
17921 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17922 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017924fi
17925if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17927$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017928fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017929
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017930
Christian Heimes75ed8902013-11-20 01:11:18 +010017931echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017932if test ! -f Modules/Setup
17933then
17934 cp $srcdir/Modules/Setup.dist Modules/Setup
17935fi
17936
Christian Heimes75ed8902013-11-20 01:11:18 +010017937echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017938if test ! -f Modules/Setup.local
17939then
17940 echo "# Edit this file for local setup changes" >Modules/Setup.local
17941fi
17942
Christian Heimes75ed8902013-11-20 01:11:18 +010017943echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017944$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17945 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017946 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017947mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017948
17949if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17950 echo "" >&6
17951 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017952 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017953 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017954 echo "" >&6
17955 echo "" >&6
17956fi
17957